Skip to content

Commit f33aa30

Browse files
v-mepamairaw
andauthored
.NET Interactive: Add_try_dotnet_to_batch_26a (#5138)
* add_try_dotnet * fix warning * reversing_syntax * remove_spacing Co-authored-by: Maira Wenzel <[email protected]>
1 parent 4e9d74a commit f33aa30

File tree

11 files changed

+116
-122
lines changed

11 files changed

+116
-122
lines changed

xml/System.Collections.Generic/EqualityComparer`1.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@
172172
173173
The second search specifies an equality comparer (`BoxEqVolume`) that defines equality by volume. Two boxes are considered equal if their volumes are the same.
174174
175-
[!code-csharp[System.Collections.Generic.EqualityComparer.Default#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.equalitycomparer.default/cs/program.cs)]
176-
[!code-vb[System.Collections.Generic.EqualityComparer.Default#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.equalitycomparer.default/vb/program.vb)]
177-
175+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.equalitycomparer.default/cs/program.cs" interactive="try-dotnet":::
176+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.equalitycomparer.default/vb/program.vb":::
177+
178178
]]></format>
179179
</remarks>
180180
<altmember cref="T:System.Collections.Generic.IEqualityComparer`1" />

xml/System.Linq/Enumerable.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11554,9 +11554,9 @@ If `count` is not a positive number, this method returns an empty enumerable col
1155411554
## Examples
1155511555
The following code example demonstrates how to use <xref:System.Linq.Enumerable.ThenBy%60%602%28System.Linq.IOrderedEnumerable%7B%60%600%7D%2CSystem.Func%7B%60%600%2C%60%601%7D%29> to perform a secondary ordering of the elements in a sequence.
1155611556

11557-
[!code-csharp[System.Linq.Enumerable#102](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs#102)]
11558-
[!code-vb[System.Linq.Enumerable#102](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb#102)]
11559-
11557+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs" interactive="try-dotnet-method" id="Snippet102":::
11558+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb" id="Snippet102":::
11559+
1156011560
]]></format>
1156111561
</remarks>
1156211562
<exception cref="T:System.ArgumentNullException">

xml/System.Linq/Queryable.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1999,9 +1999,9 @@
19991999
## Examples
20002000
The following code example demonstrates how to use <xref:System.Linq.Queryable.Cast%60%601%28System.Linq.IQueryable%29> to convert objects in a sequence to type <xref:System.String>.
20012001

2002-
[!code-csharp[System.Linq.Queryable#19](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs#19)]
2003-
[!code-vb[System.Linq.Queryable#19](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb#19)]
2004-
2002+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs" interactive="try-dotnet-method" id="Snippet19":::
2003+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb" id="Snippet19":::
2004+
20052005
]]></format>
20062006
</remarks>
20072007
<exception cref="T:System.ArgumentNullException">

xml/System.Text/StringBuilder.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5708,9 +5708,9 @@ In .NET Core and in the .NET Framework 4.0 and later versions, when you instanti
57085708
## Examples
57095709
The following example demonstrates the <xref:System.Text.StringBuilder.Remove%2A> method.
57105710
5711-
[!code-cpp[stringbuilder.remove#1](~/samples/snippets/cpp/VS_Snippets_CLR/stringbuilder.remove/CPP/remove.cpp#1)]
5712-
[!code-csharp[stringbuilder.remove#1](~/samples/snippets/csharp/VS_Snippets_CLR/stringbuilder.remove/CS/remove.cs#1)]
5713-
[!code-vb[stringbuilder.remove#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/stringbuilder.remove/VB/remove.vb#1)]
5711+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/stringbuilder.remove/CPP/remove.cpp" id="Snippet1":::
5712+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/stringbuilder.remove/CS/remove.cs" interactive="try-dotnet" id="Snippet1":::
5713+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/stringbuilder.remove/VB/remove.vb" id="Snippet1":::
57145714
57155715
]]></format>
57165716
</remarks>

xml/System/Buffer.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@
6262
6363
## Examples
6464
The following code example illustrates the use of several `Buffer` class methods.
65-
66-
[!code-cpp[System.Buffer.BlockCopy#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Buffer.BlockCopy/CPP/buffer.cpp#1)]
67-
[!code-csharp[System.Buffer.BlockCopy#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Buffer.BlockCopy/CS/buffer.cs#1)]
68-
[!code-vb[System.Buffer.BlockCopy#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Buffer.BlockCopy/VB/buffer.vb#1)]
69-
65+
66+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Buffer.BlockCopy/CPP/buffer.cpp" id="Snippet1":::
67+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Buffer.BlockCopy/CS/buffer.cs" interactive="try-dotnet" id="Snippet1":::
68+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Buffer.BlockCopy/VB/buffer.vb" id="Snippet1":::
69+
7070
]]></format>
7171
</remarks>
7272
</Docs>

xml/System/Converter`2.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,18 @@
7272
7373
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.
7474
75-
[!code-cpp[Array_ConvertAll#1](~/samples/snippets/cpp/VS_Snippets_CLR/Array_ConvertAll/cpp/source.cpp#1)]
76-
[!code-csharp[Array_ConvertAll#1](~/samples/snippets/csharp/VS_Snippets_CLR/Array_ConvertAll/cs/source.cs#1)]
77-
[!code-vb[Array_ConvertAll#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/Array_ConvertAll/vb/source.vb#1)]
78-
75+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/Array_ConvertAll/cpp/source.cpp" id="Snippet1":::
76+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/Array_ConvertAll/cs/source.cs" interactive="try-dotnet" id="Snippet1":::
77+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/Array_ConvertAll/vb/source.vb" id="Snippet1":::
78+
7979
Example 2
8080
8181
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 a <xref:System.Collections.Generic.List%601> 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.Collections.Generic.List`1.ConvertAll*> method. The <xref:System.Collections.Generic.List`1.ConvertAll*> 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.
8282
83-
[!code-cpp[List\`1_ConvertAll#1](~/samples/snippets/cpp/VS_Snippets_CLR/List`1_ConvertAll/cpp/source.cpp#1)]
84-
[!code-csharp[List\`1_ConvertAll#1](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_ConvertAll/cs/source.cs#1)]
85-
[!code-vb[List\`1_ConvertAll#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_ConvertAll/vb/source.vb#1)]
86-
83+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/List`1_ConvertAll/cpp/source.cpp" id="Snippet1":::
84+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/List`1_ConvertAll/cs/source.cs" interactive="try-dotnet" id="Snippet1":::
85+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_ConvertAll/vb/source.vb" id="Snippet1":::
86+
8787
]]></format>
8888
</remarks>
8989
</Docs>

xml/System/DateTime.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2581,9 +2581,9 @@ The behavior of the .NET Framework and COM means that if your application round-
25812581

25822582
## Examples
25832583
The following example displays the day of the year of December 31 for the years 2010-2020 in the Gregorian calendar. Note that the example shows that December 31 is the 366th day of the year in leap years.
2584-
2585-
[!code-csharp[System.DateTime.DayOfYear#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.datetime.dayofyear/cs/dayofyear2.cs#1)]
2586-
[!code-vb[System.DateTime.DayOfYear#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.datetime.dayofyear/vb/dayofyear2.vb#1)]
2584+
2585+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.datetime.dayofyear/cs/dayofyear2.cs" interactive="try-dotnet" id="Snippet1":::
2586+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.datetime.dayofyear/vb/dayofyear2.vb" id="Snippet1":::
25872587

25882588
]]></format>
25892589
</remarks>

xml/System/Decimal.xml

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,10 @@
227227
## Examples
228228
The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with a <xref:System.Double> value.
229229

230-
[!code-cpp[System.Decimal.Ctor.Reals#2](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/CPP/ctordo.cpp#2)]
231-
[!code-csharp[System.Decimal.Ctor.Reals#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/CS/ctordo.cs#2)]
232-
[!code-vb[System.Decimal.Ctor.Reals#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/VB/ctordo.vb#2)]
233-
230+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/CPP/ctordo.cpp" id="Snippet2":::
231+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/CS/ctordo.cs" interactive="try-dotnet" id="Snippet2":::
232+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/VB/ctordo.vb" id="Snippet2":::
233+
234234
]]></format>
235235
</remarks>
236236
<exception cref="T:System.OverflowException">
@@ -284,10 +284,10 @@
284284
## Examples
285285
The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with an <xref:System.Int32> value.
286286

287-
[!code-cpp[System.Decimal.Ctor.Ints#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CPP/ctori.cpp#1)]
288-
[!code-csharp[System.Decimal.Ctor.Ints#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CS/ctori.cs#1)]
289-
[!code-vb[System.Decimal.Ctor.Ints#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/VB/ctori.vb#1)]
290-
287+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CPP/ctori.cpp" id="Snippet1":::
288+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CS/ctori.cs" interactive="try-dotnet" id="Snippet1":::
289+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/VB/ctori.vb" id="Snippet1":::
290+
291291
]]></format>
292292
</remarks>
293293
</Docs>
@@ -355,11 +355,11 @@
355355

356356
## Examples
357357
The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with an array of four <xref:System.Int32> values.
358-
359-
[!code-cpp[System.Decimal.Ctor.Arrays#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/CPP/ctoriarr.cpp#1)]
360-
[!code-csharp[System.Decimal.Ctor.Arrays#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/CS/ctoriarr.cs#1)]
361-
[!code-vb[System.Decimal.Ctor.Arrays#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/VB/ctoriarr.vb#1)]
362-
358+
359+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/CPP/ctoriarr.cpp" id="Snippet1":::
360+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/CS/ctoriarr.cs" interactive="try-dotnet" id="Snippet1":::
361+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/VB/ctoriarr.vb" id="Snippet1":::
362+
363363
]]></format>
364364
</remarks>
365365
<exception cref="T:System.ArgumentNullException">
@@ -414,11 +414,11 @@
414414

415415
## Examples
416416
The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with an <xref:System.Int64> value.
417-
418-
[!code-cpp[System.Decimal.Ctor.Ints#3](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CPP/ctorl.cpp#3)]
419-
[!code-csharp[System.Decimal.Ctor.Ints#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CS/ctorl.cs#3)]
420-
[!code-vb[System.Decimal.Ctor.Ints#3](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/VB/ctorl.vb#3)]
421-
417+
418+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CPP/ctorl.cpp" id="Snippet3":::
419+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CS/ctorl.cs" interactive="try-dotnet" id="Snippet3":::
420+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/VB/ctorl.vb" id="Snippet3":::
421+
422422
]]></format>
423423
</remarks>
424424
</Docs>
@@ -505,10 +505,10 @@
505505
## Examples
506506
The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with a <xref:System.Single> value.
507507

508-
[!code-cpp[System.Decimal.Ctor.Reals#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/CPP/ctors.cpp#1)]
509-
[!code-csharp[System.Decimal.Ctor.Reals#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/CS/ctors.cs#1)]
510-
[!code-vb[System.Decimal.Ctor.Reals#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/VB/ctors.vb#1)]
511-
508+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/CPP/ctors.cpp" id="Snippet1":::
509+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/CS/ctors.cs" interactive="try-dotnet" id="Snippet1":::
510+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/VB/ctors.vb" id="Snippet1":::
511+
512512
]]></format>
513513
</remarks>
514514
<exception cref="T:System.OverflowException">
@@ -568,10 +568,10 @@
568568
## Examples
569569
The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with a <xref:System.UInt32> value.
570570

571-
[!code-cpp[System.Decimal.Ctor.Ints#2](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CPP/ctorui.cpp#2)]
572-
[!code-csharp[System.Decimal.Ctor.Ints#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CS/ctorui.cs#2)]
573-
[!code-vb[System.Decimal.Ctor.Ints#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/VB/ctorui.vb#2)]
574-
571+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CPP/ctorui.cpp" id="Snippet2":::
572+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CS/ctorui.cs" interactive="try-dotnet" id="Snippet2":::
573+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/VB/ctorui.vb" id="Snippet2":::
574+
575575
]]></format>
576576
</remarks>
577577
</Docs>
@@ -624,11 +624,11 @@
624624

625625
## Examples
626626
The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with a <xref:System.UInt64> value.
627-
628-
[!code-cpp[System.Decimal.Ctor.Ints#4](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CPP/ctorul.cpp#4)]
629-
[!code-csharp[System.Decimal.Ctor.Ints#4](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CS/ctorul.cs#4)]
630-
[!code-vb[System.Decimal.Ctor.Ints#4](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/VB/ctorul.vb#4)]
631-
627+
628+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CPP/ctorul.cpp" id="Snippet4":::
629+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CS/ctorul.cs" interactive="try-dotnet" id="Snippet4":::
630+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/VB/ctorul.vb" id="Snippet4":::
631+
632632
]]></format>
633633
</remarks>
634634
</Docs>
@@ -689,15 +689,15 @@
689689

690690
## Examples
691691
The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with three <xref:System.Int32> value words, a <xref:System.Boolean> sign, and a <xref:System.Byte> scale factor.
692-
693-
[!code-cpp[System.Decimal.Ctor.Arrays#2](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/CPP/ctoriiibby.cpp#2)]
694-
[!code-csharp[System.Decimal.Ctor.Arrays#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/CS/ctoriiibby.cs#2)]
695-
[!code-vb[System.Decimal.Ctor.Arrays#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/VB/ctoriiibby.vb#2)]
696-
692+
693+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/CPP/ctoriiibby.cpp" id="Snippet2":::
694+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/CS/ctoriiibby.cs" interactive="try-dotnet" id="Snippet2":::
695+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/VB/ctoriiibby.vb" id="Snippet2":::
696+
697697
The following example uses the <xref:System.Decimal.GetBits%2A> method to retrieve the component parts of an array. It then uses this array in the call to the <xref:System.Decimal.%23ctor%28System.Int32%2CSystem.Int32%2CSystem.Int32%2CSystem.Boolean%2CSystem.Byte%29> constructor to instantiate a new <xref:System.Decimal> value.
698-
699-
[!code-csharp[System.Decimal.Ctor#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.ctor/cs/ctor2a.cs#1)]
700-
[!code-vb[System.Decimal.Ctor#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.ctor/vb/ctor2a.vb#1)]
698+
699+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.ctor/cs/ctor2a.cs" interactive="try-dotnet" id="Snippet1":::
700+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.ctor/vb/ctor2a.vb" id="Snippet1":::
701701

702702
]]></format>
703703
</remarks>

0 commit comments

Comments
 (0)