From f7c3dd1834b77771b6bacbb88d0aa1935bde96a3 Mon Sep 17 00:00:00 2001 From: Carlos Sanchez Lopez <1175054+carlossanlop@users.noreply.github.com> Date: Tue, 28 Apr 2020 07:28:43 -0700 Subject: [PATCH 1/5] Small edits to String.ToCharArray code snippet (#4170) --- .../system.string.tochararray/cs/ToCharArray1.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/system.string.tochararray/cs/ToCharArray1.cs b/samples/snippets/csharp/VS_Snippets_CLR_System/system.string.tochararray/cs/ToCharArray1.cs index 2cea78fdbe5..a26187c0c2e 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR_System/system.string.tochararray/cs/ToCharArray1.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR_System/system.string.tochararray/cs/ToCharArray1.cs @@ -5,12 +5,14 @@ public class Example { public static void Main() { - String s = "AaBbCcDd"; - var chars = s.ToCharArray(); + string s = "AaBbCcDd"; + char[] chars = s.ToCharArray(); Console.WriteLine("Original string: {0}", s); Console.WriteLine("Character array:"); for (int ctr = 0; ctr < chars.Length; ctr++) + { Console.WriteLine(" {0}: {1}", ctr, chars[ctr]); + } } } From 759b8a1461580c13a2cf6db3376cc5a28c74ecc8 Mon Sep 17 00:00:00 2001 From: David Pine Date: Tue, 28 Apr 2020 10:24:14 -0500 Subject: [PATCH 2/5] Replace legacy Code Gallery link with new Samples browser (#4166) * Replace legacy Code Gallery link with new Samples browser * Corrected link, using aka.ms to encapsulate query string. * Fix & usage --- xml/System.Threading.Tasks/Parallel.xml | 2 +- xml/System.Threading.Tasks/Task.xml | 2 +- xml/System.Threading.Tasks/TaskCreationOptions.xml | 2 +- xml/System.Threading.Tasks/TaskFactory.xml | 8 ++++---- xml/System.Threading.Tasks/Task`1.xml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/xml/System.Threading.Tasks/Parallel.xml b/xml/System.Threading.Tasks/Parallel.xml index ba3dc80b15b..4f82e8d1af0 100644 --- a/xml/System.Threading.Tasks/Parallel.xml +++ b/xml/System.Threading.Tasks/Parallel.xml @@ -49,7 +49,7 @@ All public and protected members of are thread-safe and may be used concurrently from multiple threads. Data Parallelism (Task Parallel Library) - Samples for Parallel Programming with the .NET Framework + Samples for Parallel Programming with the .NET Core and .NET Standard diff --git a/xml/System.Threading.Tasks/Task.xml b/xml/System.Threading.Tasks/Task.xml index c7f1cfe4c29..fc2830211c9 100644 --- a/xml/System.Threading.Tasks/Task.xml +++ b/xml/System.Threading.Tasks/Task.xml @@ -165,7 +165,7 @@ Task Parallel Library (TPL) Task-based Asynchronous Programming - Samples for Parallel Programming with the .NET Framework + Samples for Parallel Programming with the .NET Core and .NET Standard diff --git a/xml/System.Threading.Tasks/TaskCreationOptions.xml b/xml/System.Threading.Tasks/TaskCreationOptions.xml index 104cbb2c2ae..15b43b97806 100644 --- a/xml/System.Threading.Tasks/TaskCreationOptions.xml +++ b/xml/System.Threading.Tasks/TaskCreationOptions.xml @@ -66,7 +66,7 @@ ]]> - Samples for Parallel Programming with the .NET Framework + Samples for Parallel Programming with the .NET Core and .NET Standard diff --git a/xml/System.Threading.Tasks/TaskFactory.xml b/xml/System.Threading.Tasks/TaskFactory.xml index 13e0839bc7e..215de26c0db 100644 --- a/xml/System.Threading.Tasks/TaskFactory.xml +++ b/xml/System.Threading.Tasks/TaskFactory.xml @@ -83,7 +83,7 @@ All public and protected members of are thread-safe and may be used concurrently from multiple threads. Task Parallel Library (TPL) - Samples for Parallel Programming with the .NET Framework + Samples for Parallel Programming with the .NET Core and .NET Standard @@ -456,7 +456,7 @@ Creates a continuation task that starts when a set of specified tasks has completed. - Samples for Parallel Programming with the .NET Framework + Samples for Parallel Programming with the .NET Core and .NET Standard @@ -1586,7 +1586,7 @@ The NotOn\* and OnlyOn\* , Task Parallel Library (TPL) Chaining Tasks by Using Continuation Tasks Task Cancellation - Samples for Parallel Programming with the .NET Framework + Samples for Parallel Programming with the .NET Core and .NET Standard @@ -4458,7 +4458,7 @@ The NotOn\* and OnlyOn\* , ]]> - Samples for Parallel Programming with the .NET Framework + Samples for Parallel Programming with the .NET Core and .NET Standard diff --git a/xml/System.Threading.Tasks/Task`1.xml b/xml/System.Threading.Tasks/Task`1.xml index 2698a046954..cbdfe29636f 100644 --- a/xml/System.Threading.Tasks/Task`1.xml +++ b/xml/System.Threading.Tasks/Task`1.xml @@ -82,7 +82,7 @@ For operations that do not return a value, you use the Task Parallel Library (TPL) Task-based Asynchronous Programming - Samples for Parallel Programming with the .NET Framework + Samples for Parallel Programming with the .NET Core and .NET Standard From d38e75233e0c8eb5e045c934a7b64e95ec4df9c8 Mon Sep 17 00:00:00 2001 From: Meenal Patel <42360097+v-mepa@users.noreply.github.com> Date: Tue, 28 Apr 2020 13:23:06 -0700 Subject: [PATCH 3/5] .NET Interactive: Enable_try_dotnet_to_batch6a (#4167) * enable_try_dotnet * updated_last_two_url --- .../LinkedList`1.xml | 8 +- xml/System.Collections.Generic/List`1.xml | 108 +++++++++--------- 2 files changed, 58 insertions(+), 58 deletions(-) diff --git a/xml/System.Collections.Generic/LinkedList`1.xml b/xml/System.Collections.Generic/LinkedList`1.xml index 0be48642e72..4bb345b180d 100644 --- a/xml/System.Collections.Generic/LinkedList`1.xml +++ b/xml/System.Collections.Generic/LinkedList`1.xml @@ -187,10 +187,10 @@ ## Examples The following code example creates and initializes a of type , adds several nodes, and then displays its contents. - - [!code-cpp[System.Collections.Generic.LinkedList.ctor#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedList.ctor/CPP/llctor.cpp#1)] - [!code-csharp[System.Collections.Generic.LinkedList.ctor#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedList.ctor/CS/llctor.cs#1)] - [!code-vb[System.Collections.Generic.LinkedList.ctor#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.Generic.LinkedList.ctor/VB/llctor.vb#1)] + + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedList.ctor/CPP/llctor.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedList.ctor/CS/llctor.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.Generic.LinkedList.ctor/VB/llctor.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Collections.Generic/List`1.xml b/xml/System.Collections.Generic/List`1.xml index e67fdfb99ef..f1af49ae9bc 100644 --- a/xml/System.Collections.Generic/List`1.xml +++ b/xml/System.Collections.Generic/List`1.xml @@ -223,11 +223,11 @@ The following example demonstrates the parameterless constructor of the generic class. The parameterless constructor creates a list with the default capacity, as demonstrated by displaying the property. The example adds, inserts, and removes items, showing how the capacity changes as these methods are used. - - [!code-cpp[List\`1_Class#1](~/samples/snippets/cpp/VS_Snippets_CLR/List`1_Class/cpp/source.cpp#1)] - [!code-csharp-interactive[List\`1_Class#1](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_Class/cs/source.cs#1)] - [!code-vb[List\`1_Class#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_Class/vb/source.vb#1)] - [!code-fsharp[List\`1_Class#1](~/samples/snippets/fsharp/VS_Snippets_CLR/List`1_Class/fs/listclass.fs#1)] + + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/List`1_Class/cpp/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/List`1_Class/cs/source.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_Class/vb/source.vb" id="Snippet1"::: + :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR/List`1_Class/fs/listclass.fs" id="Snippet1"::: ]]> @@ -280,9 +280,9 @@ ## Examples The following example demonstrates the constructor and various methods of the class that act on ranges. An array of strings is created and passed to the constructor, populating the list with the elements of the array. The property is then displayed, to show that the initial capacity is exactly what is required to hold the input elements. - [!code-cpp[List\`1_Ranges#1](~/samples/snippets/cpp/VS_Snippets_CLR/List`1_Ranges/cpp/source.cpp#1)] - [!code-csharp[List\`1_Ranges#1](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_Ranges/cs/source.cs#1)] - [!code-vb[List\`1_Ranges#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_Ranges/vb/source.vb#1)] + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/List`1_Ranges/cpp/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/List`1_Ranges/cs/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_Ranges/vb/source.vb" id="Snippet1"::: ]]> @@ -347,10 +347,10 @@ ## Examples The following example demonstrates the constructor. A of strings with a capacity of 4 is created, because the ultimate size of the list is known to be exactly 4. The list is populated with four strings, and a read-only copy is created by using the method. - - [!code-cpp[List\`1_AsReadOnly#1](~/samples/snippets/cpp/VS_Snippets_CLR/List`1_AsReadOnly/cpp/source.cpp#1)] - [!code-csharp[List\`1_AsReadOnly#1](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_AsReadOnly/cs/source.cs#1)] - [!code-vb[List\`1_AsReadOnly#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_AsReadOnly/vb/source.vb#1)] + + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/List`1_AsReadOnly/cpp/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/List`1_AsReadOnly/cs/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_AsReadOnly/vb/source.vb" id="Snippet1"::: ]]> @@ -414,10 +414,10 @@ ## Examples The following example demonstrates how to add, remove, and insert a simple business object in a . - - [!code-csharp[System.Collections.Generic.List.AddRemoveInsert#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/cs/program.cs#1)] - [!code-vb[System.Collections.Generic.List.AddRemoveInsert#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/vb/module1.vb#1)] - [!code-fsharp[System.Collections.Generic.List.AddRemoveInsert#1](~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/fs/addremoveinsert.fs#1)] + + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/cs/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/vb/module1.vb" id="Snippet1"::: + :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/fs/addremoveinsert.fs" id="Snippet1"::: The following example demonstrates several properties and methods of the generic class, including the method. The parameterless constructor is used to create a list of strings with a capacity of 0. The property is displayed, and then the method is used to add several items. The items are listed, and the property is displayed again, along with the property, to show that the capacity has been increased as needed. @@ -488,9 +488,9 @@ ## Examples The following example demonstrates the method and various other methods of the class that act on ranges. An array of strings is created and passed to the constructor, populating the list with the elements of the array. The method is called, with the list as its argument. The result is that the current elements of the list are added to the end of the list, duplicating all the elements. - [!code-cpp[List\`1_Ranges#1](~/samples/snippets/cpp/VS_Snippets_CLR/List`1_Ranges/cpp/source.cpp#1)] - [!code-csharp[List\`1_Ranges#1](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_Ranges/cs/source.cs#1)] - [!code-vb[List\`1_Ranges#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_Ranges/vb/source.vb#1)] + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/List`1_Ranges/cpp/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/List`1_Ranges/cs/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_Ranges/vb/source.vb" id="Snippet1"::: ]]> @@ -553,10 +553,10 @@ The following example demonstrates the method. A of strings with a capacity of 4 is created, because the ultimate size of the list is known to be exactly 4. The list is populated with four strings, and the method is used to get a read-only generic interface implementation that wraps the original list. An element of the original list is set to "Coelophysis" using the property (the indexer in C#), and the contents of the read-only list are displayed again to demonstrate that it is just a wrapper for the original list. - - [!code-cpp[List\`1_AsReadOnly#1](~/samples/snippets/cpp/VS_Snippets_CLR/List`1_AsReadOnly/cpp/source.cpp#1)] - [!code-csharp[List\`1_AsReadOnly#1](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_AsReadOnly/cs/source.cs#1)] - [!code-vb[List\`1_AsReadOnly#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_AsReadOnly/vb/source.vb#1)] + + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/List`1_AsReadOnly/cpp/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/List`1_AsReadOnly/cs/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_AsReadOnly/vb/source.vb" id="Snippet1"::: ]]> @@ -634,9 +634,9 @@ The method overload is then used to search for two strings that are not in the list, and the method is used to insert them. The return value of the method is negative in each case, because the strings are not in the list. Taking the bitwise complement (the ~ operator in C# and Visual C++, `Xor` -1 in Visual Basic) of this negative number produces the index of the first element in the list that is larger than the search string, and inserting at this location preserves the sort order. The second search string is larger than any element in the list, so the insertion position is at the end of the list. - [!code-cpp[List\`1_SortSearch#1](~/samples/snippets/cpp/VS_Snippets_CLR/List`1_SortSearch/cpp/source.cpp#1)] - [!code-csharp[List\`1_SortSearch#1](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_SortSearch/cs/source.cs#1)] - [!code-vb[List\`1_SortSearch#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_SortSearch/vb/source.vb#1)] + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/List`1_SortSearch/cpp/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/List`1_SortSearch/cs/source.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_SortSearch/vb/source.vb" id="Snippet1"::: ]]> @@ -718,10 +718,10 @@ A of strings is created and populated with four strings, in no particular order. The list is displayed, sorted using the alternate comparer, and displayed again. The method overload is then used to search for several strings that are not in the list, employing the alternate comparer. The method is used to insert the strings. These two methods are located in the function named `SearchAndInsert`, along with code to take the bitwise complement (the ~ operator in C# and Visual C++, `Xor` -1 in Visual Basic) of the negative number returned by and use it as an index for inserting the new string. - - [!code-cpp[List\`1_SortSearchComparer#1](~/samples/snippets/cpp/VS_Snippets_CLR/List`1_SortSearchComparer/cpp/source.cpp#1)] - [!code-csharp[List\`1_SortSearchComparer#1](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_SortSearchComparer/cs/source.cs#1)] - [!code-vb[List\`1_SortSearchComparer#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_SortSearchComparer/vb/source.vb#1)] + + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/List`1_SortSearchComparer/cpp/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/List`1_SortSearchComparer/cs/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_SortSearchComparer/vb/source.vb" id="Snippet1"::: ]]> @@ -804,10 +804,10 @@ A of strings is created and populated with the names of five herbivorous dinosaurs and three carnivorous dinosaurs. Within each of the two groups, the names are not in any particular sort order. The list is displayed, the range of herbivores is sorted using the alternate comparer, and the list is displayed again. The method overload is then used to search only the range of herbivores for "Brachiosaurus". The string is not found, and the bitwise complement (the ~ operator in C# and Visual C++, `Xor` -1 in Visual Basic) of the negative number returned by the method is used as an index for inserting the new string. - - [!code-cpp[List\`1_SortSearchComparerRange#1](~/samples/snippets/cpp/VS_Snippets_CLR/List`1_SortSearchComparerRange/cpp/source.cpp#1)] - [!code-csharp[List\`1_SortSearchComparerRange#1](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_SortSearchComparerRange/cs/source.cs#1)] - [!code-vb[List\`1_SortSearchComparerRange#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_SortSearchComparerRange/vb/source.vb#1)] + + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/List`1_SortSearchComparerRange/cpp/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/List`1_SortSearchComparerRange/cs/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_SortSearchComparerRange/vb/source.vb" id="Snippet1"::: ]]> @@ -883,8 +883,8 @@ The following example demonstrates how to check the capacity and count of a that contains a simple business object, and illustrates using the method to remove extra capacity. - [!code-csharp[System.Collections.Generic.List.CapacityCount#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.capacitycount/cs/program.cs#1)] - [!code-vb[System.Collections.Generic.List.CapacityCount#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.list.capacitycount/vb/module1.vb#1)] + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.capacitycount/cs/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.list.capacitycount/vb/module1.vb" id="Snippet1"::: The following example shows the property at several points in the life of a list. The parameterless constructor is used to create a list of strings with a capacity of 0, and the property is displayed to demonstrate this. After the method has been used to add several items, the items are listed, and then the property is displayed again, along with the property, to show that the capacity has been increased as needed. @@ -1023,14 +1023,14 @@ ## Examples The following example demonstrates the and methods on a that contains a simple business object that implements . - - [!code-csharp[System.Collections.Generic.List.ContainsExists#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.containsexists/cs/program.cs#1)] - [!code-vb[System.Collections.Generic.List.ContainsExists#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.list.containsexists/vb/module1.vb#1)] + + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.containsexists/cs/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.list.containsexists/vb/module1.vb" id="Snippet1"::: The following example contains a list of complex objects of type `Cube`. The `Cube` class implements the method so that two cubes are considered equal if their dimensions are the same. In this example, the method returns `true`, because a cube that has the specified dimensions is already in the collection. - - [!code-csharp[System.Collections.Generic.List.Contains#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.contains/cs/program.cs#1)] - [!code-vb[System.Collections.Generic.List.Contains#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.list.contains/vb/program.vb#1)] + + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.contains/cs/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.list.contains/vb/program.vb" id="Snippet1"::: ]]> @@ -1093,10 +1093,10 @@ ## Examples The following example defines a method named `PointFToPoint` that converts a structure to a structure. The example then creates a of structures, creates a `Converter\` delegate (`Converter(Of PointF, Point)` in Visual Basic) to represent the `PointFToPoint` method, and passes the delegate to the method. The method passes each element of the input list to the `PointFToPoint` method and puts the converted elements into a new list of structures. Both lists are displayed. - - [!code-cpp[List\`1_ConvertAll#1](~/samples/snippets/cpp/VS_Snippets_CLR/List`1_ConvertAll/cpp/source.cpp#1)] - [!code-csharp[List\`1_ConvertAll#1](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_ConvertAll/cs/source.cs#1)] - [!code-vb[List\`1_ConvertAll#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_ConvertAll/vb/source.vb#1)] + + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/List`1_ConvertAll/cpp/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/List`1_ConvertAll/cs/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_ConvertAll/vb/source.vb" id="Snippet1"::: ]]> @@ -1392,16 +1392,16 @@ ## Examples The following example demonstrates how to check the capacity and count of a that contains a simple business object, and illustrates using the method to remove extra capacity. - - [!code-csharp[System.Collections.Generic.List.CapacityCount#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.capacitycount/cs/program.cs#1)] - [!code-vb[System.Collections.Generic.List.CapacityCount#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.list.capacitycount/vb/module1.vb#1)] + + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.capacitycount/cs/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.list.capacitycount/vb/module1.vb" id="Snippet1"::: The following example shows the value of the property at various points in the life of a list. After the list has been created and populated and its elements displayed, the and properties are displayed. These properties are displayed again after the method has been called, and again after the contents of the list are cleared. - - [!code-cpp[List\`1_Class#1](~/samples/snippets/cpp/VS_Snippets_CLR/List`1_Class/cpp/source.cpp#1)] - [!code-csharp-interactive[List\`1_Class#1](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_Class/cs/source.cs#1)] - [!code-vb[List\`1_Class#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_Class/vb/source.vb#1)] - [!code-fsharp[List\`1_Class#1](~/samples/snippets/fsharp/VS_Snippets_CLR/List`1_Class/fs/listclass.fs#1)] + + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/List`1_Class/cpp/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/List`1_Class/cs/source.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_Class/vb/source.vb" id="Snippet1"::: + :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR/List`1_Class/fs/listclass.fs" id="Snippet1"::: ]]> From c29b6977d26a2f4235822ba72c86e765210a0599 Mon Sep 17 00:00:00 2001 From: Meenal Patel <42360097+v-mepa@users.noreply.github.com> Date: Tue, 28 Apr 2020 16:05:29 -0700 Subject: [PATCH 4/5] enable_try_dotnet_to_batch_6b (#4171) --- xml/System.Collections.Generic/List`1.xml | 94 +++++++++++------------ 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/xml/System.Collections.Generic/List`1.xml b/xml/System.Collections.Generic/List`1.xml index f1af49ae9bc..d0f0a6fbadf 100644 --- a/xml/System.Collections.Generic/List`1.xml +++ b/xml/System.Collections.Generic/List`1.xml @@ -1460,8 +1460,8 @@ ## Examples The following example demonstrates the and methods on a that contains a simple business object that implements . - [!code-csharp[System.Collections.Generic.List.ContainsExists#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.containsexists/cs/program.cs#1)] - [!code-vb[System.Collections.Generic.List.ContainsExists#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.list.containsexists/vb/module1.vb#1)] + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.containsexists/cs/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.list.containsexists/vb/module1.vb" id="Snippet1"::: The following example demonstrates the method and several other methods that use the generic delegate. @@ -1473,10 +1473,10 @@ > [!NOTE] > In C# and Visual Basic, it is not necessary to create the `Predicate` delegate (`Predicate(Of String)` in Visual Basic) explicitly. These languages infer the correct delegate from context and create it automatically. - - [!code-cpp[List\`1_FindEtAl#1](~/samples/snippets/cpp/VS_Snippets_CLR/List`1_FindEtAl/cpp/source.cpp#1)] - [!code-csharp[List\`1_FindEtAl#1](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_FindEtAl/cs/source.cs#1)] - [!code-vb[List\`1_FindEtAl#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_FindEtAl/vb/source.vb#1)] + + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/List`1_FindEtAl/cpp/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/List`1_FindEtAl/cs/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_FindEtAl/vb/source.vb" id="Snippet1"::: ]]> @@ -1746,8 +1746,8 @@ Public Function StartsWith(e As Employee) As Boolean corresponds to the signature of the delegate that can be passed to the method. The example instantiates a `List` object, adds a number of `Employee` objects to it, and then calls the method twice to search the entire collection, the first time for the first `Employee` object whose `Name` field begins with "J", and the second time for the first `Employee` object whose `Name` field begins with "Ju". - [!code-csharp[System.Collections.Generic.List.FindIndex#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Collections.Generic.List.FindIndex/cs/FindIndex2.cs#2)] - [!code-vb[System.Collections.Generic.List.FindIndex#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Collections.Generic.List.FindIndex/vb/FindIndex2.vb#2)] + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Collections.Generic.List.FindIndex/cs/FindIndex2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Collections.Generic.List.FindIndex/vb/FindIndex2.vb" id="Snippet2"::: ]]> @@ -1836,9 +1836,9 @@ Public Function StartsWith(e As Employee) As Boolean ``` corresponds to the signature of the delegate that can be passed to the method. The example instantiates a `List` object, adds a number of `Employee` objects to it, and then calls the method twice to search the collection starting with its fifth member (that is, the member at index 4). The first time, it searches for the first `Employee` object whose `Name` field begins with "J"; the second time, it searches for the first `Employee` object whose `Name` field begins with "Ju". - - [!code-csharp[System.Collections.Generic.List.FindIndex#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Collections.Generic.List.FindIndex/cs/FindIndex3.cs#3)] - [!code-vb[System.Collections.Generic.List.FindIndex#3](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Collections.Generic.List.FindIndex/vb/FindIndex3.vb#3)] + + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Collections.Generic.List.FindIndex/cs/FindIndex3.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Collections.Generic.List.FindIndex/vb/FindIndex3.vb" id="Snippet3"::: ]]> @@ -1932,8 +1932,8 @@ Public Function StartsWith(e As Employee) As Boolean corresponds to the signature of the delegate that can be passed to the method. The example instantiates a `List` object, adds a number of `Employee` objects to it, and then calls the method twice to search the entire collection (that is, the members from index 0 to index - 1). The first time, it searches for the first `Employee` object whose `Name` field begins with "J"; the second time, it searches for the first `Employee` object whose `Name` field begins with "Ju". - [!code-csharp[System.Collections.Generic.List.FindIndex#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Collections.Generic.List.FindIndex/cs/FindIndex1.cs#1)] - [!code-vb[System.Collections.Generic.List.FindIndex#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Collections.Generic.List.FindIndex/vb/FindIndex1.vb#1)] + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Collections.Generic.List.FindIndex/cs/FindIndex1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Collections.Generic.List.FindIndex/vb/FindIndex1.vb" id="Snippet1"::: ]]> @@ -2356,8 +2356,8 @@ Public Function StartsWith(e As Employee) As Boolean > [!NOTE] > In addition to displaying the contents using the `Print` method, the C# example demonstrates the use of [anonymous methods](~/docs/csharp/programming-guide/statements-expressions-operators/anonymous-methods.md) to display the results to the console. - [!code-csharp[System.Action_PrintExample#01](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Action_PrintExample/cs/action.cs#01)] - [!code-vb[System.Action_PrintExample#01](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Action_PrintExample/vb/action.vb#01)] + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Action_PrintExample/cs/action.cs" interactive="try-dotnet-method" id="Snippet01"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Action_PrintExample/vb/action.vb" id="Snippet01"::: ]]> @@ -2492,10 +2492,10 @@ Public Function StartsWith(e As Employee) As Boolean ## Examples The following example demonstrates the method and other methods of the class that act on ranges. At the end of the example, the method is used to get three items from the list, beginning with index location 2. The method is called on the resulting , creating an array of three elements. The elements of the array are displayed. - [!code-cpp[List\`1_Ranges#1](~/samples/snippets/cpp/VS_Snippets_CLR/List`1_Ranges/cpp/source.cpp#1)] - [!code-csharp[List\`1_Ranges#1](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_Ranges/cs/source.cs#1)] - [!code-vb[List\`1_Ranges#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_Ranges/vb/source.vb#1)] - + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/List`1_Ranges/cpp/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/List`1_Ranges/cs/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_Ranges/vb/source.vb" id="Snippet1"::: + ]]> @@ -2800,16 +2800,16 @@ Public Function StartsWith(e As Employee) As Boolean The following example demonstrates how to add, remove, and insert a simple business object in a . - [!code-csharp[System.Collections.Generic.List.AddRemoveInsert#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/cs/program.cs#1)] - [!code-vb[System.Collections.Generic.List.AddRemoveInsert#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/vb/module1.vb#1)] - [!code-fsharp[System.Collections.Generic.List.AddRemoveInsert#1](~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/fs/addremoveinsert.fs#1)] + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/cs/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/vb/module1.vb" id="Snippet1"::: + :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/fs/addremoveinsert.fs" id="Snippet1"::: The following example demonstrates the method, along with various other properties and methods of the generic class. After the list is created, elements are added. The method is used to insert an item into the middle of the list. The item inserted is a duplicate, which is later removed using the method. - [!code-cpp[List\`1_Class#1](~/samples/snippets/cpp/VS_Snippets_CLR/List`1_Class/cpp/source.cpp#1)] - [!code-csharp-interactive[List\`1_Class#1](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_Class/cs/source.cs#1)] - [!code-vb[List\`1_Class#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_Class/vb/source.vb#1)] - [!code-fsharp[List\`1_Class#1](~/samples/snippets/fsharp/VS_Snippets_CLR/List`1_Class/fs/listclass.fs#1)] + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/List`1_Class/cpp/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/List`1_Class/cs/source.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_Class/vb/source.vb" id="Snippet1"::: + :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR/List`1_Class/fs/listclass.fs" id="Snippet1"::: ]]> @@ -2882,9 +2882,9 @@ Public Function StartsWith(e As Employee) As Boolean ## Examples The following example demonstrates method and various other methods of the class that act on ranges. After the list has been created and populated with the names of several peaceful plant-eating dinosaurs, the method is used to insert an array of three ferocious meat-eating dinosaurs into the list, beginning at index location 3. - [!code-cpp[List\`1_Ranges#1](~/samples/snippets/cpp/VS_Snippets_CLR/List`1_Ranges/cpp/source.cpp#1)] - [!code-csharp[List\`1_Ranges#1](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_Ranges/cs/source.cs#1)] - [!code-vb[List\`1_Ranges#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_Ranges/vb/source.vb#1)] + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/List`1_Ranges/cpp/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/List`1_Ranges/cs/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_Ranges/vb/source.vb" id="Snippet1"::: ]]> @@ -2971,10 +2971,10 @@ Public Function StartsWith(e As Employee) As Boolean The C# language uses the [`this`](~/docs/csharp/language-reference/keywords/this.md) keyword to define the indexers instead of implementing the property. Visual Basic implements as a default property, which provides the same indexing functionality. - [!code-csharp[List`1_Class#2](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_Class/cs/source.cs#2)] - [!code-vb[List`1_Class#2](~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_Class/vb/source.vb#2)] -[!code-csharp[List`1_Class#3](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_Class/cs/source.cs#3)] -[!code-vb[List`1_Class#3](~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_Class/vb/source.vb#3)] + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/List`1_Class/cs/source.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_Class/vb/source.vb" id="Snippet2"::: + [!code-csharp[List`1_Class#3](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_Class/cs/source.cs#3)] + [!code-vb[List`1_Class#3](~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_Class/vb/source.vb#3)] ]]> @@ -3269,16 +3269,16 @@ Public Function StartsWith(e As Employee) As Boolean The following example demonstrates how to add, remove, and insert a simple business object in a . - [!code-csharp[System.Collections.Generic.List.AddRemoveInsert#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/cs/program.cs#1)] - [!code-vb[System.Collections.Generic.List.AddRemoveInsert#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/vb/module1.vb#1)] - [!code-fsharp[System.Collections.Generic.List.AddRemoveInsert#1](~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/fs/addremoveinsert.fs#1)] + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/cs/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/vb/module1.vb" id="Snippet1"::: + :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/fs/addremoveinsert.fs" id="Snippet1"::: The following example demonstrates method. Several properties and methods of the generic class are used to add, insert, and search the list. After these operations, the list contains a duplicate. The method is used to remove the first instance of the duplicate item, and the contents are displayed. The method always removes the first instance it encounters. - [!code-cpp[List\`1_Class#1](~/samples/snippets/cpp/VS_Snippets_CLR/List`1_Class/cpp/source.cpp#1)] - [!code-csharp-interactive[List\`1_Class#1](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_Class/cs/source.cs#1)] - [!code-vb[List\`1_Class#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_Class/vb/source.vb#1)] - [!code-fsharp[List\`1_Class#1](~/samples/snippets/fsharp/VS_Snippets_CLR/List`1_Class/fs/listclass.fs#1)] + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/List`1_Class/cpp/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/List`1_Class/cs/source.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_Class/vb/source.vb" id="Snippet1"::: + :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR/List`1_Class/fs/listclass.fs" id="Snippet1"::: ]]> @@ -3350,10 +3350,10 @@ Public Function StartsWith(e As Employee) As Boolean > In C# and Visual Basic, it is not necessary to create the `Predicate` delegate (`Predicate(Of String)` in Visual Basic) explicitly. These languages infer the correct delegate from context, and create it automatically. Finally, the method verifies that there are no strings in the list that end with "saurus". - - [!code-cpp[List\`1_FindEtAl#1](~/samples/snippets/cpp/VS_Snippets_CLR/List`1_FindEtAl/cpp/source.cpp#1)] - [!code-csharp[List\`1_FindEtAl#1](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_FindEtAl/cs/source.cs#1)] - [!code-vb[List\`1_FindEtAl#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_FindEtAl/vb/source.vb#1)] + + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/List`1_FindEtAl/cpp/source.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/List`1_FindEtAl/cs/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_FindEtAl/vb/source.vb" id="Snippet1"::: ]]> @@ -3420,9 +3420,9 @@ Public Function StartsWith(e As Employee) As Boolean ## Examples The following example demonstrates how to add, remove, and insert a simple business object in a . - [!code-csharp[System.Collections.Generic.List.AddRemoveInsert#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/cs/program.cs#1)] - [!code-vb[System.Collections.Generic.List.AddRemoveInsert#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/vb/module1.vb#1)] - [!code-fsharp[System.Collections.Generic.List.AddRemoveInsert#1](~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/fs/addremoveinsert.fs#1)] + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/cs/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/vb/module1.vb" id="Snippet1"::: + :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/fs/addremoveinsert.fs" id="Snippet1"::: ]]> From 95591fd5bc646a20c7f1f0d2cde3a4f78a26e4b1 Mon Sep 17 00:00:00 2001 From: Layomi Akinrinade Date: Tue, 28 Apr 2020 23:48:48 -0400 Subject: [PATCH 5/5] Add missing docs for System.Collections[.Generic] (#4121) * Add missing docs for System.Collections[.Generic] * Add exceptions * Add System. prefix to exceptions * Address feedback - use tool to port exceptions --- .../Dictionary`2.xml | 31 ++++++---- .../KeyValuePair`2.xml | 8 +-- xml/System.Collections.Generic/Queue`1.xml | 18 +++--- .../ReferenceEqualityComparer.xml | 53 ++++++++++++----- xml/System.Collections.Generic/Stack`1.xml | 16 ++--- xml/System.Collections/BitArray.xml | 58 +++++++++++++++---- xml/System.Collections/DictionaryEntry.xml | 8 +-- 7 files changed, 136 insertions(+), 56 deletions(-) diff --git a/xml/System.Collections.Generic/Dictionary`2.xml b/xml/System.Collections.Generic/Dictionary`2.xml index 5b296a25111..a5eecf9a961 100644 --- a/xml/System.Collections.Generic/Dictionary`2.xml +++ b/xml/System.Collections.Generic/Dictionary`2.xml @@ -1,4 +1,4 @@ - + @@ -331,9 +331,13 @@ - To be added. - To be added. + The whose elements are copied to the new . + Initializes a new instance of the class that contains elements copied from the specified . To be added. + + is . + + contains one or more duplicated keys. @@ -567,10 +571,14 @@ - To be added. - To be added. - To be added. + The whose elements are copied to the new . + The implementation to use when comparing keys, or to use the default for the type of the key. + Initializes a new instance of the class that contains elements copied from the specified and uses the specified . To be added. + + is . + + contains one or more duplicated keys. @@ -1506,11 +1514,14 @@ - To be added. - To be added. - To be added. - To be added. + The key of the element to remove. + The removed element. + Removes the value with the specified key from the , and copies the element to the parameter. + + if the element is successfully found and removed; otherwise, . To be added. + + is . diff --git a/xml/System.Collections.Generic/KeyValuePair`2.xml b/xml/System.Collections.Generic/KeyValuePair`2.xml index 9b639718393..ad93f15f07d 100644 --- a/xml/System.Collections.Generic/KeyValuePair`2.xml +++ b/xml/System.Collections.Generic/KeyValuePair`2.xml @@ -1,4 +1,4 @@ - + @@ -159,9 +159,9 @@ - To be added. - To be added. - To be added. + The key of the current . + The value of the current . + Deconstructs the current . To be added. diff --git a/xml/System.Collections.Generic/Queue`1.xml b/xml/System.Collections.Generic/Queue`1.xml index 6e87616a8c1..84fee85c5ab 100644 --- a/xml/System.Collections.Generic/Queue`1.xml +++ b/xml/System.Collections.Generic/Queue`1.xml @@ -1,4 +1,4 @@ - + @@ -1333,10 +1333,13 @@ finally { - To be added. - To be added. - To be added. + The removed object. + Removes the object at the beginning of the , and copies it to the parameter. + + if the object is successfully removed; if the is empty. To be added. + + is . @@ -1368,9 +1371,10 @@ finally { - To be added. - To be added. - To be added. + If present, the object at the beginning of the ; otherwise, the default value of . + Returns a value that indicates whether there is an object at the beginning of the , and if one is present, copies it to the parameter. The object is not removed from the . + + if there is an object at the beginning of the ; if the is empty. To be added. diff --git a/xml/System.Collections.Generic/ReferenceEqualityComparer.xml b/xml/System.Collections.Generic/ReferenceEqualityComparer.xml index 8e15b17a4d8..628aa5c7f03 100644 --- a/xml/System.Collections.Generic/ReferenceEqualityComparer.xml +++ b/xml/System.Collections.Generic/ReferenceEqualityComparer.xml @@ -1,4 +1,4 @@ - + @@ -21,8 +21,16 @@ - To be added. - To be added. + An that uses reference equality () instead of value equality () when comparing two object instances. + + type cannot be instantiated. Instead, use the property to access the singleton instance of this type. + + ]]> + @@ -49,11 +57,21 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + The first object to compare. + The second object to compare. + Determines whether two object references refer to the same object instance. + + if both and refer to the same object instance or if both are ; otherwise, . + + . + It is not necessarily equivalent to calling . + + ]]> + @@ -79,10 +97,19 @@ - To be added. - To be added. - To be added. - To be added. + The object for which to retrieve the hash code. + Returns a hash code for the specified object. The returned hash code is based on the object identity, not on the contents of the object. + A hash code for the identity of . + + . + It is not necessarily equivalent to calling . + + ]]> + @@ -101,7 +128,7 @@ System.Collections.Generic.ReferenceEqualityComparer - To be added. + Gets the singleton instance. To be added. To be added. diff --git a/xml/System.Collections.Generic/Stack`1.xml b/xml/System.Collections.Generic/Stack`1.xml index eded4d084de..4197df8ec81 100644 --- a/xml/System.Collections.Generic/Stack`1.xml +++ b/xml/System.Collections.Generic/Stack`1.xml @@ -1,4 +1,4 @@ - + @@ -1367,9 +1367,10 @@ finally { - To be added. - To be added. - To be added. + If present, the object at the top of the ; otherwise, the default value of . + Returns a value that indicates whether there is an object at the top of the , and if one is present, copies it to the parameter. The object is not removed from the . + + if there is an object at the top of the ; if the is empty. To be added. @@ -1402,9 +1403,10 @@ finally { - To be added. - To be added. - To be added. + If present, the object at the top of the ; otherwise, the default value of . + Returns a value that indicates whether there is an object at the top of the , and if one is present, copies it to the parameter, and removes it from the . + + if there is an object at the top of the ; if the is empty. To be added. diff --git a/xml/System.Collections/BitArray.xml b/xml/System.Collections/BitArray.xml index 7ef669f1c00..f2acd13b5cd 100644 --- a/xml/System.Collections/BitArray.xml +++ b/xml/System.Collections/BitArray.xml @@ -1,4 +1,4 @@ - + @@ -959,10 +959,20 @@ - To be added. - To be added. - To be added. - To be added. + The number of shifts to make for each bit. + Shifts all the bit values of the current to the left on bits. + The current . + + is updated and returned. + + ]]> + + + is less than zero. @@ -1165,10 +1175,20 @@ - To be added. - To be added. - To be added. - To be added. + The number of shifts to make for each bit. + Shifts all the bit values of the current to the right on bits. + The current . + + is updated and returned. + + ]]> + + + is less than zero. @@ -1454,7 +1474,15 @@ Gets a value that indicates whether access to the is synchronized (thread safe). true if access to the is synchronized (thread safe); otherwise, false. - To be added. + + instance is cast to an interface. + + ]]> + @@ -1485,7 +1513,15 @@ Gets an object that can be used to synchronize access to the . An object that can be used to synchronize access to the . - To be added. + + instance is cast to an interface. + + ]]> + diff --git a/xml/System.Collections/DictionaryEntry.xml b/xml/System.Collections/DictionaryEntry.xml index c580fb6d720..37b9d281028 100644 --- a/xml/System.Collections/DictionaryEntry.xml +++ b/xml/System.Collections/DictionaryEntry.xml @@ -1,4 +1,4 @@ - + @@ -165,9 +165,9 @@ The - To be added. - To be added. - To be added. + The key of the current . + The value of the current . + Deconstructs the current . To be added.