System.Net.WebExceptionMapping.GetWebStatusString C# (CSharp) Method

GetWebStatusString() static private method

static private GetWebStatusString ( WebExceptionStatus status ) : string
status WebExceptionStatus
return string
        internal static string GetWebStatusString(WebExceptionStatus status)
        {
            int statusInt = (int) status;
            if (statusInt >= s_Mapping.Length || statusInt < 0)
            {
                throw new InternalException();
            }

            string message = s_Mapping[statusInt];
            if (message == null)
            {
                message = "net_webstatus_" + status.ToString();
                s_Mapping[statusInt] = message;
            }
            return message;
        }
    }

Usage Example

        public static string GetWebStatusString(string Res, WebExceptionStatus Status)
        {
            string str2   = SR.GetString(WebExceptionMapping.GetWebStatusString(Status));
            string format = SR.GetString(Res);

            return(string.Format(CultureInfo.CurrentCulture, format, new object[] { str2 }));
        }
All Usage Examples Of System.Net.WebExceptionMapping::GetWebStatusString
WebExceptionMapping