126
Console.WriteLine("out CGUID "+ outGuid.ToString("B").ToUpper()+" before full compression (removal of dashes) here for readability"); //for readability
1
using System;
2
using System.Collections.Generic;
3
4
//###################################################################################################
5
//https://metadataconsulting.blogspot.com/2019/11/C-Sharp-Convert-a-GUID-to-a-Compressed-GUID.html
6
//###################################################################################################
7
public class Program
8
{
9
public static bool IsHex(IEnumerable<char> chars)
10
{
11
bool isHex;
12
foreach(var c in chars)
13
{
14
isHex = ((c >= '0' && c <= '9') ||
15
(c >= 'a' && c <= 'f') ||
16
(c >= 'A' && c <= 'F'));
17
18
if(!isHex)
19
return false;
20
}
21
return true;
22
}
23
public static void Main()
24
{
Cached Result