I am writing C # code that uses the IP Helper API. One of the functions I'm trying to name is " GetBestInterface ", which accepts a "uint" IP representation. I need to parse the IP text view to create the uint view.
I found some examples through Google, for example this or this , but I am sure that for .NET this should be a standard way. The only problem is that I can not find this standard way. IPAddress.Parse seems to be in the right direction, but it does not provide any way to get the "uint" view ...
There is also a way to do this using IP Helper using ParseNetworkString , but again I would rather use .NET - I believe that the less I rely on pInvoke, the better.
So, does anyone know a standard way to do this in .NET?
Hershi
source share