KGy SOFT

PerformanceTestBaseTDelegate, TResultAsString Method

KGy SOFT Core Libraries Help
Gets the string representation of the specified result.

Namespace:  KGySoft.Diagnostics
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.4.0
Syntax

protected virtual string AsString(
	TResult result
)

Parameters

result
Type: TResult
The result.

Return Value

Type: String
The string representation of the specified result.
Remarks

If TResult is a byte[], then it is returned as a raw string with Encoding.Default encoding (similarly to a HEX editor), while non-whitespace control characters are replaced by square characters ().

Zero characters are replaced also if TResult is String.

If TResult is IEnumerable, then the string representation of elements (simply by ToString) are concatenated.

In any other case returns the result of ToString for result, or a localized string for null, if result is .

See Also

Reference