1.7:索引器.pdf

时间:2022-09-09 16:42:28
【文件属性】:

文件名称:1.7:索引器.pdf

文件大小:43KB

文件格式:PDF

更新时间:2022-09-09 16:42:28

1.7:索引器

#region 创建一个索引器,索引器的作用就是相当于一个取值和赋值的方法 +Student this[int index] ///

/// 创建一个索引器,索引器的作用就是相当于一个取值和赋值的方法 /// /// /// public Student this[int index] { get { if (index >= stus.Length) { throw new IndexOutOfRangeException(); } return stus[index]; } set


网友评论