ByteArrayExtensionsToDecimalValuesString(Byte, String, Int32, Int32, Char, Boolean) Method

Converts the byte array to string of decimal values.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
C#
public static string ToDecimalValuesString(
	this byte[] bytes,
	string separator,
	int lineLength,
	int indentSize = 0,
	char indentChar = '',
	bool indentSingleLine = false
)

Parameters

bytes  Byte
The byte array to convert.
separator  String
The separator to use between the decimal numbers.
lineLength  Int32
Specifies the length of a line in the result not counting the indentation. When 0 or less, the result will not be wrapped to lines.
indentSize  Int32  (Optional)
Size of the indentation. If greater than zero, the new lines will be prefixed with as many indentChar characters as this parameter specifies. This parameter is optional.
Default value: 0
indentChar  Char  (Optional)
The character to be used for the indentation. This parameter is optional.
Default value: ' ' (space)
indentSingleLine  Boolean  (Optional)
If set to , then a single line result will be indented, too. This parameter is optional.
Default value: .

Return Value

String
The string representation, in decimal, of the contents of bytes.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Byte. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

ArgumentNullExceptionbytes or separator is
ArgumentExceptionseparator is empty or contains decimal digits

See Also