Mono.CSharp.Constant.GetTypedValue C# (CSharp) Method

GetTypedValue() public method

public GetTypedValue ( ) : object
return object
		public virtual object GetTypedValue ()
		{
			return GetValue ();
		}
#endif

Usage Example

Example #1
0
File: const.cs Project: mdae/MonoRT
        /// <summary>
        ///  Emits the field value by evaluating the expression
        /// </summary>
        public override void Emit()
        {
            if (!ResolveValue())
            {
                return;
            }

            if (FieldBuilder == null)
            {
                return;
            }

            if (value.Type == TypeManager.decimal_type)
            {
                FieldBuilder.SetCustomAttribute(CreateDecimalConstantAttribute(value));
            }
            else
            {
                FieldBuilder.SetConstant(value.GetTypedValue());
            }

            base.Emit();
        }