NativeError GetLastError Method | Apache log4net™ SDK Documentation

Create a new instance of the NativeError class for the last Windows error.

Namespace: log4net.Util
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    public static NativeError GetLastError()

    Public Shared Function GetLastError As NativeError

    public:
    static NativeError^ GetLastError()

    static member GetLastError : unit -> NativeError

#### Return Value

Type: NativeError
An instance of the NativeError class for the last windows error.
Remarks

The message for the GetLastWin32Error
error number is lookup up using the native Win32 FormatMessage function.

See Also

#### Reference

NativeError Class
log4net.Util Namespace