J
Jazper Manto
hi
what is the difference between virtual / override and new? until now i only
knew the virtual / override thing.
thanx for hint.
Jazper
//--- new ----------------------------------------
public class MyBaseA
{
public void Invoke() {}
}
public class MyDerivedA : MyBaseA
{
new public void Invoke() {}
}
//---virtual / override -----------------------------
public class MyBaseB
{
public virtual void Invoke() {}
}
public class MyDerivedB : MyBaseB
{
public override void Invoke() {}
}
what is the difference between virtual / override and new? until now i only
knew the virtual / override thing.
thanx for hint.
Jazper
//--- new ----------------------------------------
public class MyBaseA
{
public void Invoke() {}
}
public class MyDerivedA : MyBaseA
{
new public void Invoke() {}
}
//---virtual / override -----------------------------
public class MyBaseB
{
public virtual void Invoke() {}
}
public class MyDerivedB : MyBaseB
{
public override void Invoke() {}
}