Definition at line 924 of file Guid.cs.
925 {
927 {
929 }
931 {
932 throw new FormatException(SR.Format_InvalidGuidFormatSpecification);
933 }
934 bool flag = true;
935 bool flag2 = false;
936 int num = 0;
937 int num2;
939 {
940 case 'D':
941 case 'd':
942 num2 = 36;
943 break;
944 case 'N':
945 case 'n':
946 flag = false;
947 num2 = 32;
948 break;
949 case 'B':
950 case 'b':
951 num = 8192123;
952 num2 = 38;
953 break;
954 case 'P':
955 case 'p':
956 num = 2687016;
957 num2 = 38;
958 break;
959 case 'X':
960 case 'x':
961 num = 8192123;
962 flag = false;
963 flag2 = true;
964 num2 = 68;
965 break;
966 default:
967 throw new FormatException(SR.Format_InvalidGuidFormatSpecification);
968 }
970 {
971 charsWritten = 0;
972 return false;
973 }
975 {
976 char* ptr2 = ptr;
977 if (num != 0)
978 {
979 *(ptr2++) = (char)num;
980 }
981 if (flag2)
982 {
983 *(ptr2++) = '0';
984 *(ptr2++) = 'x';
987 *(ptr2++) = ',';
988 *(ptr2++) = '0';
989 *(ptr2++) = 'x';
991 *(ptr2++) = ',';
992 *(ptr2++) = '0';
993 *(ptr2++) = 'x';
995 *(ptr2++) = ',';
996 *(ptr2++) = '{';
998 *(ptr2++) = ',';
1000 *(ptr2++) = ',';
1002 *(ptr2++) = ',';
1004 *(ptr2++) = '}';
1005 }
1006 else
1007 {
1010 if (flag)
1011 {
1012 *(ptr2++) = '-';
1013 }
1015 if (flag)
1016 {
1017 *(ptr2++) = '-';
1018 }
1020 if (flag)
1021 {
1022 *(ptr2++) = '-';
1023 }
1025 if (flag)
1026 {
1027 *(ptr2++) = '-';
1028 }
1032 }
1033 if (num != 0)
1034 {
1035 *(ptr2++) = (char)(num >> 16);
1036 }
1037 }
1038 charsWritten = num2;
1039 return true;
1040 }
static unsafe int HexsToChars(char *guidChars, int a, int b)
static unsafe int HexsToCharsHexOutput(char *guidChars, int a, int b)
References System.Guid._a, System.Guid._b, System.Guid._c, System.Guid._d, System.Guid._e, System.Guid._f, System.Guid._g, System.Guid._h, System.Guid._i, System.Guid._j, System.Guid._k, System.destination, System.format, System.SR.Format_InvalidGuidFormatSpecification, System.Guid.HexsToChars(), and System.Guid.HexsToCharsHexOutput().
Referenced by System.Guid.ToString(), and System.Guid.TryFormat().