c#Lesson01

//introduction of system fuction
using System;

//name space命名空間

//class
class MainClass
{
//main method
//A program starts with the main method and ends with the main method
//A program has only one main method

/// <summary>
/// The entry point of the program, where the program control starts and ends.
/// </summary>
/// <param name="args">The command-line arguments.</param>
public static void Main (string[] args)
{

    /*
         * 多行注釋中可以包含回車
        */
    /*
    //All the programs written earlier must be written in the main method
    //在計(jì)算機(jī)中 最小存儲(chǔ)單位 位 bit
    //在計(jì)算機(jī)中 最小的使用單位 字節(jié) Byte
    //1字節(jié) = 8位

    //變量 就是一塊內(nèi)存
    //創(chuàng)建變量: 從一整塊內(nèi)存中,獲取一小塊內(nèi)存
    //定義變量
    //數(shù)據(jù)類型 變量名 = 值
    //整型
    //這里說的變量指的是 n1
    int n1 = 10;
    //如果想改變變量中的值
    n1 = 20;
    //系統(tǒng)提供的,作用將指定的數(shù)據(jù)輸出到控制臺(tái)
    Console.WriteLine (n1);

    //浮點(diǎn)型 單精度
    float f1 = 2.1234567f;
    Console.WriteLine (f1);

    //浮點(diǎn)型 雙精度
    double f2 = 0.123456789123456789;
    Console.WriteLine (f2);

    //bool 布爾類型 true false
    bool b1 = true;
    bool b2 = false;

    //字符類型
    char c1 = 'a';
    Console.WriteLine (c1);

    //字符串 加雙引號(hào)
    string c2 = "Hello World!";
    Console.WriteLine (c2);

    //命名規(guī)范
    //1.只能使用數(shù)字、字母、下劃線、@組成,數(shù)字不能開頭,@只能開頭
    int @a_1 = 10;
    //2.不可以與系統(tǒng)保留字同名
    //3.不能使用重復(fù)的變量名
    int @A_1 = 10;
    //規(guī)范
    //4.見名知意
    int age = 18;
    //5.駝峰命名法
    string myNameIs = "Lee";

    //不要用
    string 你好 = "Hello";
    Console.WriteLine (你好);

    int a1 = 1;
    int a2 = 1;
    int a3 = 1;
    int a4 = 1;
    int a5 = 1;
    int a6 = 1;
    int a7 = 1;
    int a8 = 1;
    int a9 = 1;
    int b11 = 1;
    int b22 = 1;
    int b3 = 1;
    int b4 = 1;
    int b5 = 1;
    int b6 = 1;
    int b7 = 1;
    int b8 = 1;
    int b9 = 1;

    bool c = true;
    bool c21 = true;
    bool c3 = true;
    bool c4 = true;
    bool c5 = true;
    bool c6 = true;
    bool c7 = true;
    bool c8 = true;
    bool c9 = true;
    bool d1 = false;
    bool d2 = false;
    bool d3 = false;
    bool d4 = false;
    bool d5 = false;
    bool d6 = false;
    bool d7 = false;
    bool d8 = false;
    bool d9 = false;

    char f = 'a';
    char f12 = 'a';
    char f22 = 'a';
    char f3 = 'a';
    char f4 = 'a';
    char f5 = 'a';
    char f6 = 'a';
    char f7 = 'a';
    char f8 = 'a';
    char f9 = 'a';
    char g1 = 'a';
    char g2 = 'a';
    char g3 = 'a';
    char g4 = 'a';
    char g5 = 'a';
    char g6 = 'a';
    char g7 = 'a';
    char g8 = 'a';
    char g9 = 'a';

    string h1 = "kk";
    string h2 = "kk";
    string h3 = "kk";
    string h4 = "kk";
    string h5 = "kk";
    string h6 = "kk";
    string h7 = "kk";
    string h8 = "kk";
    string h9 = "kk";
    string u1 = "kk";
    string u2 = "kk";
    string u3 = "kk";
    string u4 = "kk";
    string u5 = "kk";
    string u6 = "kk";
    string u7 = "kk";
    string u8 = "kk";
    string u9 = "kk";

    float i1 = 2.5f;
    float i2 = 2.2f;
    float i3 = 2.5f;
    float i4 = 2.8f;
    float i5 = 2.8f;
    float i6 = 2.9f;
    float i7 = 2.8f;
    float i8 = 2.8f;
    float i9 = 2.9f;
    float o1 = 2.8f;
    float o2 = 2.8f;
    float o3 = 2.8f;
    float o4 = 2.8f;
    float o5 = 2.8f;
    float o6 = 2.7f;
    float o7 = 2.7f;
    float o8 = 2.8f;
    float o9 = 2.7f;

    double t1 = 2.44;
    double t2 = 2.55;
    double t3 = 2.8787;
    double t4 = 2.578;
    double t5 = 2152.55;
    double t6 = 2.44;
    double t7 = 2.77;
    double t8 = 2.77;
    double t9 = 2.7474;
    double r1 = 2.55;
    double r2 = 2.44;
    double r3 = 2.447;
    double r4 = 2.77;
    double r5 = 2.44;
    double r6 = 2.44;
    double r7 = 2.44;
    double r8 = 32.44;
    double r9 = 2.44;

    */

    //      string str3 = "1";
    //      bool strBool = bool.Parse (str3);
    //      Console.WriteLine (strBool);
    //
    //


}

}

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • **2014真題Directions:Read the following text. Choose the be...
    又是夜半驚坐起閱讀 11,031評(píng)論 0 23
  • 屎1000屎 愛軟件之前僅供個(gè)人開發(fā)代碼測試研究,不慎流傳,已于開發(fā)后一周2017年9月永久廢除,請(qǐng)您自行卸載,請(qǐng)...
    嘻嘻嘻嘻12138閱讀 174評(píng)論 0 0
  • 圖片發(fā)自簡書App 也許自認(rèn)羽翼豐滿也許心感強(qiáng)韌志堅(jiān)強(qiáng)勢并非降龍伏虎強(qiáng)勢背后匿藏危險(xiǎn) 別讓強(qiáng)勢縛住手腳強(qiáng)勢無形藐視...
    豫視西影閱讀 915評(píng)論 11 8
  • 1.用毛巾擦餐具及水果 我國城市用水都是經(jīng)過嚴(yán)格消毒處理的,用自來水沖洗過的餐具及水果基本上是潔凈的,不用再擦。而...
    落寞的愛神閱讀 331評(píng)論 0 0
  • 和快樂人同行 便被快樂圍繞 你與快樂為伍 快樂便將你包抄 讀三十六計(jì)多了 你便有七十二條 人呀 越簡單越好 越簡單...
    武兵閱讀 190評(píng)論 0 1

友情鏈接更多精彩內(nèi)容