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
+23
View File
@@ -0,0 +1,23 @@
概念:
解决函数传递时需要传递多个(不确定具体个数)参数的问题
通常用法:
语法:
关键字:params
案例:
```Csharp
static int Sum(params int[] arr)
{
//具体方法
return value;
}
Sum(1,2,3,4,5,6,7); //都会存入arr里
```
注意:
==params关键字后面必须是数组==
==最多只能有1个变长参数 且必须放在末尾==
#基础