I am writing a C# .NET 2.0 application wherein when a message is expected to be received via the SerialPort. If the frame is not received (i.e. times out) or i
Unfortunately the above didn't work for me, however this worked perfectly for me, pasting the whole code so it can be copy pasted directly in C#
public static class WinErrors
{
///
/// Gets a user friendly string message for a system error code
///
/// System error code
/// Error string
public static string GetSystemMessage(uint errorCode)
{
var exception = new Win32Exception((int)errorCode);
return exception.Message;
}
}