Skip to content

Commit 2cf991d

Browse files
authored
enable_try_dotnet_to_batch_13c (#4472)
1 parent e2e0080 commit 2cf991d

File tree

6 files changed

+25
-25
lines changed

6 files changed

+25
-25
lines changed

xml/System.Globalization/DateTimeFormatInfo.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2213,8 +2213,8 @@ Changing the value of this property affects the following properties as well: <x
22132213
## Remarks
22142214
The <xref:System.Globalization.DateTimeFormatInfo.LongDatePattern%2A> property defines the culture-specific format of date strings that are returned by calls to the <xref:System.DateTime.ToString%2A?displayProperty=nameWithType> and <xref:System.DateTimeOffset.ToString%2A?displayProperty=nameWithType> methods and by composite format strings that are supplied the "D" standard format string. The following example illustrates the relationships among the following: the "D" standard format string, the custom format string returned by the <xref:System.Globalization.DateTimeFormatInfo.LongDatePattern%2A> property, and the culture-specific representation of a date.
22152215
2216-
[!code-csharp[System.Globalization.DateTimeFormatInfo.LongDatePattern#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.DateTimeFormatInfo.LongDatePattern/CS/longdatepattern1.cs#2)]
2217-
[!code-vb[System.Globalization.DateTimeFormatInfo.LongDatePattern#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.DateTimeFormatInfo.LongDatePattern/VB/longdatepattern1.vb#2)]
2216+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.DateTimeFormatInfo.LongDatePattern/CS/longdatepattern1.cs" interactive="try-dotnet" id="Snippet2":::
2217+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.DateTimeFormatInfo.LongDatePattern/VB/longdatepattern1.vb" id="Snippet2":::
22182218
22192219
See [Custom Date and Time Format Strings](/dotnet/standard/base-types/custom-date-and-time-format-strings) for individual custom format specifiers that can be combined to construct custom format strings such as "dddd, dd MMMM yyyy".
22202220
@@ -2230,9 +2230,9 @@ Changing the value of this property affects the following properties as well: <x
22302230
## Examples
22312231
The following example displays the value of the <xref:System.Globalization.DateTimeFormatInfo.LongDatePattern%2A> property for a few cultures.
22322232
2233-
[!code-cpp[System.Globalization.DateTimeFormatInfo.LongDatePattern#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.DateTimeFormatInfo.LongDatePattern/CPP/dtfi_longdatepattern.cpp#1)]
2234-
[!code-csharp[System.Globalization.DateTimeFormatInfo.LongDatePattern#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.DateTimeFormatInfo.LongDatePattern/CS/dtfi_longdatepattern.cs#1)]
2235-
[!code-vb[System.Globalization.DateTimeFormatInfo.LongDatePattern#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.DateTimeFormatInfo.LongDatePattern/VB/dtfi_longdatepattern.vb#1)]
2233+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.DateTimeFormatInfo.LongDatePattern/CPP/dtfi_longdatepattern.cpp" id="Snippet1":::
2234+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.DateTimeFormatInfo.LongDatePattern/CS/dtfi_longdatepattern.cs" interactive="try-dotnet" id="Snippet1":::
2235+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.DateTimeFormatInfo.LongDatePattern/VB/dtfi_longdatepattern.vb" id="Snippet1":::
22362236
22372237
]]></format>
22382238
</remarks>

xml/System.Linq/Queryable.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2139,8 +2139,8 @@
21392139
## Examples
21402140
The following code example demonstrates how to use <xref:System.Linq.Queryable.Contains%60%601%28System.Linq.IQueryable%7B%60%600%7D%2C%60%600%29> to determine whether a sequence contains a specific element.
21412141

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

21452145
]]></format>
21462146
</remarks>

xml/System.Security.Cryptography/Oid.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
## Examples
4545
The following code example shows how to use the <xref:System.Security.Cryptography.Oid> class.
4646
47-
[!code-cpp[Cryptography.Oid#1](~/samples/snippets/cpp/VS_Snippets_CLR/Cryptography.Oid/CPP/cryptography.oid.cpp#1)]
48-
[!code-csharp[Cryptography.Oid#1](~/samples/snippets/csharp/VS_Snippets_CLR/Cryptography.Oid/CS/cryptography.oid.cs#1)]
49-
[!code-vb[Cryptography.Oid#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/Cryptography.Oid/VB/cryptography.oid.vb#1)]
47+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/Cryptography.Oid/CPP/cryptography.oid.cpp" id="Snippet1":::
48+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/Cryptography.Oid/CS/cryptography.oid.cs" interactive="try-dotnet" id="Snippet1":::
49+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/Cryptography.Oid/VB/cryptography.oid.vb" id="Snippet1":::
5050
5151
]]></format>
5252
</remarks>

xml/System.Security.Cryptography/RNGCryptoServiceProvider.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,9 @@
394394
## Examples
395395
The following code example shows how to create a random number with the <xref:System.Security.Cryptography.RNGCryptoServiceProvider> class.
396396
397-
[!code-cpp[RNGCSP#1](~/samples/snippets/cpp/VS_Snippets_CLR/RNGCSP/cpp/rngcsp.cpp#1)]
398-
[!code-csharp[RNGCSP#1](~/samples/snippets/csharp/VS_Snippets_CLR/RNGCSP/CS/rngcsp.cs#1)]
399-
[!code-vb[RNGCSP#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/RNGCSP/VB/rngcsp.vb#1)]
397+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/RNGCSP/cpp/rngcsp.cpp" id="Snippet1":::
398+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/RNGCSP/CS/rngcsp.cs" interactive="try-dotnet" id="Snippet1":::
399+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/RNGCSP/VB/rngcsp.vb" id="Snippet1":::
400400
401401
]]></format>
402402
</remarks>

xml/System/Array.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3909,9 +3909,9 @@
39093909
## Examples
39103910
The following code example shows how to use <xref:System.Array.GetEnumerator%2A> to list the elements of an array.
39113911

3912-
[!code-cpp[System.Array_GetEnumerator#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Array_GetEnumerator/CPP/array_getenumerator.cpp#1)]
3913-
[!code-csharp[System.Array_GetEnumerator#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Array_GetEnumerator/CS/array_getenumerator.cs#1)]
3914-
[!code-vb[System.Array_GetEnumerator#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Array_GetEnumerator/VB/array_getenumerator.vb#1)]
3912+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Array_GetEnumerator/CPP/array_getenumerator.cpp" id="Snippet1":::
3913+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Array_GetEnumerator/CS/array_getenumerator.cs" interactive="try-dotnet" id="Snippet1":::
3914+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Array_GetEnumerator/VB/array_getenumerator.vb" id="Snippet1":::
39153915

39163916
]]></format>
39173917
</remarks>

xml/System/Func`4.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,22 +102,22 @@
102102
103103
When you use the <xref:System.Func%604> delegate, you do not have to explicitly define a delegate that encapsulates a method with three parameters. For example, the following code explicitly declares a generic delegate named `ParseNumber` and assigns a reference to the <xref:System.Int32.Parse%2A> method to its delegate instance.
104104
105-
[!code-csharp[System.Func~4#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Func~4/cs/Delegate.cs#1)]
106-
[!code-vb[System.Func~4#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Func~4/vb/Delegate.vb#1)]
105+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Func~4/cs/Delegate.cs" interactive="try-dotnet" id="Snippet1":::
106+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Func~4/vb/Delegate.vb" id="Snippet1":::
107107
108108
The following example simplifies this code by instantiating the <xref:System.Func%604> delegate instead of explicitly defining a new delegate and assigning a named method to it.
109109
110-
[!code-csharp[System.Func~4#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Func~4/cs/Func4.cs#2)]
111-
[!code-vb[System.Func~4#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Func~4/vb/Func4.vb#2)]
110+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Func~4/cs/Func4.cs" interactive="try-dotnet" id="Snippet2":::
111+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Func~4/vb/Func4.vb" id="Snippet2":::
112112
113113
You can use the <xref:System.Func%604> delegate with anonymous methods in C#, as the following example illustrates. (For an introduction to anonymous methods, see [Anonymous Methods](/dotnet/csharp/programming-guide/statements-expressions-operators/anonymous-methods).)
114114
115-
[!code-csharp[System.Func~4#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Func~4/cs/Anon.cs#3)]
115+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Func~4/cs/Anon.cs" interactive="try-dotnet" id="Snippet3":::
116116
117117
You can also assign a lambda expression to a <xref:System.Func%604> delegate, as the following example illustrates. (For an introduction to lambda expressions, see [Lambda Expressions](/dotnet/visual-basic/programming-guide/language-features/procedures/lambda-expressions) and [Lambda Expressions](/dotnet/csharp/programming-guide/statements-expressions-operators/lambda-expressions).)
118118
119-
[!code-csharp[System.Func~4#4](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Func~4/cs/Lambda.cs#4)]
120-
[!code-vb[System.Func~4#4](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Func~4/vb/Lambda.vb#4)]
119+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Func~4/cs/Lambda.cs" interactive="try-dotnet" id="Snippet4":::
120+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Func~4/vb/Lambda.vb" id="Snippet4":::
121121
122122
The underlying type of a lambda expression is one of the generic `Func` delegates. This makes it possible to pass a lambda expression as a parameter without explicitly assigning it to a delegate. In particular, because many methods of types in the <xref:System.Linq> namespace have `Func` parameters, you can pass these methods a lambda expression without explicitly instantiating a `Func` delegate.
123123
@@ -126,8 +126,8 @@
126126
## Examples
127127
The following example demonstrates how to declare and use a <xref:System.Func%603> delegate. This example declares a <xref:System.Func%603> variable and assigns it a lambda expression that takes a <xref:System.String> value and an <xref:System.Int32> value as parameters. The lambda expression returns `true` if the length of the <xref:System.String> parameter is equal to the value of the <xref:System.Int32> parameter. The delegate that encapsulates this method is subsequently used in a query to filter strings in an array of strings.
128128
129-
[!code-csharp[System.Func~3#5](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Func~3/cs/Example.cs#5)]
130-
[!code-vb[System.Func~3#5](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Func~3/vb/Example.vb#5)]
129+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Func~3/cs/Example.cs" interactive="try-dotnet" id="Snippet5":::
130+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Func~3/vb/Example.vb" id="Snippet5":::
131131
132132
]]></format>
133133
</remarks>

0 commit comments

Comments
 (0)