C# Rider 调试
在调试的时候
在C#中使用步入(stepInto)会进入很多源文件
遇到Console.WriteLine();使用步出(stepOver)来进行调试
Set Get关键字
用来提供类
中属性
的访问机制
public 类型 属性名
{
get{return 私有字段;}
set{1.检查是否格式正确;
2.私有字段=value (value 代表外部赋给本属性的值)
}
}
public class Student(){
public string Name{set;get}
public int high{set;get}//省略set代表只读
}
Student s = new Studnet(Name="张飞",High="180")
{
public int Id{get;set;}
public string Name{get;set}
}