How do I use something like this in C#.
Console.WriteLine("yaya instant");
Server.registerEvent(new Event(5000) {
public void doWork() {
this.stop();
Console.WriteLine("yaya 5 seconds later");
}
});
Event class and the doWork() method is declared inside Event class.
Pretty much what is going on is doWork() is abstract method which should get created by the code above.
Whats the proper syntax to do this in C#? is it even possible to do anonymous methods like this?. (The above code is not valid syntax, if someone doesn't understand this question.)
Thank you I appreciate the help.