PerformanceTestBaseTDelegate, TResultAsString Method

Gets the string representation of the specified result.

Definition

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

Parameters

result  TResult
The result.

Return Value

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