Why can't I use virtual/override on class variables as I can on methods?
Like for example we have 2 classes
class A
{
public virtual int x;
}
class B : A
{
public override int x;
}
when i compile this above code it display error like "The modifier 'virtual' is not valid for this item"???why display this type of error?? please help me in details .

Sujeet SumanRank #790 · 2.9K reputationPosted Oct 10, 2015, 9:15 AM EDT
Priyaranjan K SRank #45 · 32.5K reputationPosted Oct 9, 2015, 11:03 PM EDT
Kumar Gaurav21 reputationPosted Oct 10, 2015, 10:34 AM EDT