Click or drag to resize

HResultHelperCreateToString Method

[This is preliminary documentation and is subject to change.]

Creates the default ToString implementation for CodedExceptions, with the optional addition of custom text.

Namespace:  NerdyDuck.CodedExceptions
Assembly:  NerdyDuck.CodedExceptions (in NerdyDuck.CodedExceptions.dll) Version: 2.0.0+2040dad
Syntax
public static string CreateToString(
	Exception ex,
	string customText
)
View Source

Parameters

ex
Type: SystemException
The exception to create the ToString return value for.
customText
Type: SystemString
A custom text (e.g. parameter values) that is inserted between the exception message and the stack trace.

Return Value

Type: String
A string representing the specified exception.
Exceptions
ExceptionCondition
ArgumentNullExceptionex is null.
Remarks
Unlike the default implementation, this implementation inserts the HResult between class name and message.
See Also