摘要: 访问属性时,其行为类似于字段。不同的是属性通过访问器实现;访问器用于定义访问属性或为属性赋值时执行的语句。 #属性语法 1.赋初始值 public class Person { public string FirstName { get; set; } = string.Empty; } 2.可为 阅读全文
posted @ 2022-04-19 21:21 是卡卡罗特啊 阅读(53) 评论(0) 推荐(0)