View Single Post
Old 04-12-2008, 05:21 PM   #1 (permalink)
Killamus
Forum Expert
 
Join Date: Dec 2003
Location: Sitting in a chair fulfilling my life's goal
Age: 22
Posts: 2,650
Send a message via AIM to Killamus Send a message via MSN to Killamus
Default Function overriding

Just a quick question, is something like this at all possible? I did a bit of searching, but turned up nothing:

Code:
public class class1
{
  public virtual void A()
  {
     Console.WriteLine("A");
  }
}

public static class classO
{
public override void class1.A()
  {
     Console.WriteLine("B");
  } 
}
So, something like having a regular class (Must be a regular class) and not inheriting it, but having another class override the function?
__________________
Procrastinators unite!
Tomorrow.
Saying that Java is nice because it works on all OS's is like saying that anal sex is nice because it works on all genders.
Killamus is offline   Reply With Quote