Ans:
In case virtual method ,constructor not supported in c#, since constructor will not be having any bahaviour associated through constructor are treated as methodex:
public class A
{
public int i; // not support
public virtual A(int i)
{
this.i=i;
}
}
public class B:A
{
public int i; // not support
public override B(int i)
{
this.i=i;
}
}
No comments:
Post a Comment