这道题错在哪里了,不难
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Text;
namespace_
{
classProgram
{
staticvoidMain()
{
class1c1=newclass1();
c1.str2="shanghai";
class2c=newclass2();
c.sum();
}
}
classclass1
{
protectedstringstr1;
publicstringstr2
{
get
{
returnstr1;
}
set
{
str1=str2;
}
}
}
classclass2:class1
{
publicvoidsum()
{
stringstr3=base.str1;
Console.WriteLine("{0}",str3);
}
}
}