class Program
{
static void Main(string[] args)
{
Person
p1 = new Person();
Console.WriteLine(p1["tom", 3,
9]);
Console.ReadKey();
}
}
class Person
{
public string this[string name, int
x, int y]
{
get
{
return name + x +
y;
}
}
}
时间: 2024-11-05 18:52:50