diff --git a/xml/System/Guid.xml b/xml/System/Guid.xml index 91f4494a96b..aef4ec1810f 100644 --- a/xml/System/Guid.xml +++ b/xml/System/Guid.xml @@ -242,7 +242,7 @@ ## Examples The following example passes each string listed in the Remarks section to the constructor. - [!code-csharp[System.Guid.ctor#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.guid.ctor/cs/ctor1.cs#1)] + [!code-csharp-interactive[System.Guid.ctor#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.guid.ctor/cs/ctor1.cs#1)] [!code-vb[System.Guid.ctor#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.guid.ctor/vb/ctor1.vb#1)] ]]> @@ -374,7 +374,7 @@ ## Examples The following example creates a GUID whose string representation is "0000000a-000b-000c-0001-020304050607". - [!code-csharp[System.Guid.Ctor#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.guid.ctor/cs/ctor2.cs#2)] + [!code-csharp-interactive[System.Guid.Ctor#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.guid.ctor/cs/ctor2.cs#2)] [!code-vb[System.Guid.Ctor#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.guid.ctor/vb/ctor2.vb#2)] ]]> @@ -688,7 +688,7 @@ ## Remarks You can compare a GUID with the value of the field to determine whether a GUID is non-zero. The following example uses the operator to compare two GUID values with to determine whether they consist exclusively of zeros. - [!code-csharp[System.Guid.Empty#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.guid.empty/cs/empty.cs#1)] + [!code-csharp-interactive[System.Guid.Empty#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.guid.empty/cs/empty.cs#1)] [!code-vb[System.Guid.Empty#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.guid.empty/vb/empty.vb#1)] ]]> @@ -904,8 +904,8 @@ ## Examples The following code example creates and displays the values of two objects. - - [!code-csharp[system.guid.newguid#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.guid.newguid/cs/ng.cs#1)] + + [!code-csharp-interactive[system.guid.newguid#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.guid.newguid/cs/ng.cs#1)] [!code-vb[system.guid.newguid#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.guid.newguid/vb/ng.vb#1)] ]]> @@ -960,7 +960,7 @@ ## Examples The following example uses the operator to compare two GUID values with to determine whether they consist exclusively of zeros. - [!code-csharp[System.Guid.Empty#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.guid.empty/cs/empty.cs#1)] + [!code-csharp-interactive[System.Guid.Empty#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.guid.empty/cs/empty.cs#1)] [!code-vb[System.Guid.Empty#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.guid.empty/vb/empty.vb#1)] ]]> @@ -1144,12 +1144,10 @@ After trimming, the length of the read-only character span is 0. Use the method to catch any unsuccessful parse operations without having to handle an exception. - - ## Examples The following example creates a new GUID, converts it to three separate string representations by calling the method with the "B", "D", and "X" format specifiers, and then calls the method to convert the strings back to values. - [!code-csharp[System.Guid.Parse#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.guid.parse/cs/parseex1.cs#3)] + [!code-csharp-interactive[System.Guid.Parse#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.guid.parse/cs/parseex1.cs#3)] [!code-vb[System.Guid.Parse#3](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.guid.parse/vb/parseex1.vb#3)] ]]> @@ -1265,12 +1263,10 @@ The method requires the read-only character spa |P|32 digits separated by hyphens, enclosed in parentheses:

(00000000-0000-0000-0000-000000000000)| |X|Four hexadecimal values enclosed in braces, where the fourth value is a subset of eight hexadecimal values that is also enclosed in braces:

{0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}| - - ## Examples The following example calls the method with each of the supported format specifiers to generate an array of strings that represent a single GUID. These are then passed to the method, which successfully parses only the string that conforms to the "B" format specifier. - [!code-csharp[System.Guid.Parse#4](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.guid.parse/cs/parseexactex1.cs#4)] + [!code-csharp-interactive[System.Guid.Parse#4](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.guid.parse/cs/parseexactex1.cs#4)] [!code-vb[System.Guid.Parse#4](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.guid.parse/vb/parseexactex1.vb#4)] ]]> @@ -1450,7 +1446,7 @@ Because the `provider` parameter is ignored, you cannot use it to provide a cust ## Examples The following example calls the method to create a value, and then calls the method to represent the value as a byte array. It then displays both values to the console. Finally, it instantiates a new value from the byte array and calls its method to show that the two values are identical. - [!code-csharp[System.Guid.ToByteArray#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.guid.tobytearray/cs/tobytearray3.cs#1)] + [!code-csharp-interactive[System.Guid.ToByteArray#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.guid.tobytearray/cs/tobytearray3.cs#1)] [!code-vb[System.Guid.ToByteArray#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.guid.tobytearray/vb/tobytearray3.vb#1)] ]]> @@ -1780,7 +1776,7 @@ Because the `provider` parameter is ignored, you cannot use it to provide a cust ## Examples The following example creates a new GUID, converts it to three separate string representations by calling the method with the "B", "D", and "X" format specifiers, and then calls the method to convert the strings back to values. - [!code-csharp[System.Guid.Parse#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.guid.parse/cs/tryparseex1.cs#2)] + [!code-csharp-interactive[System.Guid.Parse#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.guid.parse/cs/tryparseex1.cs#2)] [!code-vb[System.Guid.Parse#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.guid.parse/vb/tryparseex1.vb#2)] ]]> @@ -1887,8 +1883,8 @@ Because the `provider` parameter is ignored, you cannot use it to provide a cust ## Examples The following example calls the method with each of the supported format specifiers to generate an array of strings that represent a single GUID. These are then passed to the method, which successfully parses the string that conforms to the "B" format specifier. - - [!code-csharp[System.Guid.Parse#5](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.guid.parse/cs/tryparseexactex1.cs#5)] + + [!code-csharp-interactive[System.Guid.Parse#5](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.guid.parse/cs/tryparseexactex1.cs#5)] [!code-vb[System.Guid.Parse#5](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.guid.parse/vb/tryparseexactex1.vb#5)] ]]>