|
347 | 347 | </AssemblyInfo>
|
348 | 348 | <Docs>
|
349 | 349 | <summary>Returns a value indicating whether two instances of <see cref="T:System.Byte" /> represent the same value.</summary>
|
| 350 | + <remarks> |
| 351 | + <format type="text/markdown"><![CDATA[ |
| 352 | +
|
| 353 | +## Examples |
| 354 | + The following code example determines whether the first <xref:System.Byte> value is equal to the second <xref:System.Byte> value, and whether the first <xref:System.Byte> value is equal to the boxed version of the second <xref:System.Byte> value. |
| 355 | + |
| 356 | + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.byte.equals/cpp/eq.cpp" id="Snippet1"::: |
| 357 | + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.byte.equals/cs/eq.cs" interactive="try-dotnet" id="Snippet1"::: |
| 358 | + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.byte.equals/vb/eq.vb" id="Snippet1"::: |
| 359 | + |
| 360 | + ]]></format> |
| 361 | + </remarks> |
350 | 362 | </Docs>
|
351 | 363 | </MemberGroup>
|
352 | 364 | <Member MemberName="Equals">
|
|
398 | 410 |
|
399 | 411 | ## Remarks
|
400 | 412 | This method implements the <xref:System.IEquatable%601?displayProperty=nameWithType> interface, and performs slightly better than <xref:System.Byte.Equals%28System.Object%29> because it does not have to convert the `obj` parameter to an object.
|
401 |
| - |
402 |
| - |
403 |
| - |
404 |
| -## Examples |
405 |
| - The following code example determines whether the first <xref:System.Byte> value is equal to the second <xref:System.Byte> value, and whether the first <xref:System.Byte> value is equal to the boxed version of the second <xref:System.Byte> value. |
406 |
| - |
407 |
| - [!code-cpp[system.byte.equals#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.byte.equals/cpp/eq.cpp#1)] |
408 |
| - [!code-csharp[system.byte.equals#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.byte.equals/cs/eq.cs#1)] |
409 |
| - [!code-vb[system.byte.equals#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.byte.equals/vb/eq.vb#1)] |
410 |
| - |
| 413 | + |
411 | 414 | ]]></format>
|
412 | 415 | </remarks>
|
413 | 416 | <altmember cref="M:System.Byte.Equals(System.Object)" />
|
|
457 | 460 | <see langword="true" /> if <paramref name="obj" /> is an instance of <see cref="T:System.Byte" /> and equals the value of this instance; otherwise, <see langword="false" />.</returns>
|
458 | 461 | <remarks>
|
459 | 462 | <format type="text/markdown"><] |
465 |
| - [!code-csharp[system.byte.equals#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.byte.equals/cs/eq.cs#1)] |
466 |
| - [!code-vb[system.byte.equals#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.byte.equals/vb/eq.vb#1)] |
467 |
| - |
| 463 | +
|
468 | 464 | ]]></format>
|
469 | 465 | </remarks>
|
470 | 466 | <altmember cref="M:System.Byte.CompareTo(System.Object)" />
|
|
746 | 742 | ## Examples
|
747 | 743 | The following example demonstrates how to convert a string value into a byte value using the <xref:System.Byte.Parse%28System.St
8000
ring%29?displayProperty=nameWithType> method. The resulting byte value is then displayed to the console.
|
748 | 744 |
|
749 |
| - [!code-cpp[System.Byte.Parse#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Byte.Parse/cpp/parse.cpp#1)] |
750 |
| - [!code-csharp[System.Byte.Parse#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Byte.Parse/CS/parse.cs#1)] |
751 |
| - [!code-vb[System.Byte.Parse#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Byte.Parse/VB/parse.vb#1)] |
| 745 | + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Byte.Parse/cpp/parse.cpp" id="Snippet1"::: |
| 746 | + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Byte.Parse/CS/parse.cs" interactive="try-dotnet-method" id="Snippet1"::: |
| 747 | + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Byte.Parse/VB/parse.vb" id="Snippet1"::: |
752 | 748 |
|
753 | 749 | ]]></format>
|
754 | 750 | </remarks>
|
|
862 | 858 | ## Examples
|
863 | 859 | The following example parses string representations of `Byte` values with the <xref:System.Byte.Parse%28System.String%2CSystem.Globalization.NumberStyles%29?displayProperty=nameWithType> method. The current culture for the example is en-US.
|
864 | 860 |
|
865 |
| - [!code-cpp[System.Byte.Parse#3](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Byte.Parse/cpp/parse.cpp#3)] |
866 |
| - [!code-csharp[System.Byte.Parse#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Byte.Parse/CS/parse.cs#3)] |
867 |
| - [!code-vb[System.Byte.Parse#3](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Byte.Parse/VB/parse.vb#3)] |
| 861 | + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Byte.Parse/cpp/parse.cpp" id="Snippet3"::: |
| 862 | + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Byte.Parse/CS/parse.cs" interactive="try-dotnet-method" id="Snippet3"::: |
| 863 | + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Byte.Parse/VB/parse.vb" id="Snippet3"::: |
868 | 864 |
|
869 | 865 | ]]></format>
|
870 | 866 | </remarks>
|
|
962 | 958 | ## Examples
|
963 | 959 | The following example parses string representations of `Byte` values with the <xref:System.Byte.Parse%2A> method.
|
964 | 960 |
|
965 |
| - [!code-cpp[System.Byte.Parse#2](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Byte.Parse/cpp/parse.cpp#2)] |
966 |
| - [!code-csharp[System.Byte.Parse#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Byte.Parse/CS/parse.cs#2)] |
967 |
| - [!code-vb[System.Byte.Parse#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Byte.Parse/VB/parse.vb#2)] |
| 961 | + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Byte.Parse/cpp/parse.cpp" id="Snippet2"::: |
| 962 | + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Byte.Parse/CS/parse.cs" interactive="try-dotnet-method" id="Snippet2"::: |
| 963 | + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Byte.Parse/VB/parse.vb" id="Snippet2"::: |
968 | 964 |
|
969 | 965 | ]]></format>
|
970 | 966 | </remarks>
|
|
1118 | 1114 | ## Examples
|
1119 | 1115 | The following code example parses string representations of `Byte` values with this overload of the <xref:System.Byte.Parse%28System.String%2CSystem.Globalization.NumberStyles%2CSystem.IFormatProvider%29?displayProperty=nameWithType> method.
|
1120 | 1116 |
|
1121 |
| - [!code-cpp[System.Byte.Parse#4](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Byte.Parse/cpp/parse.cpp#4)] |
1122 |
| - [!code-csharp[System.Byte.Parse#4](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Byte.Parse/CS/parse.cs#4)] |
1123 |
| - [!code-vb[System.Byte.Parse#4](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Byte.Parse/VB/parse.vb#4)] |
| 1117 | + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Byte.Parse/cpp/parse.cpp" id="Snippet4"::: |
| 1118 | + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Byte.Parse/CS/parse.cs" interactive="try-dotnet-method" id="Snippet4"::: |
| 1119 | + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Byte.Parse/VB/parse.vb" id="Snippet4"::: |
1124 | 1120 |
|
1125 | 1121 | ]]></format>
|
1126 | 1122 | </remarks>
|
@@ -2117,9 +2113,9 @@ This member is an explicit interface member implementation. It can be used only
|
2117 | 2113 | ## Examples
|
2118 | 2114 | The following example displays an array of byte values. Note that the <xref:System.Byte.ToString> method is not called explicitly in the example. Instead, it is called implicitly, because of the use of the [composite formatting](/dotnet/standard/base-types/composite-formatting) feature.
|
2119 | 2115 |
|
2120 |
| - [!code-cpp[System.Byte.ToString#2](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Byte.ToString/CPP/newbytemembers2.cpp#2)] |
2121 |
| - [!code-csharp[System.Byte.ToString#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Byte.ToString/CS/NewByteMembers.cs#2)] |
2122 |
| - [!code-vb[System.Byte.ToString#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Byte.ToString/VB/NewByteMembers.vb#2)] |
| 2116 | + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Byte.ToString/CPP/newbytemembers2.cpp" id="Snippet2"::: |
| 2117 | + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Byte.ToString/CS/NewByteMembers.cs" interactive="try-dotnet-method" id="Snippet2"::: |
| 2118 | + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Byte.ToString/VB/NewByteMembers.vb" id="Snippet2"::: |
2123 | 2119 |
|
2124 | 2120 | ]]></format>
|
2125 | 2121 | </remarks>
|
@@ -2203,9 +2199,9 @@ This member is an explicit interface member imp
F438
lementation. It can be used only
|
2203 | 2199 | ## Examples
|
2204 | 2200 | The following example iterates an array of byte values and displays each of them to the console by calling the <xref:System.Byte.ToString%28System.IFormatProvider%29> method with different format providers.
|
2205 | 2201 |
|
2206 |
| - [!code-cpp[System.Byte.ToString#3](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Byte.ToString/CPP/newbytemembers.cpp#3)] |
2207 |
| - [!code-csharp[System.Byte.ToString#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Byte.ToString/CS/NewByteMembers.cs#3)] |
2208 |
| - [!code-vb[System.Byte.ToString#3](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Byte.ToString/VB/NewByteMembers.vb#3)] |
| 2202 | + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Byte.ToString/CPP/newbytemembers.cpp" id="Snippet3"::: |
| 2203 | + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Byte.ToString/CS/NewByteMembers.cs" interactive="try-dotnet-method" id="Snippet3"::: |
| 2204 | + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Byte.ToString/VB/NewByteMembers.vb" id="Snippet3"::: |
2209 | 2205 |
|
2210 | 2206 | ]]></format>
|
2211 | 2207 | </remarks>
|
@@ -2371,9 +2367,9 @@ This member is an explicit interface member implementation. It can be used only
|
2371 | 2367 | ## Examples
|
2372 | 2368 | The following example uses the standard "N" format string and four different <xref:System.Globalization.CultureInfo> objects to display the string representation of a byte value to the console.
|
2373 | 2369 |
|
2374 |
| - [!code-cpp[System.Byte.ToString#5](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Byte.ToString/CPP/newbytemembers2.cpp#5)] |
2375 |
| - [!code-csharp[System.Byte.ToString#5](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Byte.ToString/CS/NewByteMembers.cs#5)] |
2376 |
| - [!code-vb[System.Byte.ToString#5](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Byte.ToString/VB/NewByteMembers.vb#5)] |
| 2370 | + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Byte.ToString/CPP/newbytemembers2.cpp" id="Snippet5"::: |
| 2371 | + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Byte.ToString/CS/NewByteMembers.cs" interactive="try-dotnet-method" id="Snippet5"::: |
| 2372 | + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Byte.ToString/VB/NewByteMembers.vb" id="Snippet5"::: |
2377 | 2373 |
|
2378 | 2374 | ]]></format>
|
2379 | 2375 | </remarks>
|
@@ -2557,9 +2553,9 @@ This member is an explicit interface member implementation. It can be used only
|
2557 | 2553 | ## Examples
|
2558 | 2554 | The following example calls the <xref:System.Byte.TryParse%28System.String%2CSystem.Byte%40%29> method with a number of different string values.
|
2559 | 2555 |
|
2560 |
| - [!code-cpp[System.Byte.TryParse#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Byte.TryParse/cpp/tryparse.cpp#1)] |
2561 |
| - [!code-csharp[System.Byte.TryParse#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Byte.TryParse/cs/TryParse.cs#1)] |
2562 |
| - [!code-vb[System.Byte.TryParse#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Byte.TryParse/vb/TryParse.vb#1)] |
| 2556 | + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Byte.TryParse/cpp/tryparse.cpp" id="Snippet1"::: |
| 2557 | + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Byte.TryParse/cs/TryParse.cs" interactive="try-dotnet" id="Snippet1"::: |
| 2558 | + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Byte.TryParse/vb/TryParse.vb" id="Snippet1"::: |
2563 | 2559 |
|
2564 | 2560 | ]]></format>
|
2565 | 2561 | </remarks>
|
@@ -2711,9 +2707,9 @@ This member is an explicit interface member implementation. It can be used only
|
2711 | 2707 | ## Examples
|
2712 | 2708 | The following example calls the <xref:System.Byte.TryParse%28System.String%2CSystem.Globalization.NumberStyles%2CSystem.IFormatProvider%2CSystem.Byte%40%29> method with a number of different string values.
|
2713 | 2709 |
|
2714 |
| - [!code-cpp[System.Byte.TryParse#2](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Byte.TryParse/cpp/tryparse2.cpp#2)] |
2715 |
| - [!code-csharp[System.Byte.TryParse#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Byte.TryParse/cs/TryParse2.cs#2)] |
2716 |
| - [!code-vb[System.Byte.TryParse#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Byte.TryParse/vb/TryParse2.vb#2)] |
| 2710 | + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Byte.TryParse/cpp/tryparse2.cpp" id="Snippet2"::: |
| 2711 | + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Byte.TryParse/cs/TryParse2.cs" interactive="try-dotnet" id="Snippet2"::: |
| 2712 | + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Byte.TryParse/vb/TryParse2.vb" id="Snippet2"::: |
2717 | 2713 |
|
2718 | 2714 | ]]></format>
|
2719 | 2715 | </remarks>
|
|
0 commit comments