Mike Raiford <"m[raiford]!at"@gmail.com> wrote:
> Transparently.
> e.g.
> delegate void myDel(int x);
> class SomeClass
> {
> public int myValue;
> public void DoInstanceStuff(int x)
> {
> myValue = x;
> }
> public static void Main()
> {
> SomeClass c = new SomeClass();
> myDel d = c.DoInstanceStuff
> d(6); // this sets c.myValue to 6;
> }
> }
So you can't use the same function delegate for calling a member
function of two different objects?
--
- Warp
Post a reply to this message
|