Skip to content

Commit 59fcac3

Browse files
authored
enable_try_dotnet_to_batch_19a (#4702)
1 parent 3813b8f commit 59fcac3

File tree

10 files changed

+77
-77
lines changed

10 files changed

+77
-77
lines changed

xml/System.Globalization/TextInfo.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,15 +1135,15 @@ The <xref:System.Globalization.TextInfo.LCID%2A> property always reflects a spec
11351135
## Examples
11361136
The following example changes the casing of a string based on the English (United States) culture, with the culture name en-US.
11371137
1138-
[!code-cpp[System.Globalization.TextInfo_casing#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.TextInfo_casing/CPP/textinfo_casing.cpp#1)]
1139-
[!code-csharp[System.Globalization.TextInfo_casing#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.TextInfo_casing/CS/textinfo_casing.cs#1)]
1140-
[!code-vb[System.Globalization.TextInfo_casing#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.TextInfo_casing/VB/textinfo_casing.vb#1)]
1141-
1138+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.TextInfo_casing/CPP/textinfo_casing.cpp" id="Snippet1":::
1139+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.TextInfo_casing/CS/textinfo_casing.cs" interactive="try-dotnet" id="Snippet1":::
1140+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.TextInfo_casing/VB/textinfo_casing.vb" id="Snippet1":::
1141+
11421142
The following example passes each string in an array to the <xref:System.Globalization.TextInfo.ToTitleCase%2A> method. The strings include proper title strings as well as acronyms. The strings are converted to title case by using the conventions of the en-US culture.
11431143
1144-
[!code-csharp[System.Globalization.TextInfo.ToTitleCase#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.globalization.textinfo.totitlecase/cs/totitlecase2.cs#1)]
1145-
[!code-vb[System.Globalization.TextInfo.ToTitleCase#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.globalization.textinfo.totitlecase/vb/totitlecase2.vb#1)]
1146-
1144+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.globalization.textinfo.totitlecase/cs/totitlecase2.cs" interactive="try-dotnet" id="Snippet1":::
1145+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.globalization.textinfo.totitlecase/vb/totitlecase2.vb" id="Snippet1":::
1146+
11471147
]]></format>
11481148
</remarks>
11491149
<exception cref="T:System.ArgumentNullException">

xml/System.Security.Cryptography/RNGCryptoServiceProvider.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@
6060
6161
## Examples
6262
The following code example shows how to create a random number with the <xref:System.Security.Cryptography.RNGCryptoServiceProvider> class.
63-
64-
[!code-cpp[RNGCSP#1](~/samples/snippets/cpp/VS_Snippets_CLR/RNGCSP/cpp/rngcsp.cpp#1)]
65-
[!code-csharp[RNGCSP#1](~/samples/snippets/csharp/VS_Snippets_CLR/RNGCSP/CS/rngcsp.cs#1)]
66-
[!code-vb[RNGCSP#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/RNGCSP/VB/rngcsp.vb#1)]
67-
63+
64+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/RNGCSP/cpp/rngcsp.cpp" id="Snippet1":::
65+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/RNGCSP/CS/rngcsp.cs" interactive="try-dotnet" id="Snippet1":::
66+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/RNGCSP/VB/rngcsp.vb" id="Snippet1":::
67+
6868
]]></format>
6969
</remarks>
7070
<threadsafe>This type is thread safe.</threadsafe>

xml/System.Text/StringBuilder.xml

Lines changed: 34 additions & 34 deletions
Large diffs are not rendered by default.

xml/System/DateTime.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4259,10 +4259,10 @@ juillet 2009
42594259

42604260
## Examples
42614261
The following example instantiates a <xref:System.DateTime> object by passing its constructor an <xref:System.Int64> value that represents a number of ticks. Before invoking the constructor, the example ensures that this value is greater than or equal to `DateTime.MinValue.Ticks` and less than or equal to `DateTime.MaxValue.Ticks`. If not, it throws an <xref:System.ArgumentOutOfRangeException>.
4262-
4263-
[!code-csharp[System.DateTime.MinValue#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.MinValue/cs/MinValue.cs#2)]
4264-
[!code-vb[System.DateTime.MinValue#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.MinValue/vb/MinValue.vb#2)]
4265-
4262+
4263+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.DateTime.MinValue/cs/MinValue.cs" interactive="try-dotnet-method" id="Snippet2":::
4264+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.DateTime.MinValue/vb/MinValue.vb" id="Snippet2":::
4265+
42664266
]]></format>
42674267
</remarks>
42684268
</Docs>

xml/System/Decimal.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7777,10 +7777,10 @@ This member is an explicit interface member implementation. It can be used only
77777777

77787778
## Examples
77797779
The following example uses the <xref:System.Decimal.TryParse%28System.String%2CSystem.Decimal%40%29?displayProperty=nameWithType> method to convert the string representations of numeric values to <xref:System.Decimal> values. It assumes that en-US is the current culture.
7780-
7781-
[!code-csharp[System.Decimal.TryParse#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.TryParse/cs/TryParse.cs#1)]
7782-
[!code-vb[System.Decimal.TryParse#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.TryParse/vb/TryParse.vb#1)]
7783-
7780+
7781+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.TryParse/cs/TryParse.cs" interactive="try-dotnet-method" id="Snippet1":::
7782+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.TryParse/vb/TryParse.vb" id="Snippet1":::
7783+
77847784
]]></format>
77857785
</remarks>
77867786
<altmember cref="Overload:System.Decimal.Parse" />
@@ -7923,9 +7923,9 @@ This member is an explicit interface member implementation. It can be used only
79237923
## Examples
79247924
The following example demonstrates the use of the <xref:System.Decimal.TryParse%28System.String%2CSystem.Globalization.NumberStyles%2CSystem.IFormatProvider%2CSystem.Decimal%40%29> method to parse the string representation of a number that has a particular style and is formatted using the conventions of a particular culture.
79257925

7926-
[!code-csharp[System.Decimal.TryParse#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.TryParse/cs/TryParse.cs#2)]
7927-
[!code-vb[System.Decimal.TryParse#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.TryParse/vb/TryParse.vb#2)]
7928-
7926+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.TryParse/cs/TryParse.cs" interactive="try-dotnet-method" id="Snippet2":::
7927+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.TryParse/vb/TryParse.vb" id="Snippet2":::
7928+
79297929
]]></format>
79307930
</remarks>
79317931
<exception cref="T:System.ArgumentException">

xml/System/Delegate.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@
123123
## Examples
124124
The following example shows how to define a delegate named `myMethodDelegate`. Instances of this delegate are created for an instance method and a static method of the nested `mySampleClass` class. The delegate for the instance method requires an instance of `mySampleClass`. The `mySampleClass` instance is saved in a variable named `mySC`.
125125
126-
[!code-cpp[Classic Delegate Example#1](~/samples/snippets/cpp/VS_Snippets_CLR_Classic/classic Delegate Example/CPP/source.cpp#1)]
127-
[!code-csharp[Classic Delegate Example#1](~/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Delegate Example/CS/source.cs#1)]
128-
[!code-vb[Classic Delegate Example#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_Classic/classic Delegate Example/VB/source.vb#1)]
129-
126+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_Classic/classic Delegate Example/CPP/source.cpp" id="Snippet1":::
127+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Delegate Example/CS/source.cs" interactive="try-dotnet" id="Snippet1":::
128+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_Classic/classic Delegate Example/VB/source.vb" id="Snippet1":::
129+
130130
]]></format>
131131
</remarks>
132132
<altmember cref="T:System.MulticastDelegate" />

xml/System/Exception.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -959,10 +959,10 @@ Stack Trace:
959959
## Examples
960960
The following code example defines a derived `Exception` class that sets the `HResult` property to a custom value in its constructor.
961961
962-
[!code-cpp[System.Exception.HResult#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Exception.HResult/CPP/hresult.cpp#1)]
963-
[!code-csharp[System.Exception.HResult#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Exception.HResult/CS/hresult.cs#1)]
964-
[!code-vb[System.Exception.HResult#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Exception.HResult/VB/hresult.vb#1)]
965-
962+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Exception.HResult/CPP/hresult.cpp" id="Snippet1":::
963+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Exception.HResult/CS/hresult.cs" interactive="try-dotnet" id="Snippet1":::
964+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Exception.HResult/VB/hresult.vb" id="Snippet1":::
965+
966966
]]></format>
967967
</remarks>
968968
<related type="Article" href="/dotnet/framework/interop/how-to-map-hresults-and-exceptions">How to: Map HRESULTs and Exceptions</related>

xml/System/IComparable.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@
6262
## Examples
6363
The following example illustrates the implementation of <xref:System.IComparable> and the requisite <xref:System.IComparable.CompareTo%2A> method.
6464
65-
[!code-cpp[IComparable Example#1](~/samples/snippets/cpp/VS_Snippets_CLR/IComparable Example/CPP/source.cpp#1)]
66-
[!code-csharp[IComparable Example#1](~/samples/snippets/csharp/VS_Snippets_CLR/IComparable Example/CS/source.cs#1)]
67-
[!code-vb[IComparable Example#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/IComparable Example/VB/source.vb#1)]
68-
65+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/IComparable Example/CPP/source.cpp" id="Snippet1":::
66+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/IComparable Example/CS/source.cs" interactive="try-dotnet" id="Snippet1":::
67+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/IComparable Example/VB/source.vb" id="Snippet1":::
68+
6969
]]></format>
7070
</remarks>
7171
</Docs>

xml/System/StackOverflowException.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ See the [Examples](#examples) section for an illustration of this technique.
6363
## Examples
6464
6565
The following example uses a counter to ensure that the number of recursive calls to the `Execute` method do not exceed a maximum defined by the MAX_RECURSIVE_CALLS constant.
66-
67-
[!code-csharp[System.StackOverflowException.Class#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.stackoverflowexception.class/cs/example1a.cs#1)]
68-
[!code-vb[System.StackOverflowException.Class#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.stackoverflowexception.class/vb/example1a.vb#1)]
66+
67+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.stackoverflowexception.class/cs/example1a.cs" interactive="try-dotnet" id="Snippet1":::
68+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.stackoverflowexception.class/vb/example1a.vb" id="Snippet1":::
6969
7070
]]></format>
7171
</remarks>

xml/System/TimeSpan.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2949,8 +2949,8 @@ When a time interval component in the string to be parsed contains more than sev
29492949
## Examples
29502950
The following example uses the <xref:System.TimeSpan.Parse%2A> method to convert each element in a string array to a <xref:System.TimeSpan> value. It changes the current system culture to Croatian - Croatia ("hr-HR") and English - United States ("en-US") to illustrate how the current system culture affects the parsing operation.
29512951
2952-
[!code-csharp[System.TimeSpan.Parse#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.timespan.parse/cs/parse1.cs#1)]
2953-
[!code-vb[System.TimeSpan.Parse#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.timespan.parse/vb/parse1.vb#1)]
2952+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.timespan.parse/cs/parse1.cs" interactive="try-dotnet" id="Snippet1":::
2953+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.timespan.parse/vb/parse1.vb" id="Snippet1":::
29542954
29552955
]]></format>
29562956
</remarks>
@@ -3092,9 +3092,9 @@ When a time interval component in the string to be parsed contains more than sev
30923092
30933093
## Examples
30943094
The following example defines an array of <xref:System.Globalization.CultureInfo> objects, and uses each object in calls to the <xref:System.TimeSpan.Parse%28System.String%2CSystem.IFormatProvider%29> method to parse the elements in a string array. The example illustrates how the conventions of a specific culture influence the formatting operation.
3095-
3096-
[!code-csharp[System.TimeSpan.Parse#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.timespan.parse/cs/parse2.cs#2)]
3097-
[!code-vb[System.TimeSpan.Parse#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.timespan.parse/vb/parse2.vb#2)]
3095+
3096+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.timespan.parse/cs/parse2.cs" interactive="try-dotnet" id="Snippet2":::
3097+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.timespan.parse/vb/parse2.vb" id="Snippet2":::
30983098
30993099
]]></format>
31003100
</remarks>

0 commit comments

Comments
 (0)