ServerInfo = CType(System.Runtime.InteropServices.Marshal.PtrToStructure(BufferPtr, GetType(SERVER_INFO_100)), SERVER_INFO_100)
I need to convert this CType to C#. I am not aware on VB.net. Please suggest how to do this and also forloop
For index = 0 To iEntriesRead - 1
you can use "as" in C# for casting
For eg:
For the For loop in C# you can follow below code