Convert Guid To Guid Binary String
using System;
using System.Security.Principal;
using System.Text;
static class ConvertUtility
{
public static string ConvertGuidToGuidBinaryString(Guid guid)
{
byte[] guidBytes = guid.ToByteArray();
StringBuilder guidBinary = new StringBuilder();
foreach (byte guidByte in guidBytes)
{
guidBinary.AppendFormat(@"\{0}", guidByte.ToString("x2"));
}
return guidBinary.ToString();
}
}
Related examples in the same category