1 usingSystem;2 usingSystem.Collections.Generic;3 usingSystem.Linq;4 usingSystem.Text;5 /// <summary>6 ///namespaces, declared with namespace7 /// </summary>8 namespaceConsoleApplication19 {Ten /// <summary> One ///class, declared with class A /// </summary> - class Program - { the /// <summary> - ///method, the main method is the application's entry point method, which executes when the program runs, starting with the Main method - /// </summary> - /// <param name= "args" >Parameters</param + static void Main (string[] args) - { + stringRRG ="Nanyong"; A //String Variables at stringName ="OK"; - //string array variable - string[] names =New string[] {"Hello"," World"}; - //integer variable-2147483648 to 2147483647 - intMyint =-2147483648; - UINTMyuint =Ten; in LongMyLong =-2147483649; - ULONGMyulong =2147483649; to //array of integral type + int[] myints =New int[] {1,2,3,4,5}; - //single-precision floating-point variable the floatMyfloat =1.234f; * float[] Myfloats =New float[] {1.110f,1.25679F}; $ //double-precision floating-point variablePanax Notoginseng DoubleMyDouble =1.00000000; - Double[] Mydoubles =New Double[] {23.05,32.05, One}; the //Decimal type variable + decimalMydecimal =1.000M; A //Boolean variable the BOOLIsOk =false; + //array of Boolean type - BOOL[] Isoks =New BOOL[] {true,false}; $ $ ShortMyShort =123; - ShortMY16 =MyShort; - theInt32 my32 =456; - WuyiInt64 my64 =6400; the - Wu - About } $ } - classMyClass - { - } A}
Understanding of C # data types