CSharp examples for Language Basics:Variable
C# Data Type | .NET Data Type |
---|---|
sbyte | System.SByte |
byte | System.Byte |
short | System.Int16 |
ushort | System.UInt16 |
int | System.Int32 |
uint | System.UInt32 |
long | System.Int64 |
ulong | System.UInt64 |
char | System.Char |
float | System.Single |
double | System.Double |
bool | System.Boolean |
decimal | System.Decimal |
////from w w w. jav a2 s. co m using System; class net_vars { public static void Main() { System.Int32 my_variable = 4; System.Double PI = 3.1459; Console.WriteLine("\nmy_variable is {0}", my_variable ); Console.WriteLine("\nPI is {0}", PI ); } }