SharpCifs.Smb.SmbException.GetMessageByWinerrCode C# (CSharp) Method

GetMessageByWinerrCode() static private method

static private GetMessageByWinerrCode ( int errcode ) : string
errcode int
return string
		internal static string GetMessageByWinerrCode(int errcode)
		{
			int min = 0;
			int max = WinError.WinerrCodes.Length - 1;
			while (max >= min)
			{
				int mid = (min + max) / 2;
                if (errcode > WinError.WinerrCodes[mid])
				{
					min = mid + 1;
				}
				else
				{
                    if (errcode < WinError.WinerrCodes[mid])
					{
						max = mid - 1;
					}
					else
					{
                        return WinError.WinerrMessages[mid];
					}
				}
			}
			return errcode + string.Empty;
		}