主题:不懂哪错
public class ddr
{
public readonly string Name;
private int intval;
public int val
{
get
{
return intval;
}
set
{
if (value >= 0 && value <= 10)
intval = value;
else
throw (new ArgumentOutofRangeException("val", value, "val must bcassing a value between 0 and 10"));
}
}
public override string ToString()
{
return "Name:" + Name + "\val:" + val;
}
private ddr()
: this("Default Name")
{
}
public ddr(string newName)
{
Name = newName;
intval = 0;
}
}
错误 1 命名空间“<global namespace>”已经包含了“ddr”的定义 D:\C# lianxi\hello\hello\Properties\AssemblyInfo.cs 1 14 hello
要怎么办呀..帮忙谢谢....
{
public readonly string Name;
private int intval;
public int val
{
get
{
return intval;
}
set
{
if (value >= 0 && value <= 10)
intval = value;
else
throw (new ArgumentOutofRangeException("val", value, "val must bcassing a value between 0 and 10"));
}
}
public override string ToString()
{
return "Name:" + Name + "\val:" + val;
}
private ddr()
: this("Default Name")
{
}
public ddr(string newName)
{
Name = newName;
intval = 0;
}
}
错误 1 命名空间“<global namespace>”已经包含了“ddr”的定义 D:\C# lianxi\hello\hello\Properties\AssemblyInfo.cs 1 14 hello
要怎么办呀..帮忙谢谢....