1. 字符串:
string s1="Welcome";
char c=s1[0]; //获取字符串首个字符W
2. 数组:
使用sort方法为数组排序,使用Reverse方法反序排列
3. 委托:
//声明
public delegate string TheEvent(int a); //string是方法的返回类型
public string del1(int x) //方法的参数,类型一致
{
return x.ToString();
}
//调用
TheEvent testdel1 = new TheEvent(del1); //del1为方法,不能带括号
Response.Write (testdel1(12)); // 12为委托方法以参数