Results 1 to 2 of 2

Thread: "delegate" or some funcPtr...

  1. #1

    Thread Starter
    Lively Member neodatatype's Avatar
    Join Date
    Aug 2002
    Location
    Italy
    Posts
    103

    Question "delegate" or some funcPtr...

    Hi,

    This time I need to declare a function like this:

    [pseudocode]
    public void MyFunc(FuncAddress otherFunc)

    Now, since otherFunc can be a whatever function with a whatever prototype, and C# does not support - I think - function-pointers, how can I do this?

    I saw the delegate keywords, but I don't understood its use and if it makes for me.

    Some examples?

    Thanx all again
    > NeoDataType.net <

    Try my Free .Net Reporting Tool!

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    You need to use delegates. BTW delegates are type safe function pointers.

    Lethal provided and example here
    Dont gain the world and lose your soul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width