Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions xml/System.Linq/Queryable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -633,9 +633,9 @@
## Examples
The following code example demonstrates how to use <xref:System.Linq.Queryable.AsQueryable%60%601%28System.Collections.Generic.IEnumerable%7B%60%600%7D%29> to convert an <xref:System.Collections.Generic.IEnumerable%601> to an <xref:System.Linq.IQueryable%601>.

[!code-csharp[System.Linq.Queryable#125](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs#125)]
[!code-vb[System.Linq.Queryable#125](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb#125)]
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs" interactive="try-dotnet-method" id="Snippet125":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb" id="Snippet125":::

]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
Expand Down
74 changes: 14 additions & 60 deletions xml/System/Array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1411,9 +1411,9 @@
## Examples
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.

[!code-cpp[Array_ConvertAll#1](~/samples/snippets/cpp/VS_Snippets_CLR/Array_ConvertAll/cpp/source.cpp#1)]
[!code-csharp[Array_ConvertAll#1](~/samples/snippets/csharp/VS_Snippets_CLR/Array_ConvertAll/cs/source.cs#1)]
[!code-vb[Array_ConvertAll#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/Array_ConvertAll/vb/source.vb#1)]
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/Array_ConvertAll/cpp/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/Array_ConvertAll/cs/source.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/Array_ConvertAll/vb/source.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -6642,6 +6642,17 @@ int[,,] TDArray = new int[1,1,1];
</AssemblyInfo>
<Docs>
<summary>Sets the specified element in the current <see cref="T:System.Array" /> to the specified value.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to set and get a specific value in a one-dimensional or multidimensional array.

:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Array_GetSetValue/CPP/array_getsetvalue.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Array_GetSetValue/CS/array_getsetvalue.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Array_GetSetValue/VB/array_getsetvalue.vb" id="Snippet1":::

]]></format>
</remarks>
</Docs>
</MemberGroup>
<Member MemberName="SetValue">
Expand Down Expand Up @@ -6705,13 +6716,6 @@ int[,,] TDArray = new int[1,1,1];



## Examples
The following code example demonstrates how to set and get a specific value in a one-dimensional or multidimensional array.

[!code-cpp[System.Array_GetSetValue#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Array_GetSetValue/CPP/array_getsetvalue.cpp#1)]
[!code-csharp[System.Array_GetSetValue#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Array_GetSetValue/CS/array_getsetvalue.cs#1)]
[!code-vb[System.Array_GetSetValue#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Array_GetSetValue/VB/array_getsetvalue.vb#1)]

]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The current <see cref="T:System.Array" /> does not have exactly one dimension.</exception>
Expand Down Expand Up @@ -6797,13 +6801,6 @@ int[,,] TDArray = new int[1,1,1];



## Examples
The following code example demonstrates how to set and get a specific value in a one-dimensional or multidimensional array.

[!code-cpp[System.Array_GetSetValue#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Array_GetSetValue/CPP/array_getsetvalue.cpp#1)]
[!code-csharp[System.Array_GetSetValue#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Array_GetSetValue/CS/array_getsetvalue.cs#1)]
[!code-vb[System.Array_GetSetValue#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Array_GetSetValue/VB/array_getsetvalue.vb#1)]

]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
Expand Down Expand Up @@ -6876,13 +6873,6 @@ int[,,] TDArray = new int[1,1,1];



## Examples
The following code example demonstrates how to set and get a specific value in a one-dimensional or multidimensional array.

[!code-cpp[System.Array_GetSetValue#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Array_GetSetValue/CPP/array_getsetvalue.cpp#1)]
[!code-csharp[System.Array_GetSetValue#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Array_GetSetValue/CS/array_getsetvalue.cs#1)]
[!code-vb[System.Array_GetSetValue#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Array_GetSetValue/VB/array_getsetvalue.vb#1)]

]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The current <see cref="T:System.Array" /> does not have exactly one dimension.</exception>
Expand Down Expand Up @@ -6963,13 +6953,6 @@ int[,,] TDArray = new int[1,1,1];



## Examples
The following code example demonstrates how to set and get a specific value in a one-dimensional or multidimensional array.

[!code-cpp[System.Array_GetSetValue#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Array_GetSetValue/CPP/array_getsetvalue.cpp#1)]
[!code-csharp[System.Array_GetSetValue#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Array_GetSetValue/CS/array_getsetvalue.cs#1)]
[!code-vb[System.Array_GetSetValue#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Array_GetSetValue/VB/array_getsetvalue.vb#1)]

]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
Expand Down Expand Up @@ -7044,13 +7027,6 @@ int[,,] TDArray = new int[1,1,1];



## Examples
The following code example demonstrates how to set and get a specific value in a one-dimensional or multidimensional array.

[!code-cpp[System.Array_GetSetValue#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Array_GetSetValue/CPP/array_getsetvalue.cpp#1)]
[!code-csharp[System.Array_GetSetValue#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Array_GetSetValue/CS/array_getsetvalue.cs#1)]
[!code-vb[System.Array_GetSetValue#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Array_GetSetValue/VB/array_getsetvalue.vb#1)]

]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The current <see cref="T:System.Array" /> does not have exactly two dimensions.</exception>
Expand Down Expand Up @@ -7123,13 +7099,6 @@ int[,,] TDArray = new int[1,1,1];



## Examples
The following code example demonstrates how to set and get a specific value in a one-dimensional or multidimensional array.

[!code-cpp[System.Array_GetSetValue#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Array_GetSetValue/CPP/array_getsetvalue.cpp#1)]
[!code-csharp[System.Array_GetSetValue#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Array_GetSetValue/CS/array_getsetvalue.cs#1)]
[!code-vb[System.Array_GetSetValue#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Array_GetSetValue/VB/array_getsetvalue.vb#1)]

]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The current <see cref="T:System.Array" /> does not have exactly two dimensions.</exception>
Expand Down Expand Up @@ -7203,14 +7172,6 @@ int[,,] TDArray = new int[1,1,1];
> 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.



## Examples
The following code example demonstrates how to set and get a specific value in a one-dimensional or multidimensional array.

[!code-cpp[System.Array_GetSetValue#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Array_GetSetValue/CPP/array_getsetvalue.cpp#1)]
[!code-csharp[System.Array_GetSetValue#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Array_GetSetValue/CS/array_getsetvalue.cs#1)]
[!code-vb[System.Array_GetSetValue#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Array_GetSetValue/VB/array_getsetvalue.vb#1)]

]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The current <see cref="T:System.Array" /> does not have exactly three dimensions.</exception>
Expand Down Expand Up @@ -7286,13 +7247,6 @@ int[,,] TDArray = new int[1,1,1];



## Examples
The following code example demonstrates how to set and get a specific value in a one-dimensional or multidimensional array.

[!code-cpp[System.Array_GetSetValue#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Array_GetSetValue/CPP/array_getsetvalue.cpp#1)]
[!code-csharp[System.Array_GetSetValue#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Array_GetSetValue/CS/array_getsetvalue.cs#1)]
[!code-vb[System.Array_GetSetValue#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Array_GetSetValue/VB/array_getsetvalue.vb#1)]

]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The current <see cref="T:System.Array" /> does not have exactly three dimensions.</exception>
Expand Down
60 changes: 30 additions & 30 deletions xml/System/Attribute.xml
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,10 @@ When implementing your own class derived from <xref:System.Attribute>, you can o

## Examples
The following code example illustrates the use of the <xref:System.Attribute.GetCustomAttribute%2A> method taking an <xref:System.Reflection.Assembly> as a parameter.

[!code-cpp[IsDefined#1](~/samples/snippets/cpp/VS_Snippets_CLR/IsDefined/CPP/isdefined.cpp#1)]
[!code-csharp[IsDefined#1](~/samples/snippets/csharp/VS_Snippets_CLR/IsDefined/CS/id1.cs#1)]
[!code-vb[IsDefined#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/IsDefined/VB/id1.vb#1)]
 
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/IsDefined/CPP/isdefined.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/IsDefined/CS/id1.cs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/IsDefined/VB/id1.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -346,10 +346,10 @@ When implementing your own class derived from <xref:System.Attribute>, you can o

## Examples
The following code example illustrates the use of the <xref:System.Attribute.GetCustomAttribute%2A> method taking a <xref:System.Reflection.MemberInfo> as a parameter.

[!code-cpp[IsDefined#4](~/samples/snippets/cpp/VS_Snippets_CLR/IsDefined/CPP/isdefined.cpp#4)]
[!code-csharp[IsDefined#4](~/samples/snippets/csharp/VS_Snippets_CLR/IsDefined/CS/id4.cs#4)]
[!code-vb[IsDefined#4](~/samples/snippets/visualbasic/VS_Snippets_CLR/IsDefined/VB/id4.vb#4)]
 
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/IsDefined/CPP/isdefined.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/IsDefined/CS/id4.cs" interactive="try-dotnet" id="Snippet4":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/IsDefined/VB/id4.vb" id="Snippet4":::

]]></format>
</remarks>
Expand Down Expand Up @@ -408,10 +408,10 @@ When implementing your own class derived from <xref:System.Attribute>, you can o

## Examples
The following code example illustrates the use of the <xref:System.Attribute.GetCustomAttribute%2A> method taking a <xref:System.Reflection.Module> as a parameter.

[!code-cpp[IsDefined#2](~/samples/snippets/cpp/VS_Snippets_CLR/IsDefined/CPP/isdefined.cpp#2)]
[!code-csharp[IsDefined#2](~/samples/snippets/csharp/VS_Snippets_CLR/IsDefined/CS/id2.cs#2)]
[!code-vb[IsDefined#2](~/samples/snippets/visualbasic/VS_Snippets_CLR/IsDefined/VB/id2.vb#2)]
 
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/IsDefined/CPP/isdefined.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/IsDefined/CS/id2.cs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/IsDefined/VB/id2.vb" id="Snippet2":::

]]></format>
</remarks>
Expand Down Expand Up @@ -473,9 +473,9 @@ When implementing your own class derived from <xref:System.Attribute>, you can o
## Examples
The following code example defines a custom parameter <xref:System.Attribute> class and applies the custom attribute to a method in a derived class and the base of the derived class. The example shows the use of the <xref:System.Attribute.GetCustomAttribute%2A> method to return the attributes.

[!code-cpp[System.Attribute.GetCustomAttribute#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Attribute.GetCustomAttribute/CPP/getcustattrparam.cpp#1)]
[!code-csharp[System.Attribute.GetCustomAttribute#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Attribute.GetCustomAttribute/CS/getcustattrparam.cs#1)]
[!code-vb[System.Attribute.GetCustomAttribute#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Attribute.GetCustomAttribute/VB/getcustattrparam.vb#1)]
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Attribute.GetCustomAttribute/CPP/getcustattrparam.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Attribute.GetCustomAttribute/CS/getcustattrparam.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Attribute.GetCustomAttribute/VB/getcustattrparam.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -541,10 +541,10 @@ When implementing your own class derived from <xref:System.Attribute>, you can o

## Examples
The following code example illustrates the use of the <xref:System.Attribute.GetCustomAttribute%2A> method taking an <xref:System.Reflection.Assembly> as a parameter.

[!code-cpp[IsDefined#1](~/samples/snippets/cpp/VS_Snippets_CLR/IsDefined/CPP/isdefined.cpp#1)]
[!code-csharp[IsDefined#1](~/samples/snippets/csharp/VS_Snippets_CLR/IsDefined/CS/id1.cs#1)]
[!code-vb[IsDefined#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/IsDefined/VB/id1.vb#1)]
 
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/IsDefined/CPP/isdefined.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/IsDefined/CS/id1.cs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/IsDefined/VB/id1.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -609,10 +609,10 @@ When implementing your own class derived from <xref:System.Attribute>, you can o

## Examples
The following code example illustrates the use of the <xref:System.Attribute.GetCustomAttribute%2A> method taking a <xref:System.Reflection.MemberInfo> as a parameter.

[!code-cpp[IsDefined#4](~/samples/snippets/cpp/VS_Snippets_CLR/IsDefined/CPP/isdefined.cpp#4)]
[!code-csharp[IsDefined#4](~/samples/snippets/csharp/VS_Snippets_CLR/IsDefined/CS/id4.cs#4)]
[!code-vb[IsDefined#4](~/samples/snippets/visualbasic/VS_Snippets_CLR/IsDefined/VB/id4.vb#4)]
 
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/IsDefined/CPP/isdefined.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/IsDefined/CS/id4.cs" interactive="try-dotnet" id="Snippet4":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/IsDefined/VB/id4.vb" id="Snippet4":::

]]></format>
</remarks>
Expand Down Expand Up @@ -673,10 +673,10 @@ When implementing your own class derived from <xref:System.Attribute>, you can o

## Examples
The following code example illustrates the use of the <xref:System.Attribute.GetCustomAttribute%2A> method taking a <xref:System.Reflection.Module> as a parameter.

[!code-cpp[IsDefined#2](~/samples/snippets/cpp/VS_Snippets_CLR/IsDefined/CPP/isdefined.cpp#2)]
[!code-csharp[IsDefined#2](~/samples/snippets/csharp/VS_Snippets_CLR/IsDefined/CS/id2.cs#2)]
[!code-vb[IsDefined#2](~/samples/snippets/visualbasic/VS_Snippets_CLR/IsDefined/VB/id2.vb#2)]
 
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/IsDefined/CPP/isdefined.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/IsDefined/CS/id2.cs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/IsDefined/VB/id2.vb" id="Snippet2":::

]]></format>
</remarks>
Expand Down Expand Up @@ -740,9 +740,9 @@ When implementing your own class derived from <xref:System.Attribute>, you can o
## Examples
The following code example defines a custom parameter <xref:System.Attribute> class and applies the custom attribute to a method in a derived class and the base of the derived class. The example shows the use of the <xref:System.Attribute.GetCustomAttribute%2A> method to return the attributes.

[!code-cpp[System.Attribute.GetCustomAttribute#3](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Attribute.GetCustomAttribute/CPP/getcustattrprminh.cpp#3)]
[!code-csharp[System.Attribute.GetCustomAttribute#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Attribute.GetCustomAttribute/CS/getcustattrprminh.cs#3)]
[!code-vb[System.Attribute.GetCustomAttribute#3](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Attribute.GetCustomAttribute/VB/getcustattrprminh.vb#3)]
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Attribute.GetCustomAttribute/CPP/getcustattrprminh.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Attribute.GetCustomAttribute/CS/getcustattrprminh.cs" interactive="try-dotnet" id="Snippet3":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Attribute.GetCustomAttribute/VB/getcustattrprminh.vb" id="Snippet3":::

]]></format>
</remarks>
Expand Down
Loading