C # in a Nutshell, Second Edition

ErrorWrapper

System.Runtime.InteropServices (mscorlib.dll) sealed class

This wrapper is used to force an integer, Exception , or other object to be marshaled as type VT_ERROR .

public sealed class ErrorWrapper { // Public Constructors public ErrorWrapper (Exception e ); public ErrorWrapper (int errorCode ); public ErrorWrapper (object errorCode ); // Public Instance Properties public int ErrorCode {get; } }

Категории