DecimalConstantAttribute.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / clr / src / BCL / System / Runtime / CompilerServices / DecimalConstantAttribute.cs / 1 / DecimalConstantAttribute.cs

                            // ==++== 
//
//   Copyright (c) Microsoft Corporation.  All rights reserved.
//
// ==--== 

// Note: If you add a new ctor overloads you need to update ParameterInfo.RawDefaultValue 
 
namespace System.Runtime.CompilerServices
{ 
    [Serializable, AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter, Inherited=false)]
[System.Runtime.InteropServices.ComVisible(true)]
    public sealed class DecimalConstantAttribute : Attribute
    { 
        [CLSCompliant(false)]
        public DecimalConstantAttribute( 
            byte scale, 
            byte sign,
            uint hi, 
            uint mid,
            uint low
        )
        { 
            dec = new System.Decimal((int) low, (int)mid, (int)hi, (sign != 0), scale);
        } 
 
        public DecimalConstantAttribute(
            byte scale, 
            byte sign,
            int hi,
            int mid,
            int low 
        )
        { 
            dec = new System.Decimal(low, mid, hi, (sign != 0), scale); 
        }
 

        public System.Decimal Value
        {
            get { 
                return dec;
            } 
        } 

        private System.Decimal dec; 
    }
}


// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.


                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK