ByteArrayExtensionsToHexValuesString(Byte, String, Int32, Int32, Char, Boolean) Method
Converts the byte array to string of hexadecimal values.
Namespace: KGySoft.CoreLibrariesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0-preview.1
public static string ToHexValuesString(
this byte[] bytes,
string? separator,
int lineLength,
int indentSize = 0,
char indentChar = '',
bool indentSingleLine = false
)
<ExtensionAttribute>
Public Shared Function ToHexValuesString (
bytes As Byte(),
separator As String,
lineLength As Integer,
Optional indentSize As Integer = 0,
Optional indentChar As Char = ""C,
Optional indentSingleLine As Boolean = false
) As String
public:
[ExtensionAttribute]
static String^ ToHexValuesString(
array<unsigned char>^ bytes,
String^ separator,
int lineLength,
int indentSize = 0,
wchar_t indentChar = L'',
bool indentSingleLine = false
)
[<ExtensionAttribute>]
static member ToHexValuesString :
bytes : byte[] *
separator : string *
lineLength : int *
?indentSize : int *
?indentChar : char *
?indentSingleLine : bool
(* Defaults:
let _indentSize = defaultArg indentSize 0
let _indentChar = defaultArg indentChar ''
let _indentSingleLine = defaultArg indentSingleLine false
*)
-> string
- bytes Byte
- The byte array to convert.
- separator String
- The separator to use between the hex numbers. If or empty, the hex stream will be continuous.
- 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: .
StringThe string representation, in hex, of the contents of
bytes.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).