using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
/* 变量的命名
 * 命名规则: 第一个字符必须是字线或者下划线(_),基后的字符可以是任意个数字,字母,下划线
 * 不用全部使用C#的关键字,比如class,nameespace,new void 等,判断方式: VS中亮蓝色的就是关键字
 * 这也是类,函数等的命名规则
 * 中文变量名(类中,函数名)
 * C#中建义变量开头用小写
 * 
 * 
 */
namespace _6变量的命名
{
    class Program
    {
        static void Main(string[] args)
        {
            int i1;
            int i2,i3;
            int i4 = 8;

            //Console.WriteLine(i1); //局部变量用之前必须要初始值
            Console.ReadKey();
        }
    }
}

  

相关文章:

  • 2022-01-10
  • 2021-12-30
  • 2021-07-27
  • 2022-12-23
  • 2021-07-29
  • 2022-12-23
  • 2021-12-05
猜你喜欢
  • 2022-02-27
  • 2021-11-10
  • 2021-05-28
  • 2021-08-17
  • 2021-11-23
  • 2022-01-11
  • 2021-10-17
相关资源
相似解决方案