System.Reflection.CustomAttributeTypedArgument.CustomAttributeTypedArgument C# (CSharp) Method

CustomAttributeTypedArgument() private method

private CustomAttributeTypedArgument ( object value ) : System
value object
return System
        internal CustomAttributeTypedArgument(object value)
        {
            m_argumentType = value.GetType();
            if (m_argumentType.IsEnum)
            {
                if (Enum.GetUnderlyingType(m_argumentType) == typeof(int))
                    m_value = (int)value;
                else if (Enum.GetUnderlyingType(m_argumentType) == typeof(short))
                    m_value = (short)value;
                else
                    throw new ArgumentException(Environment.GetResourceString("Argument_EnumIsNotIntOrShort"), "value");
            }
            else
            {
                m_value = value;
            }
        }
        internal CustomAttributeTypedArgument(Module scope, CustomAttributeEncodedArgument encodedArg)

Same methods

CustomAttributeTypedArgument::CustomAttributeTypedArgument ( Module scope, CustomAttributeEncodedArgument encodedArg ) : System