Method ToBoundedString
- Namespace
- WhalesSecret.TradeScriptLib.Logging
- Assembly
- WhalesSecret.TradeScriptLib.dll
ToBoundedString(object?, int, bool)
Extension of ToString() to return at most maxLength
characters of the string representation for formatting purposes.
public static string ToBoundedString(this object? o, int maxLength = 1024, bool useEllipses = true)
Parameters
o
objectObject instance.
maxLength
intMaximum acceptable length of a result. DefaultBoundedStringMaxLength by default.
useEllipses
booltrue
to add ellipses at the end of the string is shortened,false
otherwise.
Returns
- string
Bounded string representation of the object.