[antlr-interest] In c#, how to override a vaiable in a subclass
=?gb2312?q?=CB=EF=BC=CD=B8=D5=20Jigang=20(Robert)=20Sun?=
sunjigang1965 at yahoo.com.cn
Tue Mar 28 02:23:53 PST 2006
I want to declare a geneirc variable in a parent class, then use it as as diffrent type in
respective subclasses. I tried as such which was rejected:
class P
{
object v;
...
}
class Child1:P
{
(int) v;//want to override object v as integer type, rejected
...
}
class Child2:P
{
(string) v; //want to override object v as string type, rejected
...
}
Cheers.
Jigang
___________________________________________________________
ÑÅ»¢1GÃâ·ÑÓÊÏä°Ù·Ö°Ù·ÀÀ¬»øÐÅ
http://cn.mail.yahoo.com/
More information about the antlr-interest
mailing list