Initial commit

This commit is contained in:
2026-04-13 15:40:15 +08:00
commit 02810617db
40 changed files with 849 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
概念:
让对象像数组一样可以通过下标访问,方便程序编写
通常用法:
语法:
```Csharp
访 this[ 1 2.....]
{
get{} ====
set{}
}
```
案例:
```Csharp
class Person
{
private string name;
priavte int age;
private Person[] friends;
public Person this[int index]
{
get{return friends[index];}
set{friends[index] = value;}
}
}
Person p1 = new Person();
p[0] = new Person();
```
注意: