How do i use API in C#?
Printable View
How do i use API in C#?
Just for the sake of hearing my own voice (figuratively speaking) you do it the same way you should do it in VB.NET. Most people use the Declare statement to declare an external method but that's really a hold-over from VB6. The DllImportAttribute class can be used in VB.NET as well as C# and in certain cases it must, as the Declare statement is a little more limited in its capabilities.