13 [__DynamicallyInvokable]
17 private enum GuidStyles
20 AllowParenthesis = 0x1,
24 RequireParenthesis = 0x10,
27 RequireHexPrefix = 0x80,
32 ParenthesisFormat = 0x50,
36 private enum GuidParseThrowStyle
43 private enum ParseFailureKind
50 FormatWithInnerException
53 private struct GuidResult
55 internal Guid parsedGuid;
57 internal GuidParseThrowStyle throwStyle;
59 internal ParseFailureKind m_failure;
61 internal string m_failureMessageID;
63 internal object m_failureMessageFormatArgument;
65 internal string m_failureArgumentName;
69 internal void Init(GuidParseThrowStyle canThrow)
72 throwStyle = canThrow;
75 internal void SetFailure(
Exception nativeException)
77 m_failure = ParseFailureKind.NativeException;
78 m_innerException = nativeException;
81 internal void SetFailure(ParseFailureKind failure,
string failureMessageID)
83 SetFailure(failure, failureMessageID,
null,
null,
null);
86 internal void SetFailure(ParseFailureKind failure,
string failureMessageID,
object failureMessageFormatArgument)
88 SetFailure(failure, failureMessageID, failureMessageFormatArgument,
null,
null);
91 internal void SetFailure(ParseFailureKind failure,
string failureMessageID,
object failureMessageFormatArgument,
string failureArgumentName,
Exception innerException)
94 m_failureMessageID = failureMessageID;
95 m_failureMessageFormatArgument = failureMessageFormatArgument;
96 m_failureArgumentName = failureArgumentName;
97 m_innerException = innerException;
100 throw GetGuidParseException();
104 internal Exception GetGuidParseException()
108 case ParseFailureKind.ArgumentNull:
110 case ParseFailureKind.FormatWithInnerException:
112 case ParseFailureKind.FormatWithParameter:
114 case ParseFailureKind.Format:
116 case ParseFailureKind.NativeException:
117 return m_innerException;
125 [__DynamicallyInvokable]
156 [__DynamicallyInvokable]
167 _a = ((b[3] << 24) | (b[2] << 16) | (b[1] << 8) | b[0]);
168 _b = (short)((b[5] << 8) | b[4]);
169 _c = (short)((b[7] << 8) | b[6]);
192 [CLSCompliant(
false)]
193 [__DynamicallyInvokable]
194 public Guid(uint a, ushort b, ushort c,
byte d,
byte e,
byte f,
byte g,
byte h,
byte i,
byte j,
byte k)
218 [__DynamicallyInvokable]
219 public Guid(
int a,
short b,
short c,
byte[] d)
254 [__DynamicallyInvokable]
255 public Guid(
int a,
short b,
short c,
byte d,
byte e,
byte f,
byte g,
byte h,
byte i,
byte j,
byte k)
276 [__DynamicallyInvokable]
284 GuidResult result =
default(GuidResult);
285 result.Init(GuidParseThrowStyle.All);
286 if (TryParseGuid(g, GuidStyles.Any, ref result))
288 this = result.parsedGuid;
291 throw result.GetGuidParseException();
301 [__DynamicallyInvokable]
308 GuidResult result =
default(GuidResult);
309 result.Init(GuidParseThrowStyle.AllButOverflow);
310 if (TryParseGuid(input, GuidStyles.Any, ref result))
312 return result.parsedGuid;
314 throw result.GetGuidParseException();
322 [__DynamicallyInvokable]
325 GuidResult result2 =
default(GuidResult);
326 result2.Init(GuidParseThrowStyle.None);
327 if (TryParseGuid(input, GuidStyles.Any, ref result2))
329 result = result2.parsedGuid;
344 [__DynamicallyInvokable]
355 if (format.Length != 1)
364 flags = GuidStyles.RequireDashes;
368 flags = GuidStyles.None;
372 flags = GuidStyles.BraceFormat;
376 flags = GuidStyles.ParenthesisFormat;
380 flags = GuidStyles.HexFormat;
385 GuidResult result =
default(GuidResult);
386 result.Init(GuidParseThrowStyle.AllButOverflow);
387 if (TryParseGuid(input, flags, ref result))
389 return result.parsedGuid;
391 throw result.GetGuidParseException();
400 [__DynamicallyInvokable]
403 if (format ==
null || format.Length != 1)
413 flags = GuidStyles.RequireDashes;
417 flags = GuidStyles.None;
421 flags = GuidStyles.BraceFormat;
425 flags = GuidStyles.ParenthesisFormat;
429 flags = GuidStyles.HexFormat;
435 GuidResult result2 =
default(GuidResult);
436 result2.Init(GuidParseThrowStyle.None);
437 if (TryParseGuid(input, flags, ref result2))
439 result = result2.parsedGuid;
446 private static bool TryParseGuid(
string g, GuidStyles flags, ref GuidResult result)
450 result.SetFailure(ParseFailureKind.Format,
"Format_GuidUnrecognized");
453 string text = g.Trim();
454 if (text.Length == 0)
456 result.SetFailure(ParseFailureKind.Format,
"Format_GuidUnrecognized");
459 bool flag = text.IndexOf(
'-', 0) >= 0;
462 if ((flags & (GuidStyles.AllowDashes | GuidStyles.RequireDashes)) == GuidStyles.None)
464 result.SetFailure(ParseFailureKind.Format,
"Format_GuidUnrecognized");
468 else if ((flags & GuidStyles.RequireDashes) != 0)
470 result.SetFailure(ParseFailureKind.Format,
"Format_GuidUnrecognized");
473 bool flag2 = text.IndexOf(
'{', 0) >= 0;
476 if ((flags & (GuidStyles.AllowBraces | GuidStyles.RequireBraces)) == GuidStyles.None)
478 result.SetFailure(ParseFailureKind.Format,
"Format_GuidUnrecognized");
482 else if ((flags & GuidStyles.RequireBraces) != 0)
484 result.SetFailure(ParseFailureKind.Format,
"Format_GuidUnrecognized");
487 if (text.IndexOf(
'(', 0) >= 0)
489 if ((flags & (GuidStyles.AllowParenthesis | GuidStyles.RequireParenthesis)) == GuidStyles.None)
491 result.SetFailure(ParseFailureKind.Format,
"Format_GuidUnrecognized");
495 else if ((flags & GuidStyles.RequireParenthesis) != 0)
497 result.SetFailure(ParseFailureKind.Format,
"Format_GuidUnrecognized");
504 return TryParseGuidWithDashes(text, ref result);
508 return TryParseGuidWithHexPrefix(text, ref result);
510 return TryParseGuidWithNoStyle(text, ref result);
512 catch (IndexOutOfRangeException innerException)
514 result.SetFailure(ParseFailureKind.FormatWithInnerException,
"Format_GuidUnrecognized",
null,
null, innerException);
517 catch (ArgumentException innerException2)
519 result.SetFailure(ParseFailureKind.FormatWithInnerException,
"Format_GuidUnrecognized",
null,
null, innerException2);
524 private static bool TryParseGuidWithHexPrefix(
string guidString, ref GuidResult result)
528 guidString = EatAllWhitespace(guidString);
529 if (
string.IsNullOrEmpty(guidString) || guidString[0] !=
'{')
531 result.SetFailure(ParseFailureKind.Format,
"Format_GuidBrace");
534 if (!IsHexPrefix(guidString, 1))
536 result.SetFailure(ParseFailureKind.Format,
"Format_GuidHexPrefix",
"{0xdddddddd, etc}");
540 num2 = guidString.IndexOf(
',', num) - num;
543 result.SetFailure(ParseFailureKind.Format,
"Format_GuidComma");
546 if (!StringToInt(guidString.Substring(num, num2), -1, 4096, out result.parsedGuid._a, ref result))
550 if (!IsHexPrefix(guidString, num + num2 + 1))
552 result.SetFailure(ParseFailureKind.Format,
"Format_GuidHexPrefix",
"{0xdddddddd, 0xdddd, etc}");
555 num = num + num2 + 3;
556 num2 = guidString.IndexOf(
',', num) - num;
559 result.SetFailure(ParseFailureKind.Format,
"Format_GuidComma");
562 if (!StringToShort(guidString.Substring(num, num2), -1, 4096, out result.parsedGuid._b, ref result))
566 if (!IsHexPrefix(guidString, num + num2 + 1))
568 result.SetFailure(ParseFailureKind.Format,
"Format_GuidHexPrefix",
"{0xdddddddd, 0xdddd, 0xdddd, etc}");
571 num = num + num2 + 3;
572 num2 = guidString.IndexOf(
',', num) - num;
575 result.SetFailure(ParseFailureKind.Format,
"Format_GuidComma");
578 if (!StringToShort(guidString.Substring(num, num2), -1, 4096, out result.parsedGuid._c, ref result))
582 if (guidString.Length <= num + num2 + 1 || guidString[num + num2 + 1] !=
'{')
584 result.SetFailure(ParseFailureKind.Format,
"Format_GuidBrace");
588 byte[] array =
new byte[8];
589 for (
int i = 0; i < 8; i++)
591 if (!IsHexPrefix(guidString, num + num2 + 1))
593 result.SetFailure(ParseFailureKind.Format,
"Format_GuidHexPrefix",
"{... { ... 0xdd, ...}}");
596 num = num + num2 + 3;
599 num2 = guidString.IndexOf(
',', num) - num;
602 result.SetFailure(ParseFailureKind.Format,
"Format_GuidComma");
608 num2 = guidString.IndexOf(
'}', num) - num;
611 result.SetFailure(ParseFailureKind.Format,
"Format_GuidBraceAfterLastNumber");
615 uint num3 = (uint)
Convert.ToInt32(guidString.Substring(num, num2), 16);
618 result.SetFailure(ParseFailureKind.Format,
"Overflow_Byte");
621 array[i] = (byte)num3;
623 result.parsedGuid._d = array[0];
624 result.parsedGuid._e = array[1];
625 result.parsedGuid._f = array[2];
626 result.parsedGuid._g = array[3];
627 result.parsedGuid._h = array[4];
628 result.parsedGuid._i = array[5];
629 result.parsedGuid._j = array[6];
630 result.parsedGuid._k = array[7];
631 if (num + num2 + 1 >= guidString.Length || guidString[num + num2 + 1] !=
'}')
633 result.SetFailure(ParseFailureKind.Format,
"Format_GuidEndBrace");
636 if (num + num2 + 1 != guidString.Length - 1)
638 result.SetFailure(ParseFailureKind.Format,
"Format_ExtraJunkAtEnd");
644 private static bool TryParseGuidWithNoStyle(
string guidString, ref GuidResult result)
648 if (guidString.Length != 32)
650 result.SetFailure(ParseFailureKind.Format,
"Format_GuidInvLen");
653 foreach (
char c
in guidString)
655 if (c < '0' || c >
'9')
658 if (c2 < 'A' || c2 >
'F')
660 result.SetFailure(ParseFailureKind.Format,
"Format_GuidInvalidChar");
665 if (!StringToInt(guidString.Substring(num, 8), -1, 4096, out result.parsedGuid._a, ref result))
670 if (!StringToShort(guidString.Substring(num, 4), -1, 4096, out result.parsedGuid._b, ref result))
675 if (!StringToShort(guidString.Substring(num, 4), -1, 4096, out result.parsedGuid._c, ref result))
680 if (!StringToInt(guidString.Substring(num, 4), -1, 4096, out
int result2, ref result))
686 if (!StringToLong(guidString, ref num2, num, out
long result3, ref result))
690 if (num2 - num != 12)
692 result.SetFailure(ParseFailureKind.Format,
"Format_GuidInvLen");
695 result.parsedGuid._d = (byte)(result2 >> 8);
696 result.parsedGuid._e = (byte)result2;
697 result2 = (int)(result3 >> 32);
698 result.parsedGuid._f = (byte)(result2 >> 8);
699 result.parsedGuid._g = (byte)result2;
700 result2 = (int)result3;
701 result.parsedGuid._h = (byte)(result2 >> 24);
702 result.parsedGuid._i = (byte)(result2 >> 16);
703 result.parsedGuid._j = (byte)(result2 >> 8);
704 result.parsedGuid._k = (byte)result2;
708 private static bool TryParseGuidWithDashes(
string guidString, ref GuidResult result)
712 if (guidString[0] ==
'{')
714 if (guidString.Length != 38 || guidString[37] !=
'}')
716 result.SetFailure(ParseFailureKind.Format,
"Format_GuidInvLen");
721 else if (guidString[0] ==
'(')
723 if (guidString.Length != 38 || guidString[37] !=
')')
725 result.SetFailure(ParseFailureKind.Format,
"Format_GuidInvLen");
730 else if (guidString.Length != 36)
732 result.SetFailure(ParseFailureKind.Format,
"Format_GuidInvLen");
735 if (guidString[8 + num] !=
'-' || guidString[13 + num] !=
'-' || guidString[18 + num] !=
'-' || guidString[23 + num] !=
'-')
737 result.SetFailure(ParseFailureKind.Format,
"Format_GuidDashes");
741 if (!StringToInt(guidString, ref num2, 8, 8192, out
int result2, ref result))
745 result.parsedGuid._a = result2;
747 if (!StringToInt(guidString, ref num2, 4, 8192, out result2, ref result))
751 result.parsedGuid._b = (short)result2;
753 if (!StringToInt(guidString, ref num2, 4, 8192, out result2, ref result))
757 result.parsedGuid._c = (short)result2;
759 if (!StringToInt(guidString, ref num2, 4, 8192, out result2, ref result))
765 if (!StringToLong(guidString, ref num2, 8192, out
long result3, ref result))
769 if (num2 - num != 12)
771 result.SetFailure(ParseFailureKind.Format,
"Format_GuidInvLen");
774 result.parsedGuid._d = (byte)(result2 >> 8);
775 result.parsedGuid._e = (byte)result2;
776 result2 = (int)(result3 >> 32);
777 result.parsedGuid._f = (byte)(result2 >> 8);
778 result.parsedGuid._g = (byte)result2;
779 result2 = (int)result3;
780 result.parsedGuid._h = (byte)(result2 >> 24);
781 result.parsedGuid._i = (byte)(result2 >> 16);
782 result.parsedGuid._j = (byte)(result2 >> 8);
783 result.parsedGuid._k = (byte)result2;
787 [SecuritySafeCritical]
788 private static bool StringToShort(
string str,
int requiredLength,
int flags, out
short result, ref GuidResult parseResult)
790 return StringToShort(str,
null, requiredLength, flags, out result, ref parseResult);
793 [SecuritySafeCritical]
794 private unsafe
static bool StringToShort(
string str, ref
int parsePos,
int requiredLength,
int flags, out
short result, ref GuidResult parseResult)
796 fixed (
int* parsePos2 = &parsePos)
798 return StringToShort(str, parsePos2, requiredLength, flags, out result, ref parseResult);
803 private unsafe
static bool StringToShort(
string str,
int* parsePos,
int requiredLength,
int flags, out
short result, ref GuidResult parseResult)
807 bool result3 = StringToInt(str, parsePos, requiredLength, flags, out result2, ref parseResult);
808 result = (short)result2;
812 [SecuritySafeCritical]
813 private static bool StringToInt(
string str,
int requiredLength,
int flags, out
int result, ref GuidResult parseResult)
815 return StringToInt(str,
null, requiredLength, flags, out result, ref parseResult);
818 [SecuritySafeCritical]
819 private unsafe
static bool StringToInt(
string str, ref
int parsePos,
int requiredLength,
int flags, out
int result, ref GuidResult parseResult)
821 fixed (
int* parsePos2 = &parsePos)
823 return StringToInt(str, parsePos2, requiredLength, flags, out result, ref parseResult);
828 private unsafe
static bool StringToInt(
string str,
int* parsePos,
int requiredLength,
int flags, out
int result, ref GuidResult parseResult)
831 int num = (parsePos !=
null) ? (*parsePos) : 0;
834 result = ParseNumbers.StringToInt(str, 16, flags, parsePos);
836 catch (OverflowException ex)
838 if (parseResult.throwStyle == GuidParseThrowStyle.All)
842 if (parseResult.throwStyle == GuidParseThrowStyle.AllButOverflow)
844 throw new FormatException(Environment.GetResourceString(
"Format_GuidUnrecognized"), ex);
846 parseResult.SetFailure(ex);
849 catch (Exception failure)
851 if (parseResult.throwStyle != 0)
855 parseResult.SetFailure(failure);
858 if (requiredLength != -1 && parsePos !=
null && *parsePos - num != requiredLength)
860 parseResult.SetFailure(ParseFailureKind.Format,
"Format_GuidInvalidChar");
866 [SecuritySafeCritical]
867 private static bool StringToLong(
string str,
int flags, out
long result, ref GuidResult parseResult)
869 return StringToLong(str,
null, flags, out result, ref parseResult);
872 [SecuritySafeCritical]
873 private unsafe
static bool StringToLong(
string str, ref
int parsePos,
int flags, out
long result, ref GuidResult parseResult)
875 fixed (
int* parsePos2 = &parsePos)
877 return StringToLong(str, parsePos2, flags, out result, ref parseResult);
881 [SecuritySafeCritical]
882 private unsafe
static bool StringToLong(
string str,
int* parsePos,
int flags, out
long result, ref GuidResult parseResult)
887 result = ParseNumbers.StringToLong(str, 16, flags, parsePos);
889 catch (OverflowException ex)
891 if (parseResult.throwStyle == GuidParseThrowStyle.All)
895 if (parseResult.throwStyle == GuidParseThrowStyle.AllButOverflow)
897 throw new FormatException(Environment.GetResourceString(
"Format_GuidUnrecognized"), ex);
899 parseResult.SetFailure(ex);
902 catch (Exception failure)
904 if (parseResult.throwStyle != 0)
908 parseResult.SetFailure(failure);
914 private static string EatAllWhitespace(
string str)
917 char[] array =
new char[str.Length];
918 foreach (
char c
in str)
920 if (!
char.IsWhiteSpace(c))
925 return new string(array, 0, num);
928 private static bool IsHexPrefix(
string str,
int i)
939 [__DynamicallyInvokable]
967 [__DynamicallyInvokable]
975 [__DynamicallyInvokable]
978 return _a ^ ((_b << 16) | (ushort)_c) ^ ((_f << 24) | _k);
985 [__DynamicallyInvokable]
988 if (o ==
null || !(o is
Guid))
1044 [__DynamicallyInvokable]
1094 private int GetResult(uint me, uint them)
1114 if (!(value is
Guid))
1121 return GetResult((uint)_a, (uint)guid._a);
1125 return GetResult((uint)_b, (uint)guid._b);
1129 return GetResult((uint)_c, (uint)guid._c);
1133 return GetResult(_d, guid._d);
1137 return GetResult(_e, guid._e);
1141 return GetResult(_f, guid._f);
1145 return GetResult(_g, guid._g);
1149 return GetResult(_h, guid._h);
1153 return GetResult(_i, guid._i);
1157 return GetResult(_j, guid._j);
1161 return GetResult(_k, guid._k);
1169 [__DynamicallyInvokable]
1174 return GetResult((uint)_a, (uint)value._a);
1178 return GetResult((uint)_b, (uint)value._b);
1182 return GetResult((uint)_c, (uint)value._c);
1186 return GetResult(_d, value._d);
1190 return GetResult(_e, value._e);
1194 return GetResult(_f, value._f);
1198 return GetResult(_g, value._g);
1202 return GetResult(_h, value._h);
1206 return GetResult(_i, value._i);
1210 return GetResult(_j, value._j);
1214 return GetResult(_k, value._k);
1224 [__DynamicallyInvokable]
1279 [__DynamicallyInvokable]
1287 [SecuritySafeCritical]
1288 [__DynamicallyInvokable]
1299 [__DynamicallyInvokable]
1305 private static char HexToChar(
int a)
1308 return (
char)((a > 9) ? (a - 10 + 97) : (a + 48));
1312 private unsafe
static int HexsToChars(
char* guidChars,
int offset,
int a,
int b)
1314 return HexsToChars(guidChars, offset, a, b, hex:
false);
1318 private unsafe
static int HexsToChars(
char* guidChars,
int offset,
int a,
int b,
bool hex)
1322 guidChars[offset++] =
'0';
1323 guidChars[offset++] =
'x';
1325 guidChars[offset++] = HexToChar(a >> 4);
1326 guidChars[offset++] = HexToChar(a);
1329 guidChars[offset++] =
',';
1330 guidChars[offset++] =
'0';
1331 guidChars[offset++] =
'x';
1333 guidChars[offset++] = HexToChar(b >> 4);
1334 guidChars[offset++] = HexToChar(b);
1343 [SecuritySafeCritical]
1346 if (format ==
null || format.Length == 0)
1353 if (format.Length != 1)
1362 text =
string.FastAllocateString(36);
1366 text =
string.FastAllocateString(32);
1371 text =
string.FastAllocateString(38);
1372 fixed (
char* ptr3 = text)
1380 text =
string.FastAllocateString(38);
1381 fixed (
char* ptr2 = text)
1389 text =
string.FastAllocateString(68);
1390 fixed (
char* ptr = text)
1401 fixed (
char* ptr4 = text)
1407 num = HexsToChars(ptr4, num, _a >> 24, _a >> 16);
1408 num = HexsToChars(ptr4, num, _a >> 8, _a);
1412 num = HexsToChars(ptr4, num, _b >> 8, _b);
1416 num = HexsToChars(ptr4, num, _c >> 8, _c);
1419 num = HexsToChars(ptr4, num, _d, _e, hex:
true);
1421 num = HexsToChars(ptr4, num, _f, _g, hex:
true);
1423 num = HexsToChars(ptr4, num, _h, _i, hex:
true);
1425 num = HexsToChars(ptr4, num, _j, _k, hex:
true);
1430 num = HexsToChars(ptr4, num, _a >> 24, _a >> 16);
1431 num = HexsToChars(ptr4, num, _a >> 8, _a);
1436 num = HexsToChars(ptr4, num, _b >> 8, _b);
1441 num = HexsToChars(ptr4, num, _c >> 8, _c);
1446 num = HexsToChars(ptr4, num, _d, _e);
1451 num = HexsToChars(ptr4, num, _f, _g);
1452 num = HexsToChars(ptr4, num, _h, _i);
1453 num = HexsToChars(ptr4, num, _j, _k);
static CultureInfo InvariantCulture
Gets the T:System.Globalization.CultureInfo object that is culture-independent (invariant).
static bool operator !=(Guid a, Guid b)
Indicates whether the values of two specified T:System.Guid objects are not equal.
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
Guid(uint a, ushort b, ushort c, byte d, byte e, byte f, byte g, byte h, byte i, byte j, byte k)
Initializes a new instance of the T:System.Guid structure by using the specified unsigned integers an...
No initialization action.
static Guid NewGuid()
Initializes a new instance of the T:System.Guid structure.
Defines a generalized type-specific comparison method that a value type or class implements to order ...
byte [] ToByteArray()
Returns a 16-element byte array that contains the value of this instance.
Guid(int a, short b, short c, byte[] d)
Initializes a new instance of the T:System.Guid structure by using the specified integers and byte ar...
Provides information about, and means to manipulate, the current environment and platform....
Represents a globally unique identifier (GUID).To browse the .NET Framework source code for this type...
int CompareTo(Guid value)
Compares this instance to a specified T:System.Guid object and returns an indication of their relativ...
unsafe string ToString(string format, IFormatProvider provider)
Returns a string representation of the value of this instance of the T:System.Guid class,...
Attribute can be applied to any application element.
A cast or conversion operation, such as (SampleType)obj in C::or CType(obj, SampleType) in Visual Bas...
Guid(byte[] b)
Initializes a new instance of the T:System.Guid structure by using the specified array of bytes.
static bool TryParseExact(string input, string format, out Guid result)
Converts the string representation of a GUID to the equivalent T:System.Guid structure,...
override string ToString()
Returns a string representation of the value of this instance in registry format.
static void ThrowExceptionForHR(int errorCode)
Throws an exception with a specific failure HRESULT value.
A platform-specific type that is used to represent a pointer or a handle.
static Guid Parse(string input)
Converts the string representation of a GUID to the equivalent T:System.Guid structure.
Guid(string g)
Initializes a new instance of the T:System.Guid structure by using the value represented by the speci...
Provides a collection of methods for allocating unmanaged memory, copying unmanaged memory blocks,...
override bool Equals(object o)
Returns a value that indicates whether this instance is equal to a specified object.
static bool TryParse(string input, out Guid result)
Converts the string representation of a GUID to the equivalent T:System.Guid structure.
string ToString(string format)
Returns a string representation of the value of this T:System.Guid instance, according to the provide...
int CompareTo(object value)
Compares this instance to a specified object and returns an indication of their relative values.
The exception that is thrown when one of the arguments provided to a method is not valid.
override int GetHashCode()
Returns the hash code for this instance.
Represents errors that occur during application execution.To browse the .NET Framework source code fo...
Defines a generalized method that a value type or class implements to create a type-specific method f...
Specifies that the class can be serialized.
Guid(int a, short b, short c, byte d, byte e, byte f, byte g, byte h, byte i, byte j, byte k)
Initializes a new instance of the T:System.Guid structure by using the specified integers and bytes.
static readonly Guid Empty
A read-only instance of the T:System.Guid structure whose value is all zeros.
Provides information about a specific culture (called a locale for unmanaged code development)....
static Guid ParseExact(string input, string format)
Converts the string representation of a GUID to the equivalent T:System.Guid structure,...
static bool operator==(Guid a, Guid b)
Indicates whether the values of two specified T:System.Guid objects are equal.
bool Equals(Guid g)
Returns a value indicating whether this instance and a specified T:System.Guid object represent the s...