Table of Contents

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 object

Object instance.

maxLength int

Maximum acceptable length of a result. DefaultBoundedStringMaxLength by default.

useEllipses bool

true to add ellipses at the end of the string is shortened, false otherwise.

Returns

string

Bounded string representation of the object.