This class encapsulates an exception that is thrown to wrap the failure of a Win32 native method call. The NativeErrorCode property can retrieve the underlying Win32 error code that caused the exception to be thrown. public class Win32Exception : System.Runtime.InteropServices.ExternalException { // Public Constructors public Win32Exception (); public Win32Exception (int error ); public Win32Exception (int error , string message ); // Protected Constructors protected Win32Exception (System.Runtime.Serialization.SerializationInfo info , System.Runtime.Serialization.StreamingContext context ); // Public Instance Properties public int NativeErrorCode {get; } // Public Instance Methods public override void GetObjectData (System.Runtime.Serialization.SerializationInfo info , System.Runtime.Serialization.StreamingContext context ); // overrides Exception } HierarchySystem.Object System.Exception(System.Runtime.Serialization.ISerializable) System.SystemException System.Runtime.InteropServices.ExternalException Win32Exception SubclassesSystem.Net.Sockets.SocketException |