GuidRawHex 1.0.1
dotnet add package GuidRawHex --version 1.0.1
NuGet\Install-Package GuidRawHex -Version 1.0.1
<PackageReference Include="GuidRawHex" Version="1.0.1" />
<PackageVersion Include="GuidRawHex" Version="1.0.1" />
<PackageReference Include="GuidRawHex" />
paket add GuidRawHex --version 1.0.1
#r "nuget: GuidRawHex, 1.0.1"
#:package GuidRawHex@1.0.1
#addin nuget:?package=GuidRawHex&version=1.0.1
#tool nuget:?package=GuidRawHex&version=1.0.1
GuidRawHex
A lightweight .NET library for converting between Guid and RAW(16) byte/hex representations.
Features
Guid→byte[]Guid→ HEX stringbyte[]→Guid- HEX string →
Guid - Suitable for Oracle
RAW(16)values - Simple and lightweight API
Installation
Install the NuGet package:
dotnet add package GuidRawHex
Or install it using Visual Studio's NuGet Package Manager.
Usage
using GuidRawHex;
Console.WriteLine("GuidRaw Test");
var id = Guid.NewGuid();
// Guid -> byte[]
byte[] raw = GuidRaw.ToRaw(id);
// Guid -> HEX string
string rawHex = GuidRaw.ToRawHex(id);
// byte[] -> Guid
Guid guid1 = GuidRaw.ToGuid(raw);
// HEX string -> Guid
Guid guid2 = GuidRaw.ToGuid(rawHex);
Console.WriteLine($"GUID : {id}");
Console.WriteLine($"RAW as Byte[] : {raw}");
Console.WriteLine($"RAW HEX : {rawHex}");
Console.WriteLine($"GUID 1 : {guid1}");
Console.WriteLine($"GUID 2 : {guid2}");
Example Output
GuidRaw Test GUID : c4e9b348-1b8e-4479-9d27-ec18bf1889b2 RAW as Byte[] : 48B3E9C48E1B79449D27EC18BF1889B2 RAW HEX : 48B3E9C48E1B79449D27EC18BF1889B2 GUID 1 : c4e9b348-1b8e-4479-9d27-ec18bf1889b2 GUID 2 : c4e9b348-1b8e-4479-9d27-ec18bf1889b2
API
GuidRaw.ToRaw(Guid)
Converts a Guid to a 16-byte byte[].
byte[] raw = GuidRaw.ToRaw(id);
This can be used when a binary RAW(16) value is required.
GuidRaw.ToRawHex(Guid)
Converts a Guid to a hexadecimal string representation.
string rawHex = GuidRaw.ToRawHex(id);
Useful for logging, debugging, displaying RAW values, or comparing values.
GuidRaw.ToGuid(byte[])
Converts a 16-byte RAW value to a Guid.
Guid id = GuidRaw.ToGuid(raw); GuidRaw.ToGuid(string)
Converts a hexadecimal RAW string to a Guid.
Guid id = GuidRaw.ToGuid(rawHex); Oracle RAW(16)
For Oracle RAW(16) columns, use ToRaw() when the application requires the binary representation:
byte[] raw = GuidRaw.ToRaw(id);
Use ToRawHex() when you need to display or log the RAW value:
string rawHex = GuidRaw.ToRawHex(id);
License
MIT License
Copyright (c) 2026 Mehmet ONAT
:::
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.1 | 95 | 9/13/2026 |