RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Delegate Information ?

sirens song

Wanderer
Delegate Information ?

I was looking though EventSink.cs to see how defaultly events are handled. I didnt get much help using that script as a referance, but I finished a system I was working on without it. In any case, I was curious about one thing.
What is the Delegate declaration do?.
I have looked it over and it is defined like a class or struct but I dont see any real benefit to it. Looks like it does generally what function pointers do in other language(C++) Im not sure and my C# books do not explain its uses and syntax.

Am I correct to assume it allows you to store a referance to a method inside the "delegate object", then pass that object to code to call the method.?

Thanks, Jamie
 
Top