|
1411 | 1411 | ## Examples |
1412 | 1412 | The following code example defines a method named `PointFToPoint` that converts a <xref:System.Drawing.PointF> structure to a <xref:System.Drawing.Point> structure. The example then creates an array of <xref:System.Drawing.PointF> structures, creates a `Converter<PointF, Point>` delegate (`Converter(Of PointF, Point)` in Visual Basic) to represent the `PointFToPoint` method, and passes the delegate to the <xref:System.Array.ConvertAll%2A> method. The <xref:System.Array.ConvertAll%2A> method passes each element of the input list to the `PointFToPoint` method and puts the converted elements into a new list of <xref:System.Drawing.Point> structures. Both lists are displayed. |
1413 | 1413 |
|
1414 | | - [!code-cpp[Array_ConvertAll#1](~/samples/snippets/cpp/VS_Snippets_CLR/Array_ConvertAll/cpp/source.cpp#1)] |
1415 | | - [!code-csharp[Array_ConvertAll#1](~/samples/snippets/csharp/VS_Snippets_CLR/Array_ConvertAll/cs/source.cs#1)] |
1416 | | - [!code-vb[Array_ConvertAll#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/Array_ConvertAll/vb/source.vb#1)] |
| 1414 | + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/Array_ConvertAll/cpp/source.cpp" id="Snippet1"::: |
| 1415 | + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/Array_ConvertAll/cs/source.cs" interactive="try-dotnet" id="Snippet1"::: |
| 1416 | + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/Array_ConvertAll/vb/source.vb" id="Snippet1"::: |
1417 | 1417 |
|
1418 | 1418 | ]]></format> |
1419 | 1419 | </remarks> |
@@ -6642,6 +6642,17 @@ int[,,] TDArray = new int[1,1,1]; |
6642 | 6642 | </AssemblyInfo> |
6643 | 6643 | <Docs> |
6644 | 6644 | <summary>Sets the specified element in the current <see cref="T:System.Array" /> to the specified value.</summary> |
| 6645 | + <remarks> |
| 6646 | + <format type="text/markdown"><![CDATA[ |
| 6647 | +## Examples |
| 6648 | + The following code example demonstrates how to set and get a specific value in a one-dimensional or multidimensional array. |
| 6649 | + |
| 6650 | + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Array_GetSetValue/CPP/array_getsetvalue.cpp" id="Snippet1"::: |
| 6651 | + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Array_GetSetValue/CS/array_getsetvalue.cs" interactive="try-dotnet" id="Snippet1"::: |
| 6652 | + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Array_GetSetValue/VB/array_getsetvalue.vb" id="Snippet1"::: |
| 6653 | + |
| 6654 | + ]]></format> |
| 6655 | + </remarks> |
6645 | 6656 | </Docs> |
6646 | 6657 | </MemberGroup> |
6647 | 6658 | <Member MemberName="SetValue"> |
@@ -6705,13 +6716,6 @@ int[,,] TDArray = new int[1,1,1]; |
6705 | 6716 |
|
6706 | 6717 |
|
6707 | 6718 |
|
6708 | | -## Examples |
6709 | | - The following code example demonstrates how to set and get a specific value in a one-dimensional or multidimensional array. |
6710 | | - |
6711 | | - [!code-cpp[System.Array_GetSetValue#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Array_GetSetValue/CPP/array_getsetvalue.cpp#1)] |
6712 | | - [!code-csharp[System.Array_GetSetValue#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Array_GetSetValue/CS/array_getsetvalue.cs#1)] |
6713 | | - [!code-vb[System.Array_GetSetValue#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Array_GetSetValue/VB/array_getsetvalue.vb#1)] |
6714 | | - |
6715 | 6719 | ]]></format> |
6716 | 6720 | </remarks> |
6717 | 6721 | <exception cref="T:System.ArgumentException">The current <see cref="T:System.Array" /> does not have exactly one dimension.</exception> |
@@ -6797,13 +6801,6 @@ int[,,] TDArray = new int[1,1,1]; |
6797 | 6801 |
|
6798 | 6802 |
|
6799 | 6803 |
|
6800 | | -## Examples |
6801 | | - The following code example demonstrates how to set and get a specific value in a one-dimensional or multidimensional array. |
6802 | | - |
6803 | | - [!code-cpp[System.Array_GetSetValue#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Array_GetSetValue/CPP/array_getsetvalue.cpp#1)] |
6804 | | - [!code-csharp[System.Array_GetSetValue#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Array_GetSetValue/CS/array_getsetvalue.cs#1)] |
6805 | | - [!code-vb[System.Array_GetSetValue#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Array_GetSetValue/VB/array_getsetvalue.vb#1)] |
6806 | | - |
6807 | 6804 | ]]></format> |
6808 | 6805 | </remarks> |
6809 | 6806 | <exception cref="T:System.ArgumentNullException"> |
@@ -6876,13 +6873,6 @@ int[,,] TDArray = new int[1,1,1]; |
6876 | 6873 |
|
6877 | 6874 |
|
6878 | 6875 |
|
6879 | | -## Examples |
6880 | | - The following code example demonstrates how to set and get a specific value in a one-dimensional or multidimensional array. |
6881 | | - |
6882 | | - [!code-cpp[System.Array_GetSetValue#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Array_GetSetValue/CPP/array_getsetvalue.cpp#1)] |
6883 | | - [!code-csharp[System.Array_GetSetValue#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Array_GetSetValue/CS/array_getsetvalue.cs#1)] |
6884 | | - [!code-vb[System.Array_GetSetValue#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Array_GetSetValue/VB/array_getsetvalue.vb#1)] |
6885 | | - |
6886 | 6876 | ]]></format> |
6887 | 6877 | </remarks> |
6888 | 6878 | <exception cref="T:System.ArgumentException">The current <see cref="T:System.Array" /> does not have exactly one dimension.</exception> |
@@ -6963,13 +6953,6 @@ int[,,] TDArray = new int[1,1,1]; |
6963 | 6953 |
|
6964 | 6954 |
|
6965 | 6955 |
|
6966 | | -## Examples |
6967 | | - The following code example demonstrates how to set and get a specific value in a one-dimensional or multidimensional array. |
6968 | | - |
6969 | | - [!code-cpp[System.Array_GetSetValue#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Array_GetSetValue/CPP/array_getsetvalue.cpp#1)] |
6970 | | - [!code-csharp[System.Array_GetSetValue#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Array_GetSetValue/CS/array_getsetvalue.cs#1)] |
6971 | | - [!code-vb[System.Array_GetSetValue#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Array_GetSetValue/VB/array_getsetvalue.vb#1)] |
6972 | | - |
6973 | 6956 | ]]></format> |
6974 | 6957 | </remarks> |
6975 | 6958 | <exception cref="T:System.ArgumentNullException"> |
@@ -7044,13 +7027,6 @@ int[,,] TDArray = new int[1,1,1]; |
7044 | 7027 |
|
7045 | 7028 |
|
7046 | 7029 |
|
7047 | | -## Examples |
7048 | | - The following code example demonstrates how to set and get a specific value in a one-dimensional or multidimensional array. |
7049 | | - |
7050 | | - [!code-cpp[System.Array_GetSetValue#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Array_GetSetValue/CPP/array_getsetvalue.cpp#1)] |
7051 | | - [!code-csharp[System.Array_GetSetValue#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Array_GetSetValue/CS/array_getsetvalue.cs#1)] |
7052 | | - [!code-vb[System.Array_GetSetValue#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Array_GetSetValue/VB/array_getsetvalue.vb#1)] |
7053 | | - |
7054 | 7030 | ]]></format> |
7055 | 7031 | </remarks> |
7056 | 7032 | <exception cref="T:System.ArgumentException">The current <see cref="T:System.Array" /> does not have exactly two dimensions.</exception> |
@@ -7123,13 +7099,6 @@ int[,,] TDArray = new int[1,1,1]; |
7123 | 7099 |
|
7124 | 7100 |
|
7125 | 7101 |
|
7126 | | -## Examples |
7127 | | - The following code example demonstrates how to set and get a specific value in a one-dimensional or multidimensional array. |
7128 | | - |
7129 | | - [!code-cpp[System.Array_GetSetValue#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Array_GetSetValue/CPP/array_getsetvalue.cpp#1)] |
7130 | | - [!code-csharp[System.Array_GetSetValue#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Array_GetSetValue/CS/array_getsetvalue.cs#1)] |
7131 | | - [!code-vb[System.Array_GetSetValue#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Array_GetSetValue/VB/array_getsetvalue.vb#1)] |
7132 | | - |
7133 | 7102 | ]]></format> |
7134 | 7103 | </remarks> |
7135 | 7104 | <exception cref="T:System.ArgumentException">The current <see cref="T:System.Array" /> does not have exactly two dimensions.</exception> |
@@ -7203,14 +7172,6 @@ int[,,] TDArray = new int[1,1,1]; |
7203 | 7172 | > If <xref:System.Array.SetValue%2A> is used to assign `null` to an element of an array of value types, all fields of the element are initialized to zero. The value of the element is not a null reference, and cannot be found by searching for a null reference. |
7204 | 7173 |
|
7205 | 7174 |
|
7206 | | - |
7207 | | -## Examples |
7208 | | - The following code example demonstrates how to set and get a specific value in a one-dimensional or multidimensional array. |
7209 | | - |
7210 | | - [!code-cpp[System.Array_GetSetValue#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Array_GetSetValue/CPP/array_getsetvalue.cpp#1)] |
7211 | | - [!code-csharp[System.Array_GetSetValue#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Array_GetSetValue/CS/array_getsetvalue.cs#1)] |
7212 | | - [!code-vb[System.Array_GetSetValue#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Array_GetSetValue/VB/array_getsetvalue.vb#1)] |
7213 | | - |
7214 | 7175 | ]]></format> |
7215 | 7176 | </remarks> |
7216 | 7177 | <exception cref="T:System.ArgumentException">The current <see cref="T:System.Array" /> does not have exactly three dimensions.</exception> |
@@ -7286,13 +7247,6 @@ int[,,] TDArray = new int[1,1,1]; |
7286 | 7247 |
|
7287 | 7248 |
|
7288 | 7249 |
|
7289 | | -## Examples |
7290 | | - The following code example demonstrates how to set and get a specific value in a one-dimensional or multidimensional array. |
7291 | | - |
7292 | | - [!code-cpp[System.Array_GetSetValue#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Array_GetSetValue/CPP/array_getsetvalue.cpp#1)] |
7293 | | - [!code-csharp[System.Array_GetSetValue#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Array_GetSetValue/CS/array_getsetvalue.cs#1)] |
7294 | | - [!code-vb[System.Array_GetSetValue#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Array_GetSetValue/VB/array_getsetvalue.vb#1)] |
7295 | | - |
7296 | 7250 | ]]></format> |
7297 | 7251 | </remarks> |
7298 | 7252 | <exception cref="T:System.ArgumentException">The current <see cref="T:System.Array" /> does not have exactly three dimensions.</exception> |
|
0 commit comments