PerformanceTestBaseTDelegate, TResultAsString Method

Gets the string representation of the specified result.


Namespace: KGySoft.Diagnostics
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
protected virtual string AsString(
	TResult result


result  TResult
The result.

Return Value

The string representation of the specified result.


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