namespace Test
{
class Program
{ string name{"a","b","c","d","e"}
const int Max=5;
private string []name=new string[Max];
public string this[int index]
{
get{
if(index>=0&&index<Max)
return name[index];
else
return name[0];
}
set
{
if(index>=0&&index<Max)
name[index]=vaule;
}}}
class GG{
static void Main(string[] args)
{
Program a=new Program();
Console.WriteLine("a[1]");
}
}
小草1434
相关分类