基类里的几个 protected static 型字段,如何在继承类中重新赋值
public class EntityBase {
protected static string table = "";
protected static string view = "";
......
}
public class Client:EntityBase
{
}
子类中如何对父类中的那2个子段重新赋值
问题点数:30、回复次数:1Top
1 楼saucer(思归)回复于 2003-12-01 14:47:56 得分 30
they are static, just do
EntityBase.table = "123";
EntityBase.view = "123";
of course, you might need to do
lock(typeof(EntityBase))
{
EntityBase.table = "123";
EntityBase.view = "123";
}
Top




