IntPtrExtensionsToHexaDump Method
Dumps the content of a IntPtr buffer to a readable hexadecimal table.
Namespace: DevCase.Extensions.IntPtrExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static string ToHexaDump(
this IntPtr buffer,
int length,
bool addHeader = true
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function ToHexaDump (
buffer As IntPtr,
length As Integer,
Optional addHeader As Boolean = true
) As String
Dim buffer As IntPtr
Dim length As Integer
Dim addHeader As Boolean
Dim returnValue As String
returnValue = buffer.ToHexaDump(length,
addHeader)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static String^ ToHexaDump(
IntPtr buffer,
int length,
bool addHeader = true
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member ToHexaDump :
buffer : IntPtr *
length : int *
?addHeader : bool
(* Defaults:
let _addHeader = defaultArg addHeader true
*)
-> string
No code example is currently available or this language may not be supported.
- buffer IntPtr
-
The source IntPtr.
- length Int32
-
The number of bytes to read from the buffer.
- addHeader Boolean (Optional)
-
Optionally, adds a default header to the table columns.
Default value: True
String
The resulting readable hexadecimal table.
In Visual Basic and C#, you can call this method as an instance method on any object of type
IntPtr. 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).
This is a code example.
No code example is currently available or this language may not be supported.
Dim myString As String = "Hello World!, this is a test."
Dim bytes As Byte() = Encoding.Default.GetBytes(myString)
Dim buffer As IntPtr = Marshal.AllocHGlobal(bytes.Length)
Marshal.Copy(bytes, 0, buffer, bytes.Length)
Dim hexaDump As String = buffer.ToHexaDump(bytes.Length)
Console.WriteLine(hexaDump)
Marshal.FreeHGlobal(buffer)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.