任何人都可以告诉我这个控制台应用程序做了什么吗?究竟发生了什么?c中的获取者和安装者#
此外,还有错误。你能解决他们吗?
public class Program
{
static void Main(string[] args)
{
Name n = new Name[5]; // error
n[0] = new Name(0); //error
n[0] = "hgfhf"; //is this possible in this program?
string nam = n[0];
}
}
public class Name
{
private string[] name;
private int size;
public Name(int size)
{
this.name = new string[size];
this.size = size;
}
public string this[int pos] // what does this mean?
{
get
{
return name[pos];
}
set
{
name[pos] = value;
}
}
}
糟糕的标点符号... – RedFilter 2010-09-04 09:42:34
请删除txtspk,它只会让你很难读出你想说的话。 – Guffa 2010-09-04 09:42:55
如果你想使用StackOverflow,请在你的问题上付出一些努力。我只是*为你翻译它;不要使用'文本'的发言,并至少尝试使用正确的拼写和标点符号。 – GenericTypeTea 2010-09-04 09:44:03