Mega Code Archive

 
Categories / C# / Data Types
 

Returns the TypeCode for value type Decimal

using System; class DecimalGetTypeCodeDemo {     public static void Main( )     {         decimal aDecimal = new decimal( 1.0 );         TypeCode typCode = aDecimal.GetTypeCode( );         Console.WriteLine( "Type Code:      \"{0}\"", typCode );         Console.WriteLine( "Numeric value:  {0}", (int)typCode );     } }