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
    //在计算机中 最小存储单位 位 bit
    //在计算机中 最小的使用单位 字节 Byte
    //1字节 = 8位

    //变量 就是一块内存
    //创建变量: 从一整块内存中,获取一小块内存
    //定义变量
    //数据类型 变量名 = 值
    //整型
    //这里说的变量指的是 n1
    int n1 = 10;
    //如果想改变变量中的值
    n1 = 20;
    //系统提供的,作用将指定的数据输出到控制台
    Console.WriteLine (n1);

    //浮点型 单精度
    float f1 = 2.1234567f;
    Console.WriteLine (f1);

    //浮点型 双精度
    double f2 = 0.123456789123456789;
    Console.WriteLine (f2);

    //bool 布尔类型 true false
    bool b1 = true;
    bool b2 = false;

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

    //字符串 加双引号
    string c2 = "Hello World!";
    Console.WriteLine (c2);

    //命名规范
    //1.只能使用数字、字母、下划线、@组成,数字不能开头,@只能开头
    int @a_1 = 10;
    //2.不可以与系统保留字同名
    //3.不能使用重复的变量名
    int @A_1 = 10;
    //规范
    //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);
    //
    //


}

}

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 9,789评论 0 23
  • 屎1000屎 爱软件之前仅供个人开发代码测试研究,不慎流传,已于开发后一周2017年9月永久废除,请您自行卸载,请...
    嘻嘻嘻嘻12138阅读 141评论 0 0
  • 图片发自简书App 也许自认羽翼丰满也许心感强韧志坚强势并非降龙伏虎强势背后匿藏危险 别让强势缚住手脚强势无形藐视...
    豫视西影阅读 859评论 11 8
  • 1.用毛巾擦餐具及水果 我国城市用水都是经过严格消毒处理的,用自来水冲洗过的餐具及水果基本上是洁净的,不用再擦。而...
    落寞的爱神阅读 294评论 0 0
  • 和快乐人同行 便被快乐围绕 你与快乐为伍 快乐便将你包抄 读三十六计多了 你便有七十二条 人呀 越简单越好 越简单...
    武兵阅读 176评论 0 1