Table of Contents

Method strerror

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

strerror(int)

Retrieves a pointer to the textual representation of the specified error number.

public static extern nint strerror(int errnum)

Parameters

errnum int

The error number for which to retrieve the corresponding error message.

Returns

nint

A pointer to a null-terminated string containing the error message associated with the specified error number. The string is managed by the system and should not be modified or freed by the caller.

Remarks

This method is a P/Invoke declaration for the strerror function in the C standard library (libc). The returned pointer may be invalidated by subsequent calls to strerror or other library functions. Use the returned string immediately or copy it if it needs to be preserved.