第六章:名命规范

1--pascal 帕斯卡命名法:第一个单词首字母大写,在类,方法,属性

2--camel 驼峰命名法:第一个单词首字母小写,变量,参数

3--c#命名规则:  (1)只能用下划线,字母,数字无线组成,(2)不可以使用保留字  (3)见名知意

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ant2
{
    /// <summary>
    /// 1--pascal 帕斯卡命名法;第一个单词首字母大写,在类,方法,属性
    /// 2--camel 驼峰命名法;第一个单词首字母小写,变量,参数
    /// 3--c#命名规则;
    ///    (1)只能用下划线,字母,数字无线组成
    ///    (2)不可以使用保留字
    ///    (3)见名知意
    /// </summary>
    class Program
    {
        static void Main(string[] args)
        {
            int studentld = 1;
            int a = 1;

        }
        public void GetStudentlnfo()
        {
        }
        public string VserName { get; set; }
    }
}

 

posted @ 2020-06-04 13:42  进一步海阔天空  阅读(112)  评论(0编辑  收藏  举报