418
1
using System;
2
//##########################################################################################################
3
//https://metadataconsulting.blogspot.com/2019/12/CSharp-Convert-a-GUID-to-a-Darwin-Descriptor-and-back.html
4
//##########################################################################################################
5
public static class Program
6
{
7
class GUID2DD
8
{
9
// Conversion of this VB code to C# by http://metadataconsulting.blogspot.com/
10
// Some portions modernized, but an interesting exercise converting from a old language unexpressive to more modern lang
11
// Source Code: https://www.symantec.com/connect/articles/working-darwin-descriptors
12
//
13
// Auto VB translators
14
// 1.https://www.developerfusion.com/tools/convert/vb-to-csharp/?batchId=8e249124-06d2-4955-a238-dc2914a9cd3d - not good
15
// 2.https://www.carlosag.net/tools/codetranslator/ - super fast!
16
17
18
// 'VB Code - Copyright EdT 2012
19
// 'Script converts standard GUID to Darwin Descriptor and vice versa
20
// 'A standard GUID requires 38 characters and contains 5 groups of hexadecimal characters separated by dashes.
21
// 'The valid format for a standard GUID is:
22
// '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
23
// 'where X is a hex digit (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F).
24
//
Cached Result