Click here to Skip to main content
16,022,971 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi, friends

I've this code in VB,

bInited = CLIENT_Init(PtrToLong(AddressOf IniFunc), 0)


How i can convert it to C# code

IniFunc is a function which have arguments

thks
Posted

1 solution

In C# (or .NET in general) you use delegates, to assign an event to the address of a method.

If you "Google" for "C# Delegates" you can find plenty of information on the subject.

Here is one such site:
.NET Delegates and Events[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900