Understanding of C # data types

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.