Implements System.IFormattable.
Definition at line 884 of file Guid.cs.
885 {
886 if (
string.IsNullOrEmpty(
format))
887 {
889 }
891 {
892 throw new FormatException(SR.Format_InvalidGuidFormatSpecification);
893 }
896 {
897 case 'D':
898 case 'd':
900 break;
901 case 'N':
902 case 'n':
904 break;
905 case 'B':
906 case 'P':
907 case 'b':
908 case 'p':
910 break;
911 case 'X':
912 case 'x':
914 break;
915 default:
916 throw new FormatException(SR.Format_InvalidGuidFormatSpecification);
917 }
918 string text =
string.FastAllocateString(
length);
919 int charsWritten;
922 }
unsafe bool TryFormat(Span< char > destination, out int charsWritten, ReadOnlySpan< char > format=default(ReadOnlySpan< char >))
References System.format, System.SR.Format_InvalidGuidFormatSpecification, System.length, System.text, and System.Guid.TryFormat().