Skip to content

.NET Interactive: Enable_try_dotnet_to_batch_12c #4412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2020
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
16 changes: 8 additions & 8 deletions xml/System/Array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6464,17 +6464,17 @@ int[,,] TDArray = new int[1,1,1];

As the following example shows, the <xref:System.Array.Reverse%2A> method can be used to reverse a jagged array. It initializes a jagged array with one element for each month of the current year in the current culture's calendar. Each element contains an array with as many elements as that month has days. The example displays the contents of the array, calls the <xref:System.Array.Reverse%2A> method, and then displays the contents of the reversed array.

[!code-csharp[System.Array.Reverse#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.array.reverse/cs/reversejagged.cs#1)]
[!code-vb[System.Array.Reverse#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.array.reverse/vb/reversejagged.vb#1)]
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.array.reverse/cs/reversejagged.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.array.reverse/vb/reversejagged.vb" id="Snippet1":::



## Examples
The following code example shows how to reverse the sort of the values in an <xref:System.Array>.

[!code-cpp[Classic Array.Reverse Example#1](~/samples/snippets/cpp/VS_Snippets_CLR_Classic/classic Array.Reverse Example/CPP/source.cpp#1)]
[!code-csharp[Classic Array.Reverse Example#1](~/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.Reverse Example/CS/source.cs#1)]
[!code-vb[Classic Array.Reverse Example#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_Classic/classic Array.Reverse Example/VB/source.vb#1)]
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_Classic/classic Array.Reverse Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.Reverse Example/CS/source.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_Classic/classic Array.Reverse Example/VB/source.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -6551,9 +6551,9 @@ int[,,] TDArray = new int[1,1,1];
## Examples
The following code example shows how to reverse the sort of the values in a range of elements in an <xref:System.Array>.

[!code-cpp[Classic Array.Reverse1 Example#1](~/samples/snippets/cpp/VS_Snippets_CLR_Classic/classic Array.Reverse1 Example/CPP/source.cpp#1)]
[!code-csharp[Classic Array.Reverse1 Example#1](~/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.Reverse1 Example/CS/source.cs#1)]
[!code-vb[Classic Array.Reverse1 Example#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_Classic/classic Array.Reverse1 Example/VB/source.vb#1)]
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_Classic/classic Array.Reverse1 Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array.Reverse1 Example/CS/source.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_Classic/classic Array.Reverse1 Example/VB/source.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down
4 changes: 2 additions & 2 deletions xml/System/DateTime.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9148,8 +9148,8 @@ The value of the current <xref:System.DateTime> object is formatted using the pa
## Remarks
The <xref:System.DateTime.Year%2A> property returns the year of the current instance in the Gregorian calendar. It does not return the year using the default calendar of the current culture. To retrieve the year using a particular calendar, you can call that calendar's `GetYear` method, as the following code shows.

[!code-csharp[System.DateTime.Year#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.Year/cs/Year.cs#1)]
[!code-vb[System.DateTime.Year#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.Year/vb/Year.vb#1)]
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.Year/cs/Year.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.Year/vb/Year.vb" id="Snippet1":::



Expand Down
6 changes: 3 additions & 3 deletions xml/System/Exception.xml
Original file line number Diff line number Diff line change
Expand Up @@ -638,9 +638,9 @@ Stack Trace:
## Examples
The following example demonstrates how to add and retrieve information using the <xref:System.Exception.Data%2A> property.

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

]]></format>
</remarks>
Expand Down
4 changes: 2 additions & 2 deletions xml/System/TimeSpan.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4341,8 +4341,8 @@ This member is an explicit interface member implementation. It can be used only
## Examples
The following example calls the <xref:System.TimeSpan.ToString%28System.String%2CSystem.IFormatProvider%29> method to format two time intervals. The example calls the method twice for each format string, first to display it using the conventions of the en-US culture and then to display it using the conventions of the fr-FR culture.

[!code-csharp[System.TimeSpan.ToString#4](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.ToString/cs/tostring4.cs#4)]
[!code-vb[System.TimeSpan.ToString#4](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.ToString/vb/tostring4.vb#4)]
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.ToString/cs/tostring4.cs" interactive="try-dotnet" id="Snippet4":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.ToString/vb/tostring4.vb" id="Snippet4":::

]]></format>
</remarks>
Expand Down
12 changes: 6 additions & 6 deletions xml/System/Tuple.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@

Although you can create an instance of a tuple class by calling its class constructor, the code to do so can be cumbersome. The following example uses a class constructor to create a 7-tuple or septuple that contains population data for New York City for each census from 1950 through 2000.

[!code-csharp[System.Tuple.Class#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.tuple.class/cs/example1.cs#1)]
[!code-vb[System.Tuple.Class#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.tuple.class/vb/example1.vb#1)]
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.tuple.class/cs/example1.cs" interactive="try-dotnet-method" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.tuple.class/vb/example1.vb" id="Snippet1":::

Creating the same tuple object by using a helper method is more straightforward, as the following example shows.

[!code-csharp[System.Tuple.Class#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.tuple.class/cs/example1.cs#2)]
[!code-vb[System.Tuple.Class#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.tuple.class/vb/example1.vb#2)]
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.tuple.class/cs/example1.cs" interactive="try-dotnet-method" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.tuple.class/vb/example1.vb" id="Snippet2":::

The <xref:System.Tuple.Create%2A> helper methods directly support the creation of tuple objects that have from one to eight components (that is, singletons through octuples). Although there is no practical limit to the number of components a tuple may have, helper methods are not available to create a tuple with nine or more components. To create such a tuple, you must call the <xref:System.Tuple%608.%23ctor%2A?displayProperty=nameWithType> constructor.

Expand All @@ -73,8 +73,8 @@
## Examples
The following example creates an 8-tuple (octuple) that contains prime numbers that are less than 20.

[!code-csharp[System.Tuple.Create#17](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.tuple.create/cs/createntuple.cs#17)]
[!code-vb[System.Tuple.Create#17](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.tuple.create/vb/createntuple.vb#17)]
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.tuple.create/cs/createntuple.cs" interactive="try-dotnet-method" id="Snippet17":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.tuple.create/vb/createntuple.vb" id="Snippet17":::

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