ExceptionExtensionsToEnglishT Method
Converts the message of a Exception to English language.
Namespace: DevCase.Extensions.ExceptionExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static string ToEnglish<T>(
this T ex
)
where T : Exception
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function ToEnglish(Of T As Exception) (
ex As T
) As String
Dim ex As T
Dim returnValue As String
returnValue = ex.ToEnglish()
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
generic<typename T>
where T : Exception
static String^ ToEnglish(
T ex
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member ToEnglish :
ex : 'T -> string when 'T : Exception
No code example is currently available or this language may not be supported.
- ex T
-
An Exception that contains an exception message in a non-english language.
- T
String
The exception message in English language.
In Visual Basic and C#, you can call this method as an instance method on any object of type
T. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This is a code example.
No code example is currently available or this language may not be supported.
Try
Throw New FileNotFoundException
Catch ex As FileNotFoundException
Dim message As String = ex.ToEnglish
End Try
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.