diff --git a/includes/csharp-interactive-with-utc-note.md b/includes/csharp-interactive-with-utc-note.md deleted file mode 100644 index 0a10a1a202e..00000000000 --- a/includes/csharp-interactive-with-utc-note.md +++ /dev/null @@ -1,5 +0,0 @@ - -> [!NOTE] -> Some C# examples in this article run in the [Try.NET](https://github.com/dotnet/try) inline code runner and playground. Select **Run** to run an example in an interactive window. Once you execute the code, you can modify it and run the modified code by selecting **Run** again. The modified code either runs in the interactive window or, if compilation fails, the interactive window displays all C# compiler error messages. -> -> The [local time zone](xref:System.TimeZoneInfo.Local) of the [Try.NET](https://github.com/dotnet/try) inline code runner and playground is Coordinated Universal Time, or UTC. This might affect the behavior and the output of examples that illustrate the , , and types and their members. diff --git a/xml/System.Collections.Generic/Comparer`1.xml b/xml/System.Collections.Generic/Comparer`1.xml index 394a2d8a7fc..8c6da334783 100644 --- a/xml/System.Collections.Generic/Comparer`1.xml +++ b/xml/System.Collections.Generic/Comparer`1.xml @@ -94,7 +94,7 @@ ## Examples The following example derives a class, `BoxLengthFirst`, from the class. This comparer compares two objects of type `Box`. It sorts them first by length, then by height, and then by width. The `Box` class implements the interface to control the default comparison between two `Box` objects. This default implementation sorts first by height, then by length, and then by width. The example shows the differences between the two comparisons by sorting a list of `Box` objects first by using the `BoxLengthFirst` comparer and then by using the default comparer. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ComparerT/Overview/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ComparerT/Overview/program.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/ComparerT/Overview/program.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ComparerT/Overview/program.vb" id="Snippet1"::: diff --git a/xml/System.Collections.Generic/Dictionary`2.xml b/xml/System.Collections.Generic/Dictionary`2.xml index 8161356e8bb..421a1d41440 100644 --- a/xml/System.Collections.Generic/Dictionary`2.xml +++ b/xml/System.Collections.Generic/Dictionary`2.xml @@ -326,7 +326,7 @@ ## Examples The following code example shows how to use the constructor to initialize a with sorted content from another dictionary. The code example creates a and populates it with data in random order, then passes the to the constructor, creating a that is sorted. This is useful if you need to build a sorted dictionary that at some point becomes static; copying the data from a to a improves retrieval speed. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/DictionaryTKey,TValue/.ctor/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/DictionaryTKey,TValue/.ctor/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/DictionaryTKey,TValue/.ctor/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/DictionaryTKey,TValue/.ctor/source.vb" id="Snippet1"::: @@ -455,7 +455,7 @@ ## Examples The following code example creates a with a case-insensitive equality comparer for the current culture. The example adds four elements, some with lower-case keys and some with upper-case keys. The example then attempts to add an element with a key that differs from an existing key only by case, catches the resulting exception, and displays an error message. Finally, the example displays the elements in the dictionary. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/DictionaryTKey,TValue/.ctor/source2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/DictionaryTKey,TValue/.ctor/source2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/DictionaryTKey,TValue/.ctor/source2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/DictionaryTKey,TValue/.ctor/source2.vb" id="Snippet1"::: @@ -524,7 +524,7 @@ ## Examples The following code example creates a dictionary with an initial capacity of 4 and populates it with 4 entries. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/DictionaryTKey,TValue/.ctor/source3.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/DictionaryTKey,TValue/.ctor/source3.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/DictionaryTKey,TValue/.ctor/source3.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/DictionaryTKey,TValue/.ctor/source3.vb" id="Snippet1"::: @@ -610,7 +610,7 @@ > [!NOTE] > When you create a new dictionary with a case-insensitive comparer and populate it with entries from a dictionary that uses a case-sensitive comparer, as in this example, an exception occurs if the input dictionary has keys that differ only by case. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/DictionaryTKey,TValue/.ctor/source1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/DictionaryTKey,TValue/.ctor/source1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/DictionaryTKey,TValue/.ctor/source1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/DictionaryTKey,TValue/.ctor/source1.vb" id="Snippet1"::: @@ -753,7 +753,7 @@ ## Examples The following code example creates a with an initial capacity of 5 and a case-insensitive equality comparer for the current culture. The example adds four elements, some with lower-case keys and some with upper-case keys. The example then attempts to add an element with a key that differs from an existing key only by case, catches the resulting exception, and displays an error message. Finally, the example displays the elements in the dictionary. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/DictionaryTKey,TValue/.ctor/source4.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/DictionaryTKey,TValue/.ctor/source4.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/DictionaryTKey,TValue/.ctor/source4.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/DictionaryTKey,TValue/.ctor/source4.vb" id="Snippet1"::: diff --git a/xml/System.Collections.Generic/EqualityComparer`1.xml b/xml/System.Collections.Generic/EqualityComparer`1.xml index fd81847d3af..5f5dc1998dd 100644 --- a/xml/System.Collections.Generic/EqualityComparer`1.xml +++ b/xml/System.Collections.Generic/EqualityComparer`1.xml @@ -76,24 +76,24 @@ The type of objects to compare. Provides a base class for implementations of the generic interface. - generic interface for use with collection classes such as the generic class, or with methods such as . - -The property checks whether type `T` implements the generic interface and, if so, returns an that invokes the implementation of the method. Otherwise, it returns an , as provided by `T`. - -In .NET 8 and later versions, we recommend using the method to create instances of this type. - -## Examples - The following example creates a dictionary collection of objects of type `Box` with an equality comparer. Two boxes are considered equal if their dimensions are the same. It then adds the boxes to the collection. - - The dictionary is recreated with an equality comparer that defines equality in a different way: Two boxes are considered equal if their volumes are the same. - - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/EqualityComparerT/Overview/program.cs" interactive="try-dotnet" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/EqualityComparerT/Overview/program.vb" id="Snippet1"::: - + generic interface for use with collection classes such as the generic class, or with methods such as . + +The property checks whether type `T` implements the generic interface and, if so, returns an that invokes the implementation of the method. Otherwise, it returns an , as provided by `T`. + +In .NET 8 and later versions, we recommend using the method to create instances of this type. + +## Examples + The following example creates a dictionary collection of objects of type `Box` with an equality comparer. Two boxes are considered equal if their dimensions are the same. It then adds the boxes to the collection. + + The dictionary is recreated with an equality comparer that defines equality in a different way: Two boxes are considered equal if their volumes are the same. + + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/EqualityComparerT/Overview/program.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/EqualityComparerT/Overview/program.vb" id="Snippet1"::: + ]]> @@ -180,7 +180,7 @@ In .NET 8 and later versions, we recommend using the The delegate to use to implement the method. - The delegate to use to implement the method. + The delegate to use to implement the method. If no delegate is supplied, calls to the resulting comparer's will throw . Creates an by using the specified delegates as the implementation of the comparer's and methods. The new comparer. @@ -238,23 +238,23 @@ In .NET 8 and later versions, we recommend using the Returns a default equality comparer for the type specified by the generic argument. The default instance of the class for type . - property checks whether type `T` implements the interface and, if so, returns an that uses that implementation. Otherwise, it returns an that uses the overrides of and provided by `T`. - - - -## Examples - The following example creates a collection that contains elements of the `Box` type and then searches it for a box matching another box by calling the `FindFirst` method, twice. - - The first search does not specify any equality comparer, which means `FindFirst` uses to determine equality of boxes. That in turn uses the implementation of the method in the `Box` class. Two boxes are considered equal if their dimensions are the same. - - The second search specifies an equality comparer (`BoxEqVolume`) that defines equality by volume. Two boxes are considered equal if their volumes are the same. - - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/EqualityComparerT/Default/program.cs" interactive="try-dotnet"::: - :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/EqualityComparerT/Default/program.vb"::: - + property checks whether type `T` implements the interface and, if so, returns an that uses that implementation. Otherwise, it returns an that uses the overrides of and provided by `T`. + + + +## Examples + The following example creates a collection that contains elements of the `Box` type and then searches it for a box matching another box by calling the `FindFirst` method, twice. + + The first search does not specify any equality comparer, which means `FindFirst` uses to determine equality of boxes. That in turn uses the implementation of the method in the `Box` class. Two boxes are considered equal if their dimensions are the same. + + The second search specifies an equality comparer (`BoxEqVolume`) that defines equality by volume. Two boxes are considered equal if their volumes are the same. + + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/EqualityComparerT/Default/program.cs" interactive="try-dotnet"::: + :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/EqualityComparerT/Default/program.vb"::: + ]]> @@ -327,11 +327,11 @@ In .NET 8 and later versions, we recommend using the if the specified objects are equal; otherwise, . - method is reflexive, symmetric, and transitive. That is, it returns `true` if used to compare an object with itself; `true` for two objects `x` and `y` if it is `true` for `y` and `x`; and `true` for two objects `x` and `z` if it is `true` for `x` and `y` and also `true` for `y` and `z`. - + method is reflexive, symmetric, and transitive. That is, it returns `true` if used to compare an object with itself; `true` for two objects `x` and `y` if it is `true` for `y` and `x`; and `true` for two objects `x` and `z` if it is `true` for `x` and `y` and also `true` for `y` and `z`. + ]]> @@ -449,13 +449,13 @@ In .NET 8 and later versions, we recommend using the if the specified objects are equal; otherwise, . - method, so `obj` must be cast to the type specified by the generic argument `T` of the current instance. If it cannot be cast to `T`, an is thrown. - - Comparing `null` is allowed and does not generate an exception. - + method, so `obj` must be cast to the type specified by the generic argument `T` of the current instance. If it cannot be cast to `T`, an is thrown. + + Comparing `null` is allowed and does not generate an exception. + ]]> @@ -509,17 +509,17 @@ In .NET 8 and later versions, we recommend using the Returns a hash code for the specified object. A hash code for the specified object. - method, so `obj` must be a type that can be cast to the type specified by the generic type argument `T` of the current instance. - + method, so `obj` must be a type that can be cast to the type specified by the generic type argument `T` of the current instance. + ]]> - The type of is a reference type and is . - - -or- - + The type of is a reference type and is . + + -or- + is of a type that cannot be cast to type . diff --git a/xml/System.Collections.Generic/ICollection`1.xml b/xml/System.Collections.Generic/ICollection`1.xml index ab768986d05..a0f1011c7d3 100644 --- a/xml/System.Collections.Generic/ICollection`1.xml +++ b/xml/System.Collections.Generic/ICollection`1.xml @@ -82,7 +82,7 @@ This example also implements an interface for the `BoxCollection` class so that the collection can be enumerated. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ICollectionT/Overview/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ICollectionT/Overview/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ICollectionT/Overview/program.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Collections.Generic/IDictionary`2.xml b/xml/System.Collections.Generic/IDictionary`2.xml index 8de3df90619..938f6f999dd 100644 --- a/xml/System.Collections.Generic/IDictionary`2.xml +++ b/xml/System.Collections.Generic/IDictionary`2.xml @@ -111,7 +111,7 @@ Finally, the example shows how to enumerate the keys and values in the dictionary, and how to enumerate the values alone using the property. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/IDictionaryTKey,TValue/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/IDictionaryTKey,TValue/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/IDictionaryTKey,TValue/Overview/source.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Collections.Generic/IEqualityComparer`1.xml b/xml/System.Collections.Generic/IEqualityComparer`1.xml index 0a9ccbba140..4ea014bbbd6 100644 --- a/xml/System.Collections.Generic/IEqualityComparer`1.xml +++ b/xml/System.Collections.Generic/IEqualityComparer`1.xml @@ -74,7 +74,7 @@ ## Examples The following example adds custom `Box` objects to a dictionary collection. The `Box` objects are considered equal if their dimensions are the same. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/IEqualityComparerT/Overview/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/IEqualityComparerT/Overview/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/IEqualityComparerT/Overview/program.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Collections.Generic/LinkedListNode`1.xml b/xml/System.Collections.Generic/LinkedListNode`1.xml index 0f3f0fea9a2..1135af9109c 100644 --- a/xml/System.Collections.Generic/LinkedListNode`1.xml +++ b/xml/System.Collections.Generic/LinkedListNode`1.xml @@ -77,7 +77,7 @@ ## Examples The following code example creates a , adds it to a , and tracks the values of its properties as the changes. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/LinkedListNodeT/Overview/llnctor.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/LinkedListNodeT/Overview/llnctor.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/LinkedListNodeT/Overview/llnctor.vb" id="Snippet1"::: ]]> @@ -140,7 +140,7 @@ ## Examples The following code example creates a , adds it to a , and tracks the values of its properties as the changes. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/LinkedListNodeT/Overview/llnctor.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/LinkedListNodeT/Overview/llnctor.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/LinkedListNodeT/Overview/llnctor.vb" id="Snippet1"::: ]]> @@ -203,7 +203,7 @@ ## Examples The following code example creates a , adds it to a , and tracks the values of its properties as the changes. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/LinkedListNodeT/Overview/llnctor.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/LinkedListNodeT/Overview/llnctor.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/LinkedListNodeT/Overview/llnctor.vb" id="Snippet1"::: ]]> @@ -262,7 +262,7 @@ ## Examples The following code example creates a , adds it to a , and tracks the values of its properties as the changes. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/LinkedListNodeT/Overview/llnctor.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/LinkedListNodeT/Overview/llnctor.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/LinkedListNodeT/Overview/llnctor.vb" id="Snippet1"::: ]]> @@ -321,7 +321,7 @@ ## Examples The following code example creates a , adds it to a , and tracks the values of its properties as the changes. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/LinkedListNodeT/Overview/llnctor.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/LinkedListNodeT/Overview/llnctor.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/LinkedListNodeT/Overview/llnctor.vb" id="Snippet1"::: ]]> @@ -388,7 +388,7 @@ ## Examples The following code example creates a , adds it to a , and tracks the values of its properties as the changes. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/LinkedListNodeT/Overview/llnctor.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/LinkedListNodeT/Overview/llnctor.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/LinkedListNodeT/Overview/llnctor.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Collections.Generic/LinkedList`1.xml b/xml/System.Collections.Generic/LinkedList`1.xml index 417d4dd8944..17e7c32fe44 100644 --- a/xml/System.Collections.Generic/LinkedList`1.xml +++ b/xml/System.Collections.Generic/LinkedList`1.xml @@ -218,7 +218,7 @@ ## Examples The following code example creates and initializes a of type , adds several nodes, and then displays its contents. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/LinkedListT/.ctor/llctor.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/LinkedListT/.ctor/llctor.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/LinkedListT/.ctor/llctor.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Collections.Generic/List`1.xml b/xml/System.Collections.Generic/List`1.xml index f31fb1119f2..5ee7c265b2b 100644 --- a/xml/System.Collections.Generic/List`1.xml +++ b/xml/System.Collections.Generic/List`1.xml @@ -247,7 +247,7 @@ ## 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 language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/.ctor/source1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/.ctor/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/.ctor/source2.vb" id="Snippet1"::: ]]> @@ -318,7 +318,7 @@ ## 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 language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/.ctor/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/.ctor/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/.ctor/source.vb" id="Snippet1"::: ]]> @@ -387,7 +387,7 @@ The following example demonstrates how to add, remove, and insert a simple business object in a . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Overview/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Overview/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/Add/module1.vb" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/fs/addremoveinsert.fs" id="Snippet1"::: @@ -462,7 +462,7 @@ ## 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 language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/.ctor/source1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/.ctor/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/.ctor/source2.vb" id="Snippet1"::: ]]> @@ -530,7 +530,7 @@ 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 language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/.ctor/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/.ctor/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/.ctor/source.vb" id="Snippet1"::: ]]> @@ -707,7 +707,7 @@ 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#, `Xor` -1 in Visual Basic) of the negative number returned by and use it as an index for inserting the new string. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/BinarySearch/source1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/BinarySearch/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/BinarySearch/source1.vb" id="Snippet1"::: ]]> @@ -803,7 +803,7 @@ 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#, `Xor` -1 in Visual Basic) of the negative number returned by the method is used as an index for inserting the new string. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/BinarySearch/source2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/BinarySearch/source2.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/BinarySearch/source2.vb" id="Snippet1"::: ]]> @@ -884,7 +884,7 @@ 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 language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Capacity/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Capacity/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/Capacity/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. @@ -1029,12 +1029,12 @@ ## Examples The following example demonstrates the and methods on a that contains a simple business object that implements . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Contains/program1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Contains/program1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/Contains/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 language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Contains/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Contains/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/Contains/program.vb" id="Snippet1"::: ]]> @@ -1109,7 +1109,7 @@ ## 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 language="csharp" source="~/snippets/csharp/System/ConverterTInput,TOutput/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/ConverterTInput,TOutput/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/ConverterTInput,TOutput/Overview/source.vb" id="Snippet1"::: ]]> @@ -1134,7 +1134,7 @@ ## Examples The following example demonstrates all three overloads of the method. A of strings is created and populated with 5 strings. An empty string array of 15 elements is created, and the method overload is used to copy all the elements of the list to the array beginning at the first element of the array. The method overload is used to copy all the elements of the list to the array beginning at array index 6 (leaving index 5 empty). Finally, the method overload is used to copy 3 elements from the list, beginning with index 2, to the array beginning at array index 12 (leaving index 11 empty). The contents of the array are then displayed. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/CopyTo/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/CopyTo/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/CopyTo/source.vb" id="Snippet1"::: ]]> @@ -1410,7 +1410,7 @@ 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 language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Capacity/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Capacity/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/Capacity/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. @@ -1514,7 +1514,7 @@ ## Examples The following example demonstrates the and methods on a that contains a simple business object that implements . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Contains/program1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Contains/program1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/Contains/module1.vb" id="Snippet1"::: The following example demonstrates the method and several other methods that use the generic delegate. @@ -1528,7 +1528,7 @@ > [!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 language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Exists/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Exists/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/Exists/source.vb" id="Snippet1"::: ]]> @@ -1605,7 +1605,7 @@ ## Examples The following example demonstrates the method on a that contains a simple complex object. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Contains/program1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Contains/program1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/Contains/module1.vb" id="Snippet1"::: The following example demonstrates the find methods for the class. The example for the class contains `book` objects, of class `Book`, using the data from the [Sample XML File: Books (LINQ to XML)](/dotnet/standard/linq/sample-xml-file-books). The `FillList` method in the example uses [LINQ to XML](/dotnet/standard/linq/linq-xml-overview) to parse the values from the XML to property values of the `book` objects. @@ -1809,7 +1809,7 @@ 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 language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/FindIndex/FindIndex2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/FindIndex/FindIndex2.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/FindIndex/FindIndex2.vb" id="Snippet2"::: ]]> @@ -1903,7 +1903,7 @@ 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 language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/FindIndex/FindIndex3.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/FindIndex/FindIndex3.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/FindIndex/FindIndex3.vb" id="Snippet3"::: ]]> @@ -2001,7 +2001,7 @@ 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 language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/FindIndex/FindIndex1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/FindIndex/FindIndex1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/FindIndex/FindIndex1.vb" id="Snippet1"::: ]]> @@ -2588,7 +2588,7 @@ 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 language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/.ctor/source1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/.ctor/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/.ctor/source2.vb" id="Snippet1"::: ]]> @@ -2621,7 +2621,7 @@ Public Function StartsWith(e As Employee) As Boolean ## Examples The following example demonstrates all three overloads of the method. A of strings is created, with one entry that appears twice, at index location 0 and index location 5. The method overload searches the list from the beginning, and finds the first occurrence of the string. The method overload is used to search the list beginning with index location 3 and continuing to the end of the list, and finds the second occurrence of the string. Finally, the method overload is used to search a range of two entries, beginning at index location two; it returns -1 because there are no instances of the search string in that range. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/IndexOf/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/IndexOf/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/IndexOf/source.vb" id="Snippet1"::: ]]> @@ -2898,7 +2898,7 @@ 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 language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Overview/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Overview/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/Add/module1.vb" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/fs/addremoveinsert.fs" id="Snippet1"::: @@ -2982,7 +2982,7 @@ 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 language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/.ctor/source1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/.ctor/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/.ctor/source2.vb" id="Snippet1"::: ]]> @@ -3106,7 +3106,7 @@ Public Function StartsWith(e As Employee) As Boolean ## Examples The following example demonstrates all three overloads of the method. A of strings is created, with one entry that appears twice, at index location 0 and index location 5. The method overload searches the entire list from the end, and finds the second occurrence of the string. The method overload is used to search the list backward beginning with index location 3 and continuing to the beginning of the list, so it finds the first occurrence of the string in the list. Finally, the method overload is used to search a range of four entries, beginning at index location 4 and extending backward (that is, it searches the items at locations 4, 3, 2, and 1); this search returns -1 because there are no instances of the search string in that range. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/LastIndexOf/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/LastIndexOf/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/LastIndexOf/source.vb" id="Snippet1"::: ]]> @@ -3376,7 +3376,7 @@ 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 language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Overview/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Overview/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/Add/module1.vb" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/fs/addremoveinsert.fs" id="Snippet1"::: @@ -3460,7 +3460,7 @@ Public Function StartsWith(e As Employee) As Boolean Finally, the method verifies that there are no strings in the list that end with "saurus". - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Exists/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Exists/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/Exists/source.vb" id="Snippet1"::: ]]> @@ -3531,7 +3531,7 @@ 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 language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Overview/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Overview/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/Add/module1.vb" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.collections.generic.list.addremoveinsert/fs/addremoveinsert.fs" id="Snippet1"::: @@ -3604,7 +3604,7 @@ Public Function StartsWith(e As Employee) As Boolean ## Examples The following example demonstrates the method and various other methods of the class that act on ranges. After the list has been created and modified, the method is used to remove two elements from the list, beginning at index location 2. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/.ctor/source1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/.ctor/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/.ctor/source2.vb" id="Snippet1"::: ]]> @@ -3639,7 +3639,7 @@ Public Function StartsWith(e As Employee) As Boolean ## Examples The following example demonstrates both overloads of the method. The example creates a of strings and adds six strings. The method overload is used to reverse the list, and then the method overload is used to reverse the middle of the list, beginning with element 1 and encompassing four elements. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Reverse/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Reverse/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/Reverse/source.vb" id="Snippet1"::: ]]> @@ -3880,7 +3880,7 @@ Public Function StartsWith(e As Employee) As Boolean The following code demonstrates the and method overloads on a simple business object. Calling the method results in the use of the default comparer for the Part type, and the method is implemented by using an anonymous method. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Sort/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Sort/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/Sort/module1.vb" id="Snippet1"::: The following example demonstrates the method overload and the method overload. A of strings is created and populated with four strings, in no particular order. The list is displayed, sorted, and displayed again. @@ -3975,7 +3975,7 @@ Public Function StartsWith(e As Employee) As Boolean 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#, `Xor` -1 in Visual Basic) of the negative number returned by and use it as an index for inserting the new string. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/BinarySearch/source1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/BinarySearch/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/BinarySearch/source1.vb" id="Snippet1"::: ]]> @@ -4051,7 +4051,7 @@ Public Function StartsWith(e As Employee) As Boolean ## Examples The following code demonstrates the and method overloads on a simple business object. Calling the method results in the use of the default comparer for the Part type, and the method is implemented using an anonymous method. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Sort/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Sort/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/Sort/module1.vb" id="Snippet1"::: The following example demonstrates the method overload. @@ -4060,7 +4060,7 @@ Public Function StartsWith(e As Employee) As Boolean A of strings is created and populated with four strings, in no particular order. The list also includes an empty string and a null reference. The list is displayed, sorted using a generic delegate representing the `CompareDinosByLength` method, and displayed again. - :::code language="csharp" source="~/snippets/csharp/System/ComparisonT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/ComparisonT/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/ComparisonT/Overview/source.vb" id="Snippet1"::: ]]> @@ -4155,7 +4155,7 @@ Public Function StartsWith(e As Employee) As Boolean 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#, `Xor` -1 in Visual Basic) of the negative number returned by the method is used as an index for inserting the new string. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/BinarySearch/source2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/BinarySearch/source2.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/BinarySearch/source2.vb" id="Snippet1"::: ]]> @@ -5171,7 +5171,7 @@ Retrieving the value of this property is an O(1) operation. ## 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 language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/.ctor/source1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/.ctor/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/.ctor/source2.vb" id="Snippet1"::: ]]> @@ -5236,7 +5236,7 @@ Retrieving the value of this property is an O(1) operation. 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 language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Capacity/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Capacity/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/Capacity/module1.vb" id="Snippet1"::: The following example demonstrates the method. Several properties and methods of the class are used to add, insert, and remove items from a list of strings. Then the method is used to reduce the capacity to match the count, and the and properties are displayed. If the unused capacity had been less than 10 percent of total capacity, the list would not have been resized. Finally, the contents of the list are cleared. @@ -5314,7 +5314,7 @@ Retrieving the value of this property is an O(1) operation. > [!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 language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Exists/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/ListT/Exists/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/ListT/Exists/source.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Collections.Generic/Queue`1.xml b/xml/System.Collections.Generic/Queue`1.xml index e76ab03745c..4223cd9bd9c 100644 --- a/xml/System.Collections.Generic/Queue`1.xml +++ b/xml/System.Collections.Generic/Queue`1.xml @@ -128,7 +128,7 @@ The method is used to show that the string "four" is in the first copy of the queue, after which the method clears the copy and the property shows that the queue is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/QueueT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/QueueT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/QueueT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/QueueT/Overview/source.vb" id="Snippet1"::: @@ -161,7 +161,7 @@ The method is used to show that the string "four" is in the first copy of the queue, after which the method clears the copy and the property shows that the queue is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/QueueT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/QueueT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/QueueT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/QueueT/Overview/source.vb" id="Snippet1"::: @@ -426,7 +426,7 @@ The method is used to show that the string "four" is in the first copy of the queue, after which the method clears the copy and the property shows that the queue is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/QueueT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/QueueT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/QueueT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/QueueT/Overview/source.vb" id="Snippet1"::: @@ -500,7 +500,7 @@ The method is used to show that the string "four" is in the first copy of the queue, after which the method clears the copy and the property shows that the queue is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/QueueT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/QueueT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/QueueT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/QueueT/Overview/source.vb" id="Snippet1"::: @@ -642,7 +642,7 @@ The method is used to show that the string "four" is in the first copy of the queue, after which the method clears the copy and the property shows that the queue is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/QueueT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/QueueT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/QueueT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/QueueT/Overview/source.vb" id="Snippet1"::: @@ -713,7 +713,7 @@ The method is used to show that the string "four" is in the first copy of the queue, after which the method clears the copy and the property shows that the queue is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/QueueT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/QueueT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/QueueT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/QueueT/Overview/source.vb" id="Snippet1"::: @@ -787,7 +787,7 @@ The method is used to show that the string "four" is in the first copy of the queue, after which the method clears the copy and the property shows that the queue is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/QueueT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/QueueT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/QueueT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/QueueT/Overview/source.vb" id="Snippet1"::: @@ -907,7 +907,7 @@ The method is used to show that the string "four" is in the first copy of the queue, after which the method clears the copy and the property shows that the queue is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/QueueT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/QueueT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/QueueT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/QueueT/Overview/source.vb" id="Snippet1"::: @@ -980,7 +980,7 @@ The method is used to show that the string "four" is in the first copy of the queue, after which the method clears the copy and the property shows that the queue is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/QueueT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/QueueT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/QueueT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/QueueT/Overview/source.vb" id="Snippet1"::: @@ -1409,7 +1409,7 @@ Retrieving the value of this property is an O(1) operation. The method is used to show that the string "four" is in the first copy of the queue, after which the method clears the copy and the property shows that the queue is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/QueueT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/QueueT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/QueueT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/QueueT/Overview/source.vb" id="Snippet1"::: diff --git a/xml/System.Collections.Generic/SortedDictionary`2.xml b/xml/System.Collections.Generic/SortedDictionary`2.xml index 710e19d3eb8..286c4119101 100644 --- a/xml/System.Collections.Generic/SortedDictionary`2.xml +++ b/xml/System.Collections.Generic/SortedDictionary`2.xml @@ -301,7 +301,7 @@ ## Examples The following code example creates a with a case-insensitive comparer for the current culture. The example adds four elements, some with lower-case keys and some with upper-case keys. The example then attempts to add an element with a key that differs from an existing key only by case, catches the resulting exception, and displays an error message. Finally, the example displays the elements in case-insensitive sort order. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/SortedDictionaryTKey,TValue/.ctor/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/SortedDictionaryTKey,TValue/.ctor/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/SortedDictionaryTKey,TValue/.ctor/source.vb" id="Snippet1"::: ]]> @@ -372,7 +372,7 @@ ## Examples The following code example shows how to use to create a sorted copy of the information in a , by passing the to the constructor. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/SortedDictionaryTKey,TValue/.ctor/source1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/SortedDictionaryTKey,TValue/.ctor/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/SortedDictionaryTKey,TValue/.ctor/source1.vb" id="Snippet1"::: ]]> @@ -451,7 +451,7 @@ ## Examples The following code example shows how to use to create a case-insensitive sorted copy of the information in a case-insensitive , by passing the to the constructor. In this example, the case-insensitive comparers are for the current culture. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/SortedDictionaryTKey,TValue/.ctor/source2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/SortedDictionaryTKey,TValue/.ctor/source2.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/SortedDictionaryTKey,TValue/.ctor/source2.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Collections.Generic/SortedList`2.xml b/xml/System.Collections.Generic/SortedList`2.xml index dae91304b21..6aa910da41c 100644 --- a/xml/System.Collections.Generic/SortedList`2.xml +++ b/xml/System.Collections.Generic/SortedList`2.xml @@ -317,7 +317,7 @@ ## Examples The following code example creates a sorted list with a case-insensitive comparer for the current culture. The example adds four elements, some with lower-case keys and some with upper-case keys. The example then attempts to add an element with a key that differs from an existing key only by case, catches the resulting exception, and displays an error message. Finally, the example displays the elements in case-insensitive sort order. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/SortedListTKey,TValue/.ctor/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/SortedListTKey,TValue/.ctor/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/SortedListTKey,TValue/.ctor/source.vb" id="Snippet1"::: ]]> @@ -389,7 +389,7 @@ ## Examples The following code example shows how to use to create a sorted copy of the information in a , by passing the to the constructor. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/SortedListTKey,TValue/.ctor/source1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/SortedListTKey,TValue/.ctor/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/SortedListTKey,TValue/.ctor/source1.vb" id="Snippet1"::: ]]> @@ -463,7 +463,7 @@ ## Examples The following code example creates a sorted list with an initial capacity of 4 and populates it with 4 entries. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/SortedListTKey,TValue/.ctor/source3.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/SortedListTKey,TValue/.ctor/source3.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/SortedListTKey,TValue/.ctor/source3.vb" id="Snippet1"::: ]]> @@ -543,7 +543,7 @@ ## Examples The following code example shows how to use to create a case-insensitive sorted copy of the information in a case-insensitive , by passing the to the constructor. In this example, the case-insensitive comparers are for the current culture. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/SortedListTKey,TValue/.ctor/source2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/SortedListTKey,TValue/.ctor/source2.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/SortedListTKey,TValue/.ctor/source2.vb" id="Snippet1"::: ]]> @@ -630,7 +630,7 @@ ## Examples The following code example creates a sorted list with an initial capacity of 5 and a case-insensitive comparer for the current culture. The example adds four elements, some with lower-case keys and some with upper-case keys. The example then attempts to add an element with a key that differs from an existing key only by case, catches the resulting exception, and displays an error message. Finally, the example displays the elements in case-insensitive sort order. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/SortedListTKey,TValue/.ctor/source4.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/SortedListTKey,TValue/.ctor/source4.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/SortedListTKey,TValue/.ctor/source4.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Collections.Generic/Stack`1.xml b/xml/System.Collections.Generic/Stack`1.xml index e4ffd6fc1ca..26ea54b336f 100644 --- a/xml/System.Collections.Generic/Stack`1.xml +++ b/xml/System.Collections.Generic/Stack`1.xml @@ -136,7 +136,7 @@ The method is used to show that the string "four" is in the first copy of the stack, after which the method clears the copy and the property shows that the stack is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/StackT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/StackT/Overview/source.vb" id="Snippet1"::: @@ -220,7 +220,7 @@ The method is used to show that the string "four" is in the first copy of the stack, after which the method clears the copy and the property shows that the stack is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/StackT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/StackT/Overview/source.vb" id="Snippet1"::: @@ -294,7 +294,7 @@ The method is used to show that the string "four" is in the first copy of the stack, after which the method clears the copy and the property shows that the stack is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/StackT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/StackT/Overview/source.vb" id="Snippet1"::: @@ -453,7 +453,7 @@ The method is used to show that the string "four" is in the first copy of the stack, after which the method clears the copy and the property shows that the stack is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/StackT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/StackT/Overview/source.vb" id="Snippet1"::: @@ -526,7 +526,7 @@ The method is used to show that the string "four" is in the first copy of the stack, after which the method clears the copy and the property shows that the stack is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/StackT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/StackT/Overview/source.vb" id="Snippet1"::: @@ -600,7 +600,7 @@ The method is used to show that the string "four" is in the first copy of the stack, after which the method clears the copy and the property shows that the stack is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/StackT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/StackT/Overview/source.vb" id="Snippet1"::: @@ -686,7 +686,7 @@ The method is used to show that the string "four" is in the first copy of the stack, after which the method clears the copy and the property shows that the stack is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/StackT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/StackT/Overview/source.vb" id="Snippet1"::: @@ -802,7 +802,7 @@ The method is used to show that the string "four" is in the first copy of the stack, after which the method clears the copy and the property shows that the stack is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/StackT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/StackT/Overview/source.vb" id="Snippet1"::: @@ -875,7 +875,7 @@ The method is used to show that the string "four" is in the first copy of the stack, after which the method clears the copy and the property shows that the stack is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/StackT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/StackT/Overview/source.vb" id="Snippet1"::: @@ -949,7 +949,7 @@ The method is used to show that the string "four" is in the first copy of the stack, after which the method clears the copy and the property shows that the stack is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/StackT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/StackT/Overview/source.vb" id="Snippet1"::: @@ -1027,7 +1027,7 @@ The method is used to show that the string "four" is in the first copy of the stack, after which the method clears the copy and the property shows that the stack is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/StackT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/StackT/Overview/source.vb" id="Snippet1"::: @@ -1453,7 +1453,7 @@ Retrieving the value of this property is an O(1) operation. The method is used to show that the string "four" is in the first copy of the stack, after which the method clears the copy and the property shows that the stack is empty. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Generic/StackT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Collections.Generic/StackT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Generic/StackT/Overview/source.vb" id="Snippet1"::: diff --git a/xml/System.Collections.Specialized/BitVector32+Section.xml b/xml/System.Collections.Specialized/BitVector32+Section.xml index e9371234630..dd3e824a3f4 100644 --- a/xml/System.Collections.Specialized/BitVector32+Section.xml +++ b/xml/System.Collections.Specialized/BitVector32+Section.xml @@ -71,7 +71,7 @@ ## Examples The following code example uses a as a collection of sections. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/BitVector32+Section/Overview/bitvector32_sections.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/BitVector32+Section/Overview/bitvector32_sections.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/BitVector32+Section/Overview/bitvector32_sections.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Collections.Specialized/BitVector32.xml b/xml/System.Collections.Specialized/BitVector32.xml index 4031c4dde38..c4d7d8df3e7 100644 --- a/xml/System.Collections.Specialized/BitVector32.xml +++ b/xml/System.Collections.Specialized/BitVector32.xml @@ -70,12 +70,12 @@ ## Examples The following code example uses a as a collection of bit flags. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/BitVector32/Overview/bitvector32_bitflags.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/BitVector32/Overview/bitvector32_bitflags.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/BitVector32/Overview/bitvector32_bitflags.vb" id="Snippet1"::: The following code example uses a as a collection of sections. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/BitVector32+Section/Overview/bitvector32_sections.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/BitVector32+Section/Overview/bitvector32_sections.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/BitVector32+Section/Overview/bitvector32_sections.vb" id="Snippet1"::: ]]> @@ -213,7 +213,7 @@ ## Examples The following code example shows how to create and use masks. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/BitVector32/CreateMask/bitvector32_createmasks.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/BitVector32/CreateMask/bitvector32_createmasks.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/BitVector32/CreateMask/bitvector32_createmasks.vb" id="Snippet1"::: ]]> @@ -363,7 +363,7 @@ ## Examples The following code example uses a as a collection of sections. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/BitVector32+Section/Overview/bitvector32_sections.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/BitVector32+Section/Overview/bitvector32_sections.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/BitVector32+Section/Overview/bitvector32_sections.vb" id="Snippet1"::: ]]> @@ -664,7 +664,7 @@ ## Examples The following code example compares a with another and with an . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/BitVector32/Equals/bitvector32_equals.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/BitVector32/Equals/bitvector32_equals.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/BitVector32/Equals/bitvector32_equals.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Collections.Specialized/HybridDictionary.xml b/xml/System.Collections.Specialized/HybridDictionary.xml index 7416cc28ded..4d672eae69e 100644 --- a/xml/System.Collections.Specialized/HybridDictionary.xml +++ b/xml/System.Collections.Specialized/HybridDictionary.xml @@ -91,7 +91,7 @@ ## Examples The following code example demonstrates several of the properties and methods of . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/Overview/hybriddictionary.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/Overview/hybriddictionary.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/HybridDictionary/Overview/hybriddictionary.vb" id="Snippet1"::: ]]> @@ -177,7 +177,7 @@ ## Examples The following code example demonstrates several of the properties and methods of . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/Overview/hybriddictionary.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/Overview/hybriddictionary.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/HybridDictionary/Overview/hybriddictionary.vb" id="Snippet1"::: ]]> @@ -441,7 +441,7 @@ ## Examples The following code example adds to and removes elements from a . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/Add/hybriddictionary_addremove.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/Add/hybriddictionary_addremove.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/HybridDictionary/Add/hybriddictionary_addremove.vb" id="Snippet1"::: ]]> @@ -512,7 +512,7 @@ ## Examples The following code example adds to and removes elements from a . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/Add/hybriddictionary_addremove.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/Add/hybriddictionary_addremove.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/HybridDictionary/Add/hybriddictionary_addremove.vb" id="Snippet1"::: ]]> @@ -579,7 +579,7 @@ This method uses the collection's objects' and . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/Contains/hybriddictionary_contains.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/Contains/hybriddictionary_contains.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/HybridDictionary/Contains/hybriddictionary_contains.vb" id="Snippet1"::: ]]> @@ -653,7 +653,7 @@ This method uses the collection's objects' and to an array. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/CopyTo/hybriddictionary_copyto.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/CopyTo/hybriddictionary_copyto.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/HybridDictionary/CopyTo/hybriddictionary_copyto.vb" id="Snippet1"::: ]]> @@ -801,7 +801,7 @@ This method uses the collection's objects' and . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/Count/hybriddictionary_enumerator.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/Count/hybriddictionary_enumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/HybridDictionary/Count/hybriddictionary_enumerator.vb" id="Snippet1"::: ]]> @@ -1069,7 +1069,7 @@ This method uses the collection's objects' and . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/Count/hybriddictionary_enumerator.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/Count/hybriddictionary_enumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/HybridDictionary/Count/hybriddictionary_enumerator.vb" id="Snippet1"::: ]]> @@ -1138,7 +1138,7 @@ This method uses the collection's objects' and . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/Count/hybriddictionary_enumerator.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/Count/hybriddictionary_enumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/HybridDictionary/Count/hybriddictionary_enumerator.vb" id="Snippet1"::: ]]> @@ -1208,7 +1208,7 @@ This method uses the collection's objects' and . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/Add/hybriddictionary_addremove.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/Add/hybriddictionary_addremove.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/HybridDictionary/Add/hybriddictionary_addremove.vb" id="Snippet1"::: ]]> @@ -1422,7 +1422,7 @@ This method uses the collection's objects' and . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/Count/hybriddictionary_enumerator.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/HybridDictionary/Count/hybriddictionary_enumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/HybridDictionary/Count/hybriddictionary_enumerator.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Collections.Specialized/IOrderedDictionary.xml b/xml/System.Collections.Specialized/IOrderedDictionary.xml index abc63b987ff..adc96928819 100644 --- a/xml/System.Collections.Specialized/IOrderedDictionary.xml +++ b/xml/System.Collections.Specialized/IOrderedDictionary.xml @@ -75,7 +75,7 @@ ## Examples The following code example demonstrates the implementation of a simple based on the class. The implemented stores first names as the keys and last names as the values, with the added requirement that each first name is unique. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/IOrderedDictionary/Overview/iordereddictionary.cs" interactive="try-dotnet" id="Snippet00"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/IOrderedDictionary/Overview/iordereddictionary.cs" id="Snippet00"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/IOrderedDictionary/Overview/iordereddictionary.vb" id="Snippet00"::: ]]> diff --git a/xml/System.Collections.Specialized/ListDictionary.xml b/xml/System.Collections.Specialized/ListDictionary.xml index ad30b3e2a83..2ef4c048e1d 100644 --- a/xml/System.Collections.Specialized/ListDictionary.xml +++ b/xml/System.Collections.Specialized/ListDictionary.xml @@ -91,7 +91,7 @@ ## Examples The following code example demonstrates several of the properties and methods of . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Overview/listdictionary.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Overview/listdictionary.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/ListDictionary/Overview/listdictionary.vb" id="Snippet1"::: ]]> @@ -171,7 +171,7 @@ ## Examples The following code example demonstrates several of the properties and methods of . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Overview/listdictionary.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Overview/listdictionary.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/ListDictionary/Overview/listdictionary.vb" id="Snippet1"::: ]]> @@ -318,7 +318,7 @@ ## Examples The following code example adds to and removes elements from a . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Add/listdictionary_addremove.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Add/listdictionary_addremove.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/ListDictionary/Add/listdictionary_addremove.vb" id="Snippet1"::: ]]> @@ -387,7 +387,7 @@ ## Examples The following code example adds to and removes elements from a . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Add/listdictionary_addremove.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Add/listdictionary_addremove.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/ListDictionary/Add/listdictionary_addremove.vb" id="Snippet1"::: ]]> @@ -454,7 +454,7 @@ This method uses the collection's objects' and . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Contains/listdictionary_contains.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Contains/listdictionary_contains.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/ListDictionary/Contains/listdictionary_contains.vb" id="Snippet1"::: ]]> @@ -530,7 +530,7 @@ This method uses the collection's objects' and to an array. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/CopyTo/listdictionary_copyto.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/CopyTo/listdictionary_copyto.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/ListDictionary/CopyTo/listdictionary_copyto.vb" id="Snippet1"::: ]]> @@ -611,7 +611,7 @@ This method uses the collection's objects' and . -:::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Count/listdictionary_enumerator.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Count/listdictionary_enumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/ListDictionary/Count/listdictionary_enumerator.vb" id="Snippet1"::: ]]> @@ -687,7 +687,7 @@ This method uses the collection's objects' and . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Count/listdictionary_enumerator.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Count/listdictionary_enumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/ListDictionary/Count/listdictionary_enumerator.vb" id="Snippet1"::: ]]> @@ -955,7 +955,7 @@ This method uses the collection's objects' and . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Count/listdictionary_enumerator.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Count/listdictionary_enumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/ListDictionary/Count/listdictionary_enumerator.vb" id="Snippet1"::: ]]> @@ -1024,7 +1024,7 @@ This method uses the collection's objects' and . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Count/listdictionary_enumerator.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Count/listdictionary_enumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/ListDictionary/Count/listdictionary_enumerator.vb" id="Snippet1"::: ]]> @@ -1092,7 +1092,7 @@ This method uses the collection's objects' and . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Add/listdictionary_addremove.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Add/listdictionary_addremove.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/ListDictionary/Add/listdictionary_addremove.vb" id="Snippet1"::: ]]> @@ -1239,7 +1239,7 @@ This method uses the collection's objects' and . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Count/listdictionary_enumerator.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Count/listdictionary_enumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/ListDictionary/Count/listdictionary_enumerator.vb" id="Snippet1"::: ]]> @@ -1306,7 +1306,7 @@ This method uses the collection's objects' and . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Count/listdictionary_enumerator.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/ListDictionary/Count/listdictionary_enumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/ListDictionary/Count/listdictionary_enumerator.vb" id="Snippet1"::: diff --git a/xml/System.Collections.Specialized/NameObjectCollectionBase.xml b/xml/System.Collections.Specialized/NameObjectCollectionBase.xml index 8eee3b66ca1..8f5c0c4b025 100644 --- a/xml/System.Collections.Specialized/NameObjectCollectionBase.xml +++ b/xml/System.Collections.Specialized/NameObjectCollectionBase.xml @@ -99,7 +99,7 @@ ## Examples The following code example shows how to implement and use the class. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/Overview/nameobjectcollectionbase.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/Overview/nameobjectcollectionbase.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/NameObjectCollectionBase/Overview/nameobjectcollectionbase.vb" id="Snippet1"::: ]]> @@ -644,7 +644,7 @@ ## Examples The following code example uses to create a new with elements from an . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/BaseAdd/nocb_baseadd.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/BaseAdd/nocb_baseadd.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/NameObjectCollectionBase/BaseAdd/nocb_baseadd.vb" id="Snippet1"::: ]]> @@ -705,7 +705,7 @@ ## Examples The following code example uses to remove all elements from a . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/BaseClear/nocb_baseclear.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/BaseClear/nocb_baseclear.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/NameObjectCollectionBase/BaseClear/nocb_baseclear.vb" id="Snippet1"::: ]]> @@ -727,7 +727,7 @@ ## Examples The following code example uses and to get specific keys and values. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/BaseGetKey/nocb_baseget.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/BaseGetKey/nocb_baseget.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/NameObjectCollectionBase/BaseGetKey/nocb_baseget.vb" id="Snippet1"::: ]]> @@ -905,7 +905,7 @@ ## Examples The following code example uses and to get an array of the keys or an array of the values. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/BaseGetAllKeys/nocb_basegetall.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/BaseGetAllKeys/nocb_basegetall.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/NameObjectCollectionBase/BaseGetAllKeys/nocb_basegetall.vb" id="Snippet1"::: ]]> @@ -975,7 +975,7 @@ ## Examples The following code example uses and to get an array of the keys or an array of the values. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/BaseGetAllKeys/nocb_basegetall.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/BaseGetAllKeys/nocb_basegetall.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/NameObjectCollectionBase/BaseGetAllKeys/nocb_basegetall.vb" id="Snippet1"::: ]]> @@ -1098,7 +1098,7 @@ ## Examples The following code example uses and to get specific keys and values. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/BaseGetKey/nocb_baseget.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/BaseGetKey/nocb_baseget.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/NameObjectCollectionBase/BaseGetKey/nocb_baseget.vb" id="Snippet1"::: ]]> @@ -1160,7 +1160,7 @@ ## Examples The following code example uses to determine if the collection contains keys that are not `null`. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/BaseHasKeys/nocb_basehaskeys.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/BaseHasKeys/nocb_basehaskeys.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/NameObjectCollectionBase/BaseHasKeys/nocb_basehaskeys.vb" id="Snippet1"::: ]]> @@ -1291,7 +1291,7 @@ ## Examples The following code example uses and to remove elements from a . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/BaseRemove/nocb_baseremove.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/BaseRemove/nocb_baseremove.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/NameObjectCollectionBase/BaseRemove/nocb_baseremove.vb" id="Snippet1"::: ]]> @@ -1315,7 +1315,7 @@ ## Examples The following code example uses to set the value of a specific element. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/BaseSet/nocb_baseset.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/BaseSet/nocb_baseset.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/NameObjectCollectionBase/BaseSet/nocb_baseset.vb" id="Snippet1"::: ]]> @@ -1709,7 +1709,7 @@ ## Examples The following code example creates a read-only collection. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/IsReadOnly/nocb_isreadonly.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameObjectCollectionBase/IsReadOnly/nocb_isreadonly.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/NameObjectCollectionBase/IsReadOnly/nocb_isreadonly.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Collections.Specialized/NameValueCollection.xml b/xml/System.Collections.Specialized/NameValueCollection.xml index cc95117e73b..25ec78b94d3 100644 --- a/xml/System.Collections.Specialized/NameValueCollection.xml +++ b/xml/System.Collections.Specialized/NameValueCollection.xml @@ -79,7 +79,7 @@ > The method does not distinguish between `null` that's returned because the specified key is not found and `null` that's returned because the value associated with the key is `null`. ## Examples - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameValueCollection/Overview/nvc.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/NameValueCollection/Overview/nvc.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/NameValueCollection/Overview/nvc.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Collections.Specialized/OrderedDictionary.xml b/xml/System.Collections.Specialized/OrderedDictionary.xml index b10eeb8bab5..388b51da7dd 100644 --- a/xml/System.Collections.Specialized/OrderedDictionary.xml +++ b/xml/System.Collections.Specialized/OrderedDictionary.xml @@ -104,7 +104,7 @@ ## Examples The following code example demonstrates the creation, population and modification of an collection, as well as two techniques to display the contents of the : one using the and properties and the other creating an enumerator through the method. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/OrderedDictionary/Overview/OrderedDictionary1.cs" interactive="try-dotnet" id="Snippet00"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/OrderedDictionary/Overview/OrderedDictionary1.cs" id="Snippet00"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/OrderedDictionary/Overview/OrderedDictionary1.vb" id="Snippet00"::: ]]> diff --git a/xml/System.Collections.Specialized/StringCollection.xml b/xml/System.Collections.Specialized/StringCollection.xml index 0ef314c8399..4420483e232 100644 --- a/xml/System.Collections.Specialized/StringCollection.xml +++ b/xml/System.Collections.Specialized/StringCollection.xml @@ -82,7 +82,7 @@ ## Examples The following code example demonstrates several of the properties and methods of . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/Overview/stringcollection.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/Overview/stringcollection.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringCollection/Overview/stringcollection.vb" id="Snippet1"::: ]]> @@ -199,7 +199,7 @@ ## Examples The following code example adds new elements to the . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/Add/stringcollectionadd.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/Add/stringcollectionadd.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringCollection/Add/stringcollectionadd.vb" id="Snippet1"::: ]]> @@ -272,7 +272,7 @@ ## Examples The following code example adds new elements to the . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/Add/stringcollectionadd.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/Add/stringcollectionadd.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringCollection/Add/stringcollectionadd.vb" id="Snippet1"::: ]]> @@ -339,7 +339,7 @@ ## Examples The following code example removes elements from the . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/Clear/stringcollectionremove.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/Clear/stringcollectionremove.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringCollection/Clear/stringcollectionremove.vb" id="Snippet1"::: ]]> @@ -408,7 +408,7 @@ This method uses the collection's objects' and for an element. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/Contains/stringcollectioncontains.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/Contains/stringcollectioncontains.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringCollection/Contains/stringcollectioncontains.vb" id="Snippet1"::: ]]> @@ -485,7 +485,7 @@ This method uses the collection's objects' and to an array. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/CopyTo/stringcollectioncopyto.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/CopyTo/stringcollectioncopyto.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringCollection/CopyTo/stringcollectioncopyto.vb" id="Snippet1"::: ]]> @@ -559,7 +559,7 @@ This method uses the collection's objects' and to an array. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/CopyTo/stringcollectioncopyto.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/CopyTo/stringcollectioncopyto.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringCollection/CopyTo/stringcollectioncopyto.vb" id="Snippet1"::: ]]> @@ -692,7 +692,7 @@ This method uses the collection's objects' and for an element. - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/Contains/stringcollectioncontains.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/Contains/stringcollectioncontains.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringCollection/Contains/stringcollectioncontains.vb" id="Snippet1"::: ]]> @@ -764,7 +764,7 @@ This method uses the collection's objects' and . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/Add/stringcollectionadd.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/Add/stringcollectionadd.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringCollection/Add/stringcollectionadd.vb" id="Snippet1"::: ]]> @@ -1034,7 +1034,7 @@ This method uses the collection's objects' and . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/Clear/stringcollectionremove.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/Clear/stringcollectionremove.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringCollection/Clear/stringcollectionremove.vb" id="Snippet1"::: ]]> @@ -1101,7 +1101,7 @@ This method uses the collection's objects' and . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/Clear/stringcollectionremove.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringCollection/Clear/stringcollectionremove.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringCollection/Clear/stringcollectionremove.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Collections.Specialized/StringDictionary.xml b/xml/System.Collections.Specialized/StringDictionary.xml index 89be374c9c5..ea53dea23cc 100644 --- a/xml/System.Collections.Specialized/StringDictionary.xml +++ b/xml/System.Collections.Specialized/StringDictionary.xml @@ -87,7 +87,7 @@ ## Examples The following code example demonstrates several of the properties and methods of . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringDictionary/Overview/stringdictionary.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringDictionary/Overview/stringdictionary.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringDictionary/Overview/stringdictionary.vb" id="Snippet1"::: ]]> @@ -221,7 +221,7 @@ ## Examples The following code example demonstrates how to add and remove elements from a . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringDictionary/Add/stringdictionary_addremove.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringDictionary/Add/stringdictionary_addremove.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringDictionary/Add/stringdictionary_addremove.vb" id="Snippet1"::: ]]> @@ -284,7 +284,7 @@ ## Examples The following code example demonstrates how to add and remove elements from a . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringDictionary/Add/stringdictionary_addremove.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringDictionary/Add/stringdictionary_addremove.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringDictionary/Add/stringdictionary_addremove.vb" id="Snippet1"::: ]]> @@ -350,7 +350,7 @@ This method uses the collection's objects' and . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringDictionary/ContainsKey/stringdictionary_contains.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringDictionary/ContainsKey/stringdictionary_contains.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringDictionary/ContainsKey/stringdictionary_contains.vb" id="Snippet1"::: ]]> @@ -418,7 +418,7 @@ This method uses the collection's objects' and . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringDictionary/ContainsKey/stringdictionary_contains.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringDictionary/ContainsKey/stringdictionary_contains.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringDictionary/ContainsKey/stringdictionary_contains.vb" id="Snippet1"::: ]]> @@ -486,7 +486,7 @@ This method uses the collection's objects' and @@ -895,7 +895,7 @@ This method uses the collection's objects' and . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringDictionary/Add/stringdictionary_addremove.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringDictionary/Add/stringdictionary_addremove.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringDictionary/Add/stringdictionary_addremove.vb" id="Snippet1"::: ]]> @@ -1023,7 +1023,7 @@ This method uses the collection's objects' and . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringDictionary/Count/values.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringDictionary/Count/values.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringDictionary/Count/values.vb" id="Snippet2"::: ]]> diff --git a/xml/System.Collections.Specialized/StringEnumerator.xml b/xml/System.Collections.Specialized/StringEnumerator.xml index 87519e09447..6883ab614af 100644 --- a/xml/System.Collections.Specialized/StringEnumerator.xml +++ b/xml/System.Collections.Specialized/StringEnumerator.xml @@ -74,7 +74,7 @@ ## Examples The following code example demonstrates several of the properties and methods of . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringEnumerator/Overview/stringenumerator.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringEnumerator/Overview/stringenumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringEnumerator/Overview/stringenumerator.vb" id="Snippet1"::: ]]> @@ -145,7 +145,7 @@ ## Examples The following code example demonstrates several of the properties and methods of . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringEnumerator/Overview/stringenumerator.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringEnumerator/Overview/stringenumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringEnumerator/Overview/stringenumerator.vb" id="Snippet1"::: ]]> @@ -213,7 +213,7 @@ ## Examples The following code example demonstrates several of the properties and methods of . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringEnumerator/Overview/stringenumerator.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringEnumerator/Overview/stringenumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringEnumerator/Overview/stringenumerator.vb" id="Snippet1"::: ]]> @@ -275,7 +275,7 @@ ## Examples The following code example demonstrates several of the properties and methods of . - :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringEnumerator/Overview/stringenumerator.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Collections.Specialized/StringEnumerator/Overview/stringenumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Collections.Specialized/StringEnumerator/Overview/stringenumerator.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Globalization/Calendar.xml b/xml/System.Globalization/Calendar.xml index deab0820050..cd3499feb54 100644 --- a/xml/System.Globalization/Calendar.xml +++ b/xml/System.Globalization/Calendar.xml @@ -139,7 +139,7 @@ ## Examples The following code example demonstrates the members of the class. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/Overview/calendar.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/Overview/calendar.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/Calendar/Overview/calendar.vb" id="Snippet1"::: ]]> @@ -209,7 +209,7 @@ ## Examples The following example demonstrates the members of the class. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/Overview/calendar.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/Overview/calendar.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/Calendar/Overview/calendar.vb" id="Snippet1"::: ]]> @@ -286,7 +286,7 @@ ## Examples The following code example demonstrates the members of the class. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/Overview/calendar.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/Overview/calendar.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/Calendar/Overview/calendar.vb" id="Snippet1"::: ]]> @@ -802,7 +802,7 @@ ## Examples The following code example demonstrates the members of the class. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/Overview/calendar.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/Overview/calendar.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/Calendar/Overview/calendar.vb" id="Snippet1"::: ]]> @@ -891,7 +891,7 @@ ## Examples The following code example demonstrates the members of the class. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/Overview/calendar.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/Overview/calendar.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/Calendar/Overview/calendar.vb" id="Snippet1"::: ]]> @@ -1253,7 +1253,7 @@ The and class. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/Overview/calendar.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/Overview/calendar.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/Calendar/Overview/calendar.vb" id="Snippet1"::: ]]> @@ -1329,7 +1329,7 @@ The and class. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/Overview/calendar.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/Overview/calendar.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/Calendar/Overview/calendar.vb" id="Snippet1"::: ]]> @@ -1406,7 +1406,7 @@ The and class. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/Overview/calendar.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/Overview/calendar.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/Calendar/Overview/calendar.vb" id="Snippet1"::: ]]> @@ -1494,7 +1494,7 @@ The and class. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/GetDaysInMonth/calendar_compare.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/GetDaysInMonth/calendar_compare.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/Calendar/GetDaysInMonth/calendar_compare.vb" id="Snippet1"::: ]]> @@ -2231,7 +2231,7 @@ Only the and the class. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/Overview/calendar.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/Overview/calendar.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/Calendar/Overview/calendar.vb" id="Snippet1"::: ]]> @@ -2571,7 +2571,7 @@ Only the and the varies depending on the and the used. If the specified date is the last day of the year, returns the total number of weeks in that year. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/GetWeekOfYear/yslin_calendar_getweekofyear.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/GetWeekOfYear/yslin_calendar_getweekofyear.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/Calendar/GetWeekOfYear/yslin_calendar_getweekofyear.vb" id="Snippet1"::: ]]> @@ -2654,7 +2654,7 @@ Only the and the class. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/Overview/calendar.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/Overview/calendar.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/Calendar/Overview/calendar.vb" id="Snippet1"::: ]]> @@ -3097,7 +3097,7 @@ Only the and the class. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/GetDaysInMonth/calendar_compare.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/Calendar/GetDaysInMonth/calendar_compare.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/Calendar/GetDaysInMonth/calendar_compare.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Globalization/CalendarAlgorithmType.xml b/xml/System.Globalization/CalendarAlgorithmType.xml index 800636b7c20..bfafa9462ed 100644 --- a/xml/System.Globalization/CalendarAlgorithmType.xml +++ b/xml/System.Globalization/CalendarAlgorithmType.xml @@ -60,7 +60,7 @@ ## Examples The following code example demonstrates the property and the enumeration. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/CalendarAlgorithmType/Overview/caltype.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/CalendarAlgorithmType/Overview/caltype.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/CalendarAlgorithmType/Overview/caltype.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Globalization/CharUnicodeInfo.xml b/xml/System.Globalization/CharUnicodeInfo.xml index 4192a29c8ce..763c9436f2c 100644 --- a/xml/System.Globalization/CharUnicodeInfo.xml +++ b/xml/System.Globalization/CharUnicodeInfo.xml @@ -197,7 +197,7 @@ Each version of the Unicode standard includes information on changes to the Unic ## Examples The following code example shows the values returned by each method for different types of characters. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/CharUnicodeInfo/Overview/charunicodeinfo_char.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/CharUnicodeInfo/Overview/charunicodeinfo_char.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/CharUnicodeInfo/Overview/charunicodeinfo_char.vb" id="Snippet1"::: ]]> @@ -267,7 +267,7 @@ Each version of the Unicode standard includes information on changes to the Unic ## Examples The following code example shows the values returned by each method for different types of characters. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/CharUnicodeInfo/GetDecimalDigitValue/charunicodeinfo_string.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/CharUnicodeInfo/GetDecimalDigitValue/charunicodeinfo_string.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/CharUnicodeInfo/GetDecimalDigitValue/charunicodeinfo_string.vb" id="Snippet1"::: ]]> @@ -512,7 +512,7 @@ Each version of the Unicode standard includes information on changes to the Unic ## Examples The following code example shows the values returned by each method for different types of characters. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/CharUnicodeInfo/Overview/charunicodeinfo_char.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/CharUnicodeInfo/Overview/charunicodeinfo_char.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/CharUnicodeInfo/Overview/charunicodeinfo_char.vb" id="Snippet1"::: ]]> @@ -593,7 +593,7 @@ Each version of the Unicode standard includes information on changes to the Unic ## Examples The following code example shows the values returned by each method for different types of characters. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/CharUnicodeInfo/GetDecimalDigitValue/charunicodeinfo_string.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/CharUnicodeInfo/GetDecimalDigitValue/charunicodeinfo_string.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/CharUnicodeInfo/GetDecimalDigitValue/charunicodeinfo_string.vb" id="Snippet1"::: ]]> @@ -684,7 +684,7 @@ Each version of the Unicode standard includes information on changes to the Unic ## Examples The following code example shows the values returned by each method for different types of characters. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/CharUnicodeInfo/Overview/charunicodeinfo_char.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/CharUnicodeInfo/Overview/charunicodeinfo_char.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/CharUnicodeInfo/Overview/charunicodeinfo_char.vb" id="Snippet1"::: ]]> @@ -806,7 +806,7 @@ Each version of the Unicode standard includes information on changes to the Unic ## Examples The following code example shows the values returned by each method for different types of characters. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/CharUnicodeInfo/GetDecimalDigitValue/charunicodeinfo_string.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/CharUnicodeInfo/GetDecimalDigitValue/charunicodeinfo_string.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/CharUnicodeInfo/GetDecimalDigitValue/charunicodeinfo_string.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Globalization/CultureInfo.xml b/xml/System.Globalization/CultureInfo.xml index 47a88e0448b..8eab7e1dfd3 100644 --- a/xml/System.Globalization/CultureInfo.xml +++ b/xml/System.Globalization/CultureInfo.xml @@ -676,7 +676,7 @@ If `name` is , the constr ## Examples The following code example shows that CultureInfo.Clone also clones the and instances associated with the . - :::code language="csharp" source="~/snippets/csharp/System.Globalization/CultureInfo/Clone/yslin_cultureinfo_clone.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/CultureInfo/Clone/yslin_cultureinfo_clone.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/CultureInfo/Clone/yslin_cultureinfo_clone.vb" id="Snippet1"::: ]]> @@ -1115,7 +1115,7 @@ You might choose to override some of the values associated with the current cult and instances associated with the . - :::code language="csharp" source="~/snippets/csharp/System.Globalization/CultureInfo/Clone/yslin_cultureinfo_clone.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/CultureInfo/Clone/yslin_cultureinfo_clone.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/CultureInfo/Clone/yslin_cultureinfo_clone.vb" id="Snippet1"::: ]]> @@ -2948,7 +2948,7 @@ You might choose to override some of the values associated with the current cult and instances associated with the . - :::code language="csharp" source="~/snippets/csharp/System.Globalization/CultureInfo/Clone/yslin_cultureinfo_clone.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/CultureInfo/Clone/yslin_cultureinfo_clone.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/CultureInfo/Clone/yslin_cultureinfo_clone.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Globalization/DateTimeFormatInfo.xml b/xml/System.Globalization/DateTimeFormatInfo.xml index a29464057ae..f6bbd66b675 100644 --- a/xml/System.Globalization/DateTimeFormatInfo.xml +++ b/xml/System.Globalization/DateTimeFormatInfo.xml @@ -99,7 +99,7 @@ The following example uses reflection to get the properties of the object for the English (United States) culture. It displays the value of those properties that contain custom format strings and uses those strings to display formatted dates. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/Overview/format1.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/Overview/format1.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/DateTimeFormatInfo/Overview/format1.vb" id="Snippet5"::: ]]> @@ -216,7 +216,7 @@ ## Examples The following example creates a read/write object that represents the English (United States) culture and assigns abbreviated day names to its property. It then uses the "ddd" format specifier in a [custom date and time format string](/dotnet/standard/base-types/custom-date-and-time-format-strings) to display the string representation of dates for one week beginning May 28, 2014. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/AbbreviatedDayNames/abbreviateddaynames1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/AbbreviatedDayNames/abbreviateddaynames1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/DateTimeFormatInfo/AbbreviatedDayNames/abbreviateddaynames1.vb" id="Snippet1"::: ]]> @@ -365,7 +365,7 @@ ## Examples The following example creates a read/write object that represents the English (United States) culture and assigns abbreviated genitive month names to its and properties. It then displays the string representation of dates that include the abbreviated name of each month in the culture's supported calendar. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/AbbreviatedMonthGenitiveNames/abbreviatedmonthnames1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/AbbreviatedMonthGenitiveNames/abbreviatedmonthnames1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/DateTimeFormatInfo/AbbreviatedMonthGenitiveNames/abbreviatedmonthnames1.vb" id="Snippet1"::: ]]> @@ -768,7 +768,7 @@ Changing the value of this property affects the following properties as well: object for the en-US culture, changes its date separator to "-", and displays a date by using the "d", "G", and "g" standard format strings. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/DateSeparator/dateseparatorex.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/DateSeparator/dateseparatorex.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/DateTimeFormatInfo/DateSeparator/dateseparatorex.vb" id="Snippet1"::: ]]> @@ -965,7 +965,7 @@ This property is affected if the value of the for a few cultures. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/FullDateTimePattern/dtfi_fulldatetimepattern.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/FullDateTimePattern/dtfi_fulldatetimepattern.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/DateTimeFormatInfo/FullDateTimePattern/dtfi_fulldatetimepattern.vb" id="Snippet1"::: ]]> @@ -1286,7 +1286,7 @@ This property is affected if the value of the object that represents the invariant culture by calling the constructor. It could also retrieve a that represents the invariant culture from the property. @@ -1349,7 +1349,7 @@ This property is affected if the value of the method in formatting operations. However, if you do, the string representation of a date and time value returned in that formatting operation cannot always be parsed successfully by the `Parse` and `TryParse` methods. Therefore, you cannot assume that the custom format strings returned by the method can be used to round-trip date and time values. The following example illustrates this problem. It retrieves a object that contains formatting information for the Russia (Russian) culture. It calls the method for each standard format string, and then passes each custom format string in the returned array to the method to create the string representation of a date and time. This example then attempts to parse this value by calling the method. As the output from the example shows, some of the custom format strings do not produce a date and time value that successfully round-trips. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/GetAllDateTimePatterns/getalldatetimepatternsex2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/GetAllDateTimePatterns/getalldatetimepatternsex2.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/DateTimeFormatInfo/GetAllDateTimePatterns/getalldatetimepatternsex2.vb" id="Snippet2"::: To parse the string representation of a date and time that can be expressed in a number of predefined custom formats, call one of the following methods: @@ -1367,7 +1367,7 @@ This property is affected if the value of the @@ -2054,7 +2054,7 @@ This property is affected if the value of the property defines the culture-specific format of date strings that are returned by calls to the and 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 property, and the culture-specific representation of a date. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/longdatepattern1.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/longdatepattern1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/DateTimeFormatInfo/LongDatePattern/longdatepattern1.vb" id="Snippet2"::: 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". @@ -2069,7 +2069,7 @@ This property is affected if the value of the property for a few cultures. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/dtfi_longdatepattern.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/dtfi_longdatepattern.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/DateTimeFormatInfo/LongDatePattern/dtfi_longdatepattern.vb" id="Snippet1"::: ]]> @@ -2144,7 +2144,7 @@ This property is affected if the value of the for a few cultures. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongTimePattern/dtfi_longtimepattern.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongTimePattern/dtfi_longtimepattern.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/DateTimeFormatInfo/LongTimePattern/dtfi_longtimepattern.vb" id="Snippet1"::: ]]> @@ -2617,7 +2617,7 @@ This property is affected if the value of the @@ -2766,12 +2766,12 @@ This property is affected if the value of the property and the value of a date formatted using the property for a few cultures. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/ShortDatePattern/dtfi_shortdatepattern.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/ShortDatePattern/dtfi_shortdatepattern.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/DateTimeFormatInfo/ShortDatePattern/dtfi_shortdatepattern.vb" id="Snippet1"::: The following example modifies the property of a object that represents the formatting conventions of the English (United States) culture. It also displays a date value twice, first to reflect the original property and then to reflect the new property value. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/ShortDatePattern/shortdatepattern1.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/ShortDatePattern/shortdatepattern1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/DateTimeFormatInfo/ShortDatePattern/shortdatepattern1.vb" id="Snippet2"::: ]]> @@ -2914,7 +2914,7 @@ The default array starts on Sunday. ## Examples The following example displays the value of for a few cultures. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/ShortTimePattern/dtfi_shorttimepattern.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/ShortTimePattern/dtfi_shorttimepattern.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/DateTimeFormatInfo/ShortTimePattern/dtfi_shorttimepattern.vb" id="Snippet1"::: ]]> @@ -2979,7 +2979,7 @@ The default array starts on Sunday. ## Examples The following example displays the value of for a few cultures. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/SortableDateTimePattern/dtfi_sortabledatetimepattern.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/SortableDateTimePattern/dtfi_sortabledatetimepattern.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/DateTimeFormatInfo/SortableDateTimePattern/dtfi_sortabledatetimepattern.vb" id="Snippet1"::: ]]> @@ -3083,7 +3083,7 @@ If the custom pattern includes the format pattern ":", object for the en-US culture, changes its date separator to ".", and displays a date by using the "t", "T", "F", "f", "G", and "g" standard format strings. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/TimeSeparator/timeseparatorex.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/TimeSeparator/timeseparatorex.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/DateTimeFormatInfo/TimeSeparator/timeseparatorex.vb" id="Snippet1"::: ]]> @@ -3149,7 +3149,7 @@ If the custom pattern includes the format pattern ":", for a few cultures. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/UniversalSortableDateTimePattern/dtfi_universalsortabledatetimepattern.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/DateTimeFormatInfo/UniversalSortableDateTimePattern/dtfi_universalsortabledatetimepattern.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/DateTimeFormatInfo/UniversalSortableDateTimePattern/dtfi_universalsortabledatetimepattern.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Globalization/GregorianCalendar.xml b/xml/System.Globalization/GregorianCalendar.xml index 08ef33c5224..c3f2646d329 100644 --- a/xml/System.Globalization/GregorianCalendar.xml +++ b/xml/System.Globalization/GregorianCalendar.xml @@ -174,7 +174,7 @@ ## Examples The following code example prints a using a that is localized. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/GregorianCalendar/.ctor/gregorianlocalized.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/GregorianCalendar/.ctor/gregorianlocalized.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/GregorianCalendar/.ctor/gregorianlocalized.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Globalization/GregorianCalendarTypes.xml b/xml/System.Globalization/GregorianCalendarTypes.xml index e7ca5554155..59cbadbcf51 100644 --- a/xml/System.Globalization/GregorianCalendarTypes.xml +++ b/xml/System.Globalization/GregorianCalendarTypes.xml @@ -87,7 +87,7 @@ The following code example prints a using a that is localized. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/GregorianCalendar/.ctor/gregorianlocalized.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/GregorianCalendar/.ctor/gregorianlocalized.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/GregorianCalendar/.ctor/gregorianlocalized.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Globalization/HijriCalendar.xml b/xml/System.Globalization/HijriCalendar.xml index ccd481752bb..0f144d106f8 100644 --- a/xml/System.Globalization/HijriCalendar.xml +++ b/xml/System.Globalization/HijriCalendar.xml @@ -1075,7 +1075,7 @@ ## Examples The following code example displays the values of several components of a in terms of the Hijri calendar. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/HijriCalendar/AddMonths/hijricalendar_addget.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/HijriCalendar/AddMonths/hijricalendar_addget.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/HijriCalendar/AddMonths/hijricalendar_addget.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Globalization/IdnMapping.xml b/xml/System.Globalization/IdnMapping.xml index bea1eb42b5a..279a9b09614 100644 --- a/xml/System.Globalization/IdnMapping.xml +++ b/xml/System.Globalization/IdnMapping.xml @@ -87,7 +87,7 @@ ## Examples The following example uses the method to convert an array of internationalized domain names to Punycode. The method then converts the Punycode domain name back to the original domain name, but replaces the original label separators with the standard label separator. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/IdnMapping/Overview/conversion1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/IdnMapping/Overview/conversion1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/IdnMapping/Overview/conversion1.vb" id="Snippet1"::: ]]> @@ -338,7 +338,7 @@ ## Examples The following example uses the method to convert an array of internationalized domain names to Punycode, which is an encoded equivalent that consists of characters in the US-ASCII character range. The method then converts the Punycode domain name back into the original domain name, but replaces the original label separators with the standard label separator. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/IdnMapping/Overview/conversion1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/IdnMapping/Overview/conversion1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/IdnMapping/Overview/conversion1.vb" id="Snippet1"::: ]]> @@ -524,7 +524,7 @@ ## Examples The following example uses the method to convert an internationalized domain name to a domain name that complies with the IDNA standard. The method then converts the standardized domain name back into the original domain name, but replaces the original label separators with the standard label separator. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/IdnMapping/GetAscii/getx.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/IdnMapping/GetAscii/getx.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/IdnMapping/GetAscii/getx.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Globalization/JapaneseCalendar.xml b/xml/System.Globalization/JapaneseCalendar.xml index 3d3c450dc9a..6d46cda0074 100644 --- a/xml/System.Globalization/JapaneseCalendar.xml +++ b/xml/System.Globalization/JapaneseCalendar.xml @@ -949,7 +949,7 @@ ## Examples The following example displays the values of several components of a in terms of the Japanese calendar. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/JapaneseCalendar/AddMonths/japanesecalendar_addget.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/JapaneseCalendar/AddMonths/japanesecalendar_addget.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/JapaneseCalendar/AddMonths/japanesecalendar_addget.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Globalization/JulianCalendar.xml b/xml/System.Globalization/JulianCalendar.xml index 466b89e7315..7a4402de49d 100644 --- a/xml/System.Globalization/JulianCalendar.xml +++ b/xml/System.Globalization/JulianCalendar.xml @@ -632,7 +632,7 @@ ## Examples The following code example displays the values of several components of a in terms of the Julian calendar. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/JulianCalendar/AddMonths/juliancalendar_addget.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/JulianCalendar/AddMonths/juliancalendar_addget.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/JulianCalendar/AddMonths/juliancalendar_addget.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Globalization/NumberFormatInfo.xml b/xml/System.Globalization/NumberFormatInfo.xml index a86d48b5567..1d967f8c2a7 100644 --- a/xml/System.Globalization/NumberFormatInfo.xml +++ b/xml/System.Globalization/NumberFormatInfo.xml @@ -226,7 +226,7 @@ ## Examples The following example uses the method to create a read/write copy of a object that represents the numeric formatting conventions of the current culture. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/Clone/isreadonly1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/Clone/isreadonly1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/NumberFormatInfo/Clone/isreadonly1.vb" id="Snippet1"::: ]]> @@ -287,7 +287,7 @@ ## Examples The following example demonstrates the effect of changing the property. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/CurrencyDecimalDigits/currencydecimaldigits.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/CurrencyDecimalDigits/currencydecimaldigits.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/NumberFormatInfo/CurrencyDecimalDigits/currencydecimaldigits.vb" id="Snippet1"::: ]]> @@ -358,7 +358,7 @@ On Windows, the initial value of this property is derived from the settings in t ## Examples The following example demonstrates the effect of changing the property. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/CurrencyDecimalSeparator/currencydecimalseparator.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/CurrencyDecimalSeparator/currencydecimalseparator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/NumberFormatInfo/CurrencyDecimalSeparator/currencydecimalseparator.vb" id="Snippet1"::: ]]> @@ -430,7 +430,7 @@ On Windows, the initial value of this property is derived from the settings in t ## Examples The following example demonstrates the effect of changing the property. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/CurrencyGroupSeparator/currencygroupseparator.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/CurrencyGroupSeparator/currencygroupseparator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/NumberFormatInfo/CurrencyGroupSeparator/currencygroupseparator.vb" id="Snippet1"::: ]]> @@ -503,7 +503,7 @@ On Windows, the initial value of this property is derived from the settings in t ## Examples The following example demonstrates the effect of changing the property. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/CurrencyGroupSizes/currencygroupsizes.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/CurrencyGroupSizes/currencygroupsizes.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/NumberFormatInfo/CurrencyGroupSizes/currencygroupsizes.vb" id="Snippet1"::: ]]> @@ -597,7 +597,7 @@ On Windows, the initial value of this property is derived from the settings in t ## Examples The following example shows how the property defines the format of negative currency values. It retrieves all the specific cultures that are defined on the host computer and displays each culture's property value, its associated pattern, and a number formatted as a currency value. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/CurrencyNegativePattern/currencynegativepattern1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/CurrencyNegativePattern/currencynegativepattern1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/NumberFormatInfo/CurrencyNegativePattern/currencynegativepattern1.vb" id="Snippet1"::: ]]> @@ -813,7 +813,7 @@ The pattern does not support a positive sign. ## Examples The following example shows that the objects returned by the and `CultureInfo.CurrentCulture.NumberFormat` properties are identical. It then uses reflection to display the property values of the object returned by the property on a system whose current culture is en-US. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/CurrentInfo/currentinfo1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/CurrentInfo/currentinfo1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/NumberFormatInfo/CurrentInfo/currentinfo1.vb" id="Snippet1"::: ]]> @@ -1456,7 +1456,7 @@ The pattern does not support a positive sign. ## Examples The following example demonstrates the effect of changing the property. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/NumberDecimalDigits/numberdecimaldigits.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/NumberDecimalDigits/numberdecimaldigits.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/NumberFormatInfo/NumberDecimalDigits/numberdecimaldigits.vb" id="Snippet1"::: ]]> @@ -1526,7 +1526,7 @@ On Windows, the initial value of this property is derived from the settings in t ## Examples The following example demonstrates the effect of changing the property. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/NumberDecimalSeparator/numberdecimalseparator.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/NumberDecimalSeparator/numberdecimalseparator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/NumberFormatInfo/NumberDecimalSeparator/numberdecimalseparator.vb" id="Snippet1"::: ]]> @@ -1597,7 +1597,7 @@ On Windows, the initial value of this property is derived from the settings in t ## Examples The following example demonstrates the effect of changing the property. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/NumberGroupSeparator/numbergroupseparator.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/NumberGroupSeparator/numbergroupseparator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/NumberFormatInfo/NumberGroupSeparator/numbergroupseparator.vb" id="Snippet1"::: ]]> @@ -1671,12 +1671,12 @@ On Windows, the initial value of this property is derived from the settings in t ## Examples The following example demonstrates the effect of changing the property. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/NumberGroupSizes/numbergroupsizes.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/NumberGroupSizes/numbergroupsizes.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/NumberFormatInfo/NumberGroupSizes/numbergroupsizes.vb" id="Snippet1"::: The following example prints a value using different arrays. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/NumberGroupSizes/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/NumberGroupSizes/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/NumberFormatInfo/NumberGroupSizes/source.vb" id="Snippet1"::: ]]> @@ -1759,7 +1759,7 @@ On Windows, the initial value of this property is derived from the settings in t ## Examples The following example displays a value using different patterns. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/NumberNegativePattern/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/NumberNegativePattern/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/NumberFormatInfo/NumberNegativePattern/source.vb" id="Snippet1"::: ]]> @@ -1827,7 +1827,7 @@ On Windows, the initial value of this property is derived from the settings in t ## Examples The following example demonstrates the effect of changing the property. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/PercentDecimalDigits/percentdecimaldigits.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/PercentDecimalDigits/percentdecimaldigits.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/NumberFormatInfo/PercentDecimalDigits/percentdecimaldigits.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Globalization/NumberStyles.xml b/xml/System.Globalization/NumberStyles.xml index c8f81b63954..9f10729ba99 100644 --- a/xml/System.Globalization/NumberStyles.xml +++ b/xml/System.Globalization/NumberStyles.xml @@ -97,7 +97,7 @@ The following table lists the composite number styles and indicates which indivi This example shows how to parse a string into a 32-bit integer by using various `NumberStyles` flags. -:::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberStyles/Overview/NumberStyles.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberStyles/Overview/NumberStyles.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/NumberStyles/Overview/numberstyles.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Globalization/RegionInfo.xml b/xml/System.Globalization/RegionInfo.xml index 63ef56cf11d..3751eda2c0f 100644 --- a/xml/System.Globalization/RegionInfo.xml +++ b/xml/System.Globalization/RegionInfo.xml @@ -84,7 +84,7 @@ The following example demonstrates several members of the class. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/Overview/regioninfo.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/Overview/regioninfo.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/RegionInfo/Overview/regioninfo.vb" id="Snippet1"::: ]]> @@ -162,7 +162,7 @@ ## Examples The following code example compares two instances of that were created differently. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/.ctor/regioninfo_equals.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/.ctor/regioninfo_equals.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/RegionInfo/.ctor/regioninfo_equals.vb" id="Snippet1"::: ]]> @@ -244,12 +244,12 @@ This constructor throws an if `name` is a neutra ## Examples The following code example compares two instances of that were created differently. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/.ctor/regioninfo_equals.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/.ctor/regioninfo_equals.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/RegionInfo/.ctor/regioninfo_equals.vb" id="Snippet1"::: The following code example creates instances of using culture names. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/.ctor/regioninfo_ctorculturename.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/.ctor/regioninfo_ctorculturename.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/RegionInfo/.ctor/regioninfo_ctorculturename.vb" id="Snippet1"::: ]]> @@ -458,7 +458,7 @@ This constructor throws an if `name` is a neutra ## Examples The following code example displays the properties of the class. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/CurrencySymbol/regioninfo_properties.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/CurrencySymbol/regioninfo_properties.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/RegionInfo/CurrencySymbol/regioninfo_properties.vb" id="Snippet1"::: ]]> @@ -585,7 +585,7 @@ This constructor throws an if `name` is a neutra ## Examples The following code example displays the properties of the class. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/CurrencySymbol/regioninfo_properties.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/CurrencySymbol/regioninfo_properties.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/RegionInfo/CurrencySymbol/regioninfo_properties.vb" id="Snippet1"::: ]]> @@ -797,7 +797,7 @@ This constructor throws an if `name` is a neutra ## Examples The following code example demonstrates the property. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/CurrencyEnglishName/rgn5props.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/CurrencyEnglishName/rgn5props.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/RegionInfo/CurrencyEnglishName/rgn5props.vb" id="Snippet1"::: ]]> @@ -1098,7 +1098,7 @@ This constructor throws an if `name` is a neutra ## Examples The following code example displays the properties of the class. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/CurrencySymbol/regioninfo_properties.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/CurrencySymbol/regioninfo_properties.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/RegionInfo/CurrencySymbol/regioninfo_properties.vb" id="Snippet1"::: ]]> @@ -1164,7 +1164,7 @@ This constructor throws an if `name` is a neutra ## Examples The following code example displays the properties of the class. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/CurrencySymbol/regioninfo_properties.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/CurrencySymbol/regioninfo_properties.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/RegionInfo/CurrencySymbol/regioninfo_properties.vb" id="Snippet1"::: ]]> @@ -1306,7 +1306,7 @@ This constructor throws an if `name` is a neutra ## Examples The following code example displays the properties of the class. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/CurrencySymbol/regioninfo_properties.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/CurrencySymbol/regioninfo_properties.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/RegionInfo/CurrencySymbol/regioninfo_properties.vb" id="Snippet1"::: ]]> @@ -1516,7 +1516,7 @@ This constructor throws an if `name` is a neutra ## Examples The following code example displays the properties of the class. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/CurrencySymbol/regioninfo_properties.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/CurrencySymbol/regioninfo_properties.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/RegionInfo/CurrencySymbol/regioninfo_properties.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Globalization/StringInfo.xml b/xml/System.Globalization/StringInfo.xml index 2737bd6dd5a..e10ae69a77e 100644 --- a/xml/System.Globalization/StringInfo.xml +++ b/xml/System.Globalization/StringInfo.xml @@ -102,14 +102,14 @@ The following example illustrates both ways of working with the text elements in Each string is parsed once by the method and then by the method. Both methods correctly parse the text elements in the two strings and display the results of the parsing operation. -:::code language="csharp" source="~/snippets/csharp/System.Globalization/StringInfo/Overview/indexing1.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System.Globalization/StringInfo/Overview/indexing1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/StringInfo/Overview/indexing1.vb" id="Snippet1"::: ## Examples This example uses the and methods of the class to manipulate a string that contains surrogate and combining characters. -:::code language="csharp" source="~/snippets/csharp/System.Globalization/StringInfo/Overview/StringInfo.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System.Globalization/StringInfo/Overview/StringInfo.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/StringInfo/Overview/stringinfo.vb" id="Snippet1"::: ]]> @@ -732,7 +732,7 @@ A grapheme cluster is a sequence of one or more Unicode code points that should ## Examples The following example demonstrates calling the method. This example is part of a larger example provided for the class. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/StringInfo/Overview/StringInfo.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/StringInfo/Overview/StringInfo.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/StringInfo/Overview/stringinfo.vb" id="Snippet1"::: ]]> @@ -944,7 +944,7 @@ A grapheme cluster is a sequence of one or more Unicode code points that should ## Examples The following example demonstrates calling the method. This code example is part of a larger example provided for the class. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/StringInfo/Overview/StringInfo.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/StringInfo/Overview/StringInfo.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/StringInfo/Overview/stringinfo.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Globalization/TextElementEnumerator.xml b/xml/System.Globalization/TextElementEnumerator.xml index 8bb13b721d3..ef3614d6366 100644 --- a/xml/System.Globalization/TextElementEnumerator.xml +++ b/xml/System.Globalization/TextElementEnumerator.xml @@ -110,7 +110,7 @@ ## Examples The following example uses the class to enumerate the text elements of a string. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/TextElementEnumerator/Overview/tee_summary.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/TextElementEnumerator/Overview/tee_summary.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/TextElementEnumerator/Overview/tee_summary.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Globalization/TextInfo.xml b/xml/System.Globalization/TextInfo.xml index 32c68de27ab..ca6eb3333be 100644 --- a/xml/System.Globalization/TextInfo.xml +++ b/xml/System.Globalization/TextInfo.xml @@ -960,7 +960,7 @@ The property always reflects a spec ## Examples The following code example changes the casing of a string based on the English (United States) culture, with the culture name en-US. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/TextInfo/ToTitleCase/textinfo_casing.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/TextInfo/ToTitleCase/textinfo_casing.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/TextInfo/ToTitleCase/textinfo_casing.vb" id="Snippet1"::: ]]> @@ -1245,12 +1245,12 @@ The property always reflects a spec ## Examples The following example changes the casing of a string based on the English (United States) culture, with the culture name en-US. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/TextInfo/ToTitleCase/textinfo_casing.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/TextInfo/ToTitleCase/textinfo_casing.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/TextInfo/ToTitleCase/textinfo_casing.vb" id="Snippet1"::: The following example passes each string in an array to the 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. - :::code language="csharp" source="~/snippets/csharp/System.Globalization/TextInfo/ToTitleCase/totitlecase2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Globalization/TextInfo/ToTitleCase/totitlecase2.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/TextInfo/ToTitleCase/totitlecase2.vb" id="Snippet1"::: ]]> @@ -1275,7 +1275,7 @@ The property always reflects a spec ## Examples The following code example changes the casing of a string based on the English (United States) culture, with the culture name en-US. -:::code language="csharp" source="~/snippets/csharp/System.Globalization/TextInfo/ToTitleCase/textinfo_casing.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System.Globalization/TextInfo/ToTitleCase/textinfo_casing.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Globalization/TextInfo/ToTitleCase/textinfo_casing.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Numerics/BigInteger.xml b/xml/System.Numerics/BigInteger.xml index 244ac9afef8..0373c34aa55 100644 --- a/xml/System.Numerics/BigInteger.xml +++ b/xml/System.Numerics/BigInteger.xml @@ -1633,7 +1633,7 @@ The individual bytes in the `value` array should be in little-endian order, from ## Examples The following example creates an array of values. It then uses each element as the quotient in a division operation that uses the method, the division operator (/), and the method. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/Divide/Divide1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/Divide/Divide1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/BigInteger/Divide/Divide1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/BigInteger/Divide/Divide1.vb" id="Snippet1"::: @@ -1752,7 +1752,7 @@ The individual bytes in the `value` array should be in little-endian order, from ## Examples The following example creates an array of values. It then uses each element as the quotient in a division operation that uses the method, the division operator (/), and the method. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/Divide/Divide1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/Divide/Divide1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/BigInteger/Divide/Divide1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/BigInteger/Divide/Divide1.vb" id="Snippet1"::: @@ -2777,7 +2777,7 @@ A return value of `false` does not imply that method along with the method. Note that the result is if the result is greater than . The following example calculates the square root of each element in an array of values. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/LogMethod/log1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/LogMethod/log1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/BigInteger/LogMethod/log1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/BigInteger/LogMethod/log1.vb" id="Snippet1"::: @@ -3030,7 +3030,7 @@ A return value of `false` does not imply that method to select the largest number in an array of values. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/Max/Max1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/Max/Max1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/BigInteger/Max/Max1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/BigInteger/Max/Max1.vb" id="Snippet1"::: @@ -3319,7 +3319,7 @@ For this method matches the IEE ## Examples The following example provides a simple illustration of calling the method. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/ModPow/ModPow1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/ModPow/ModPow1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/BigInteger/ModPow/ModPow1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/BigInteger/ModPow/ModPow1.vb" id="Snippet1"::: @@ -3878,7 +3878,7 @@ For this method matches the IEE ## Examples The following example creates an array of values. It then uses each element as the quotient in a division operation that uses the method, the division operator (/), and the method. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/Divide/Divide1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/Divide/Divide1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/BigInteger/Divide/Divide1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/BigInteger/Divide/Divide1.vb" id="Snippet1"::: @@ -8265,7 +8265,7 @@ For this method matches the IEE ## Remarks The method defines the operation of the bitwise one's complement operator for values. The bitwise one's complement operator reverses each bit in a numeric value. That is, bits in `value` that are 0 are set to 1 in the result, and bits that are 1 are set to 0 in the result. The method enables code such as the following: - :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/op_OnesComplement/OnesComplement1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/op_OnesComplement/OnesComplement1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/BigInteger/op_OnesComplement/OnesComplement1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/BigInteger/op_OnesComplement/OnesComplement1.vb" id="Snippet1"::: @@ -8820,7 +8820,7 @@ This operation performs an unsigned (otherwise known as a logical) right shift o If `value` is a hexadecimal string, the method interprets `value` as a negative number stored by using two's complement representation if its first two hexadecimal digits are greater than or equal to `0x80`. In other words, the method interprets the highest-order bit of the first byte in `value` as the sign bit. To make sure that a hexadecimal string is correctly interpreted as a positive number, the first digit in `value` must have a value of zero. For example, the method interprets `0x80` as a negative value, but it interprets either `0x080` or `0x0080` as a positive value. The following example illustrates the difference between hexadecimal strings that represent negative and positive values. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/Parse/ParseHex1.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/Parse/ParseHex1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/BigInteger/Parse/ParseHex1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/BigInteger/Parse/ParseHex1.vb" id="Snippet3"::: @@ -9213,7 +9213,7 @@ If `provider` is `null`, the object If `value` is a hexadecimal string, the method interprets `value` as a negative number stored by using two's complement representation if its first two hexadecimal digits are greater than or equal to `0x80`. In other words, the method interprets the highest-order bit of the first byte in `value` as the sign bit. To make sure that a hexadecimal string is correctly interpreted as a positive number, the first digit in `value` must have a value of zero. For example, the method interprets `0x80` as a negative value, but it interprets either `0x080` or `0x0080` as a positive value. The following example illustrates the difference between hexadecimal strings that represent negative and positive values. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/Parse/ParseHex1.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/Parse/ParseHex1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/BigInteger/Parse/ParseHex1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/BigInteger/Parse/ParseHex1.vb" id="Snippet3"::: @@ -9425,7 +9425,7 @@ If `provider` is `null`, the object ## Examples The following example compares the remainder from the method with the remainder returned by the method to establish that the two methods calculate identical remainders. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/Remainder/Remainder1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/Remainder/Remainder1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/BigInteger/Remainder/Remainder1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/BigInteger/Remainder/Remainder1.vb" id="Snippet1"::: @@ -11188,7 +11188,7 @@ The following example calls the values are represented in byte arrays. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/ToByteArray/ToByteArray1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/ToByteArray/ToByteArray1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/BigInteger/ToByteArray/ToByteArray1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/BigInteger/ToByteArray/ToByteArray1.vb" id="Snippet1"::: @@ -12199,7 +12199,7 @@ If `provider` is `null`, the object If `value` is a hexadecimal string, the method interprets `value` as a negative number stored by using two's complement representation if its first two hexadecimal digits are greater than or equal to `0x80`. In other words, the method interprets the highest-order bit of the first byte in `value` as the sign bit. To make sure that a hexadecimal string is correctly interpreted as a positive number, the first digit in `value` must have a value of zero. For example, the method interprets `0x80` as a negative value, but it interprets either `0x080` or `0x0080` as a positive value. The following example illustrates the difference between hexadecimal strings that represent negative and positive values. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/TryParse/TryParseHex1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/BigInteger/TryParse/TryParseHex1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/BigInteger/TryParse/TryParseHex1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/BigInteger/TryParse/TryParseHex1.vb" id="Snippet1"::: diff --git a/xml/System.Numerics/Complex.xml b/xml/System.Numerics/Complex.xml index fd62a882d1b..f9095134a52 100644 --- a/xml/System.Numerics/Complex.xml +++ b/xml/System.Numerics/Complex.xml @@ -232,7 +232,7 @@ ## Examples The following example instantiates two complex numbers, and then uses them in addition, subtraction, multiplication, and division operations. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/.ctor/ctor1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/.ctor/ctor1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/Complex/.ctor/ctor1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/Complex/.ctor/ctor1.vb" id="Snippet1"::: @@ -296,7 +296,7 @@ ## Examples The following example calculates the absolute value of a complex number and demonstrates that it is equivalent to the value of the property. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Abs/abs1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Abs/abs1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/Complex/Abs/abs1.fs" id="Snippet1"::: ]]> @@ -387,7 +387,7 @@ The following example illustrates addition with complex numbers. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Add/add1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Add/add1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/Complex/Add/add1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/Complex/Add/add1.vb" id="Snippet1"::: ]]> @@ -730,7 +730,7 @@ $(a + c) + bi$ ## Examples The following example displays the conjugate of two complex numbers. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Conjugate/conjugate1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Conjugate/conjugate1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/Complex/Conjugate/conjugate1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/Complex/Conjugate/conjugate1.vb" id="Snippet1"::: @@ -1034,7 +1034,7 @@ $(a + c) + bi$ ## Examples The following example divides a complex number by each element in an array of complex numbers. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Divide/divide1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Divide/divide1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/Complex/Divide/divide1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/Complex/Divide/divide1.vb" id="Snippet1"::: @@ -1426,7 +1426,7 @@ $\frac{ac + bd}{c^2 + d^2} + (\frac{bc - ad}{c^2 + d^2})i$ ## Examples The following example illustrates the method. It shows that, with some allowance for the lack of precision of the data type, passing the value returned by the method to the method returns the original value. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Exp/log1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Exp/log1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/Complex/Exp/log1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/Complex/Exp/log1.vb" id="Snippet1"::: @@ -1491,7 +1491,7 @@ $\frac{ac + bd}{c^2 + d^2} + (\frac{bc - ad}{c^2 + d^2})i$ ## Examples The following example uses the method to instantiate a complex number based on its polar coordinates and then displays the value of its and properties. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/FromPolarCoordinates/phase1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/FromPolarCoordinates/phase1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/Complex/FromPolarCoordinates/phase1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/Complex/FromPolarCoordinates/phase1.vb" id="Snippet1"::: @@ -1594,7 +1594,7 @@ $\frac{ac + bd}{c^2 + d^2} + (\frac{bc - ad}{c^2 + d^2})i$ ## Examples The following example instantiates an array of objects and displays the real and imaginary components of each in the form `a + bi`. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Imaginary/real1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Imaginary/real1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/Complex/Imaginary/real1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/Complex/Imaginary/real1.vb" id="Snippet1"::: @@ -1645,7 +1645,7 @@ $\frac{ac + bd}{c^2 + d^2} + (\frac{bc - ad}{c^2 + d^2})i$ ## Examples The following example instantiates a value by using the property. It then compares this value to another value that is instantiated by calling the constructor with a real part equal to zero and an imaginary part equal to one. As the output from the example shows, the two values are equal. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/ImaginaryOne/imaginaryone1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/ImaginaryOne/imaginaryone1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/Complex/ImaginaryOne/imaginaryone1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/Complex/ImaginaryOne/imaginaryone1.vb" id="Snippet1"::: @@ -2581,7 +2581,7 @@ This function returns `true` for a complex number `a + bi` where `b` is zero. ## Examples The following example calculates the absolute value of a complex number and demonstrates that it is equivalent to the value of the property. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Abs/abs1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Abs/abs1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/Complex/Abs/abs1.fs" id="Snippet1"::: ]]> @@ -2706,7 +2706,7 @@ The method is implemented for Languag The following example multiples a complex number by each element in an array of complex numbers. -:::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Multiply/multiply1.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Multiply/multiply1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/Complex/Multiply/multiply1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/Complex/Multiply/multiply1.vb" id="Snippet1"::: @@ -3052,7 +3052,7 @@ The operators that receive one dou The following example illustrates addition with complex numbers: -:::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Add/add2.cs" interactive="try-dotnet" id="Snippet2"::: +:::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Add/add2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/Complex/Add/add2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/Complex/Add/add2.vb" id="Snippet2"::: @@ -5334,7 +5334,7 @@ Languages that don't support custom operators can call the method to instantiate a complex number based on its polar coordinates, and then displays the value of its and properties. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/FromPolarCoordinates/phase1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/FromPolarCoordinates/phase1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/Complex/FromPolarCoordinates/phase1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/Complex/FromPolarCoordinates/phase1.vb" id="Snippet1"::: @@ -5407,7 +5407,7 @@ Languages that don't support custom operators can call the objects and displays the real and imaginary components of each in the form `a + bi`. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Imaginary/real1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Imaginary/real1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/Complex/Imaginary/real1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/Complex/Imaginary/real1.vb" id="Snippet1"::: @@ -5576,7 +5576,7 @@ $\frac{a}{a^2 + b^2} + -\frac{b}{a^2 + b^2}$ ## Examples The following example uses the method to calculate the reciprocal values of several complex numbers. It also demonstrates that the result of multiplying a complex number by its reciprocal is . - :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Reciprocal/reciprocal1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/Reciprocal/reciprocal1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/Complex/Reciprocal/reciprocal1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/Complex/Reciprocal/reciprocal1.vb" id="Snippet1"::: @@ -5781,7 +5781,7 @@ The methods that receive one double a The following example subtracts each complex number in an array from a complex number: -:::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/op_Subtraction/subtract1.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/op_Subtraction/subtract1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/Complex/op_Subtraction/subtract1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/Complex/op_Subtraction/subtract1.vb" id="Snippet1"::: @@ -6864,7 +6864,7 @@ Languages that support custom operators can use the objects that represent the English - United States ("en-US") and French - France ("fr-FR") cultures. - :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/ToString/tostring4.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System.Numerics/Complex/ToString/tostring4.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System.Numerics/Complex/ToString/tostring4.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Numerics/Complex/ToString/tostring4.vb" id="Snippet4"::: diff --git a/xml/System.Reflection/PropertyInfo.xml b/xml/System.Reflection/PropertyInfo.xml index b5d36b6c4e5..737ccf9c7c9 100644 --- a/xml/System.Reflection/PropertyInfo.xml +++ b/xml/System.Reflection/PropertyInfo.xml @@ -1939,7 +1939,7 @@ Console.WriteLine("CurrCult: " + ## Examples The following example defines an `Employee` class that has five properties. It then uses retrieves an array of objects that represent those properties and displays the name and type of each. - :::code language="csharp" source="~/snippets/csharp/System.Reflection/PropertyInfo/PropertyType/propertytype1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Reflection/PropertyInfo/PropertyType/propertytype1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/PropertyInfo/PropertyType/propertytype1.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Security.Cryptography/Aes.xml b/xml/System.Security.Cryptography/Aes.xml index 69233b2958e..3fc6e039877 100644 --- a/xml/System.Security.Cryptography/Aes.xml +++ b/xml/System.Security.Cryptography/Aes.xml @@ -76,7 +76,7 @@ ## Examples The following example demonstrates how to encrypt and decrypt sample data by using the class. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/Aes/Overview/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/Aes/Overview/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/Aes/Overview/program.vb" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/aessample/fs/program.fs" id="Snippet1"::: diff --git a/xml/System.Security.Cryptography/AesCryptoServiceProvider.xml b/xml/System.Security.Cryptography/AesCryptoServiceProvider.xml index 4e61ab8da1d..632bc890fcb 100644 --- a/xml/System.Security.Cryptography/AesCryptoServiceProvider.xml +++ b/xml/System.Security.Cryptography/AesCryptoServiceProvider.xml @@ -70,7 +70,7 @@ ## Examples The following example demonstrates how to encrypt and decrypt sample data using the class. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AesCryptoServiceProvider/Overview/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AesCryptoServiceProvider/Overview/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/AesCryptoServiceProvider/Overview/program.vb" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/aescryptoservprovider/fs/program.fs" id="Snippet1"::: diff --git a/xml/System.Security.Cryptography/AesManaged.xml b/xml/System.Security.Cryptography/AesManaged.xml index e2ba0f5f2a2..861c767d68a 100644 --- a/xml/System.Security.Cryptography/AesManaged.xml +++ b/xml/System.Security.Cryptography/AesManaged.xml @@ -82,7 +82,7 @@ ## Examples The following example demonstrates how to encrypt and decrypt sample data using the class. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AesManaged/Overview/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AesManaged/Overview/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/AesManaged/Overview/program.vb" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/aesmanaged/fs/program.fs" id="Snippet1"::: diff --git a/xml/System.Security.Cryptography/CryptoStream.xml b/xml/System.Security.Cryptography/CryptoStream.xml index 117f97fd687..20a2456924e 100644 --- a/xml/System.Security.Cryptography/CryptoStream.xml +++ b/xml/System.Security.Cryptography/CryptoStream.xml @@ -81,7 +81,7 @@ This type implements the interface. When you've finish The following example demonstrates how to use a to encrypt a string. This method uses the class with the specified and initialization vector (). -:::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/CryptoStream/Overview/CryptoStream.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/CryptoStream/Overview/CryptoStream.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/CryptoStream/Overview/CryptoStream.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Security.Cryptography/CspParameters.xml b/xml/System.Security.Cryptography/CspParameters.xml index eef3e6293dc..d5856ea1dbe 100644 --- a/xml/System.Security.Cryptography/CspParameters.xml +++ b/xml/System.Security.Cryptography/CspParameters.xml @@ -159,7 +159,7 @@ ## Examples The following code example creates a key container using the class and saves the key in the container. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/CspParameters/Overview/capikey.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/CspParameters/Overview/capikey.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/CspParameters/Overview/capikey.vb" id="Snippet1"::: ]]> @@ -290,7 +290,7 @@ ## Examples The following code example uses the class to select a Smart Card Cryptographic Service Provider. It then signs and verifies data using the smart card. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/CspParameters/Overview/example.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/CspParameters/Overview/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/CspParameters/Overview/example.vb" id="Snippet1"::: ]]> @@ -614,7 +614,7 @@ ## Examples The following code example creates a key container using the class and saves the key in the container. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/CspParameters/Overview/capikey.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/CspParameters/Overview/capikey.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/CspParameters/Overview/capikey.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Security.Cryptography/DESCryptoServiceProvider.xml b/xml/System.Security.Cryptography/DESCryptoServiceProvider.xml index 65bb8457245..7d943c9a4fe 100644 --- a/xml/System.Security.Cryptography/DESCryptoServiceProvider.xml +++ b/xml/System.Security.Cryptography/DESCryptoServiceProvider.xml @@ -407,12 +407,12 @@ ## Examples The following code example shows how to create and use a object to encrypt and decrypt data in a file. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/DESCryptoServiceProvider/CreateEncryptor/fileexample.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/DESCryptoServiceProvider/CreateEncryptor/fileexample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/DESCryptoServiceProvider/CreateEncryptor/fileexample.vb" id="Snippet1"::: The following code example shows how to create and use a object to encrypt and decrypt data in memory. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/DESCryptoServiceProvider/CreateEncryptor/memoryexample.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/DESCryptoServiceProvider/CreateEncryptor/memoryexample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/DESCryptoServiceProvider/CreateEncryptor/memoryexample.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Security.Cryptography/HashAlgorithm.xml b/xml/System.Security.Cryptography/HashAlgorithm.xml index 00d1220b58d..d10de413782 100644 --- a/xml/System.Security.Cryptography/HashAlgorithm.xml +++ b/xml/System.Security.Cryptography/HashAlgorithm.xml @@ -1575,7 +1575,7 @@ For more information about Dispose and Finalize, see [Cleaning Up Unmanaged Reso ## Examples The following code examples use the method with the method to hash a string. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/HashAlgorithm/TransformBlock/sample.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/HashAlgorithm/TransformBlock/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/HashAlgorithm/TransformBlock/sample.vb" id="Snippet1"::: ]]> @@ -1664,7 +1664,7 @@ For more information about Dispose and Finalize, see [Cleaning Up Unmanaged Reso ## Examples The following code examples use the method with the method to hash a string. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/HashAlgorithm/TransformBlock/sample.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/HashAlgorithm/TransformBlock/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/HashAlgorithm/TransformBlock/sample.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Security.Cryptography/KeyedHashAlgorithm.xml b/xml/System.Security.Cryptography/KeyedHashAlgorithm.xml index e5442c8f50d..b82db550ce5 100644 --- a/xml/System.Security.Cryptography/KeyedHashAlgorithm.xml +++ b/xml/System.Security.Cryptography/KeyedHashAlgorithm.xml @@ -76,7 +76,7 @@ ## Examples The following code example demonstrates how to derive from the class. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/KeyedHashAlgorithm/Overview/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/KeyedHashAlgorithm/Overview/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/KeyedHashAlgorithm/Overview/program.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Security.Cryptography/Oid.xml b/xml/System.Security.Cryptography/Oid.xml index c80e141b937..e41daf519c1 100644 --- a/xml/System.Security.Cryptography/Oid.xml +++ b/xml/System.Security.Cryptography/Oid.xml @@ -65,7 +65,7 @@ ## Examples The following code example shows how to use the class. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/Oid/Overview/cryptography.oid.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/Oid/Overview/cryptography.oid.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/Oid/Overview/cryptography.oid.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Security.Cryptography/RC2CryptoServiceProvider.xml b/xml/System.Security.Cryptography/RC2CryptoServiceProvider.xml index 1ec8ab34190..8edbc63656a 100644 --- a/xml/System.Security.Cryptography/RC2CryptoServiceProvider.xml +++ b/xml/System.Security.Cryptography/RC2CryptoServiceProvider.xml @@ -87,7 +87,7 @@ ## Examples The following code example encrypts and then decrypts a string. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RC2CryptoServiceProvider/Overview/class1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RC2CryptoServiceProvider/Overview/class1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/RC2CryptoServiceProvider/Overview/class1.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Security.Cryptography/RNGCryptoServiceProvider.xml b/xml/System.Security.Cryptography/RNGCryptoServiceProvider.xml index 364559b6af1..9dbaf8f1443 100644 --- a/xml/System.Security.Cryptography/RNGCryptoServiceProvider.xml +++ b/xml/System.Security.Cryptography/RNGCryptoServiceProvider.xml @@ -82,7 +82,7 @@ ## Examples The following code example shows how to create a random number with the class. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RNGCryptoServiceProvider/Overview/rngcsp.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RNGCryptoServiceProvider/Overview/rngcsp.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/RNGCryptoServiceProvider/Overview/rngcsp.vb" id="Snippet1"::: ]]> @@ -150,7 +150,7 @@ ## Examples The following code example shows how to create a random number with the class. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RNGCryptoServiceProvider/Overview/rngcsp.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RNGCryptoServiceProvider/Overview/rngcsp.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/RNGCryptoServiceProvider/Overview/rngcsp.vb" id="Snippet1"::: ]]> @@ -471,7 +471,7 @@ ## Examples The following code example shows how to create a random number with the class. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RNGCryptoServiceProvider/Overview/rngcsp.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RNGCryptoServiceProvider/Overview/rngcsp.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/RNGCryptoServiceProvider/Overview/rngcsp.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Security.Cryptography/RSACryptoServiceProvider.xml b/xml/System.Security.Cryptography/RSACryptoServiceProvider.xml index 164815b34aa..121bb498788 100644 --- a/xml/System.Security.Cryptography/RSACryptoServiceProvider.xml +++ b/xml/System.Security.Cryptography/RSACryptoServiceProvider.xml @@ -1716,7 +1716,7 @@ The supported RSA key sizes depend on the available cryptographic service provid ## Examples The following code example creates an object and persists the key to a key container. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/PersistKeyInCsp/example.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/PersistKeyInCsp/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/RSACryptoServiceProvider/PersistKeyInCsp/example.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Security.Cryptography/RSAPKCS1KeyExchangeFormatter.xml b/xml/System.Security.Cryptography/RSAPKCS1KeyExchangeFormatter.xml index 6ee8a225ccc..eed2a07210f 100644 --- a/xml/System.Security.Cryptography/RSAPKCS1KeyExchangeFormatter.xml +++ b/xml/System.Security.Cryptography/RSAPKCS1KeyExchangeFormatter.xml @@ -80,7 +80,7 @@ ## Examples The following example shows how to use the class to create an exchange key for a message recipient. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSAOAEPKeyExchangeFormatter/CreateKeyExchange/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSAOAEPKeyExchangeFormatter/CreateKeyExchange/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/RSAOAEPKeyExchangeFormatter/CreateKeyExchange/program.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Security.Cryptography/RSAPKCS1SignatureDeformatter.xml b/xml/System.Security.Cryptography/RSAPKCS1SignatureDeformatter.xml index 1ce9b175e6d..26116ae842a 100644 --- a/xml/System.Security.Cryptography/RSAPKCS1SignatureDeformatter.xml +++ b/xml/System.Security.Cryptography/RSAPKCS1SignatureDeformatter.xml @@ -374,7 +374,7 @@ ## Examples The following example demonstrates how to use the method to verify a signature. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSAPKCS1SignatureDeformatter/Overview/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSAPKCS1SignatureDeformatter/Overview/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/RSAPKCS1SignatureDeformatter/Overview/program.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Security.Cryptography/RijndaelManaged.xml b/xml/System.Security.Cryptography/RijndaelManaged.xml index a2824c22c7c..fb79e55e246 100644 --- a/xml/System.Security.Cryptography/RijndaelManaged.xml +++ b/xml/System.Security.Cryptography/RijndaelManaged.xml @@ -84,7 +84,7 @@ ## Examples The following example demonstrates how to encrypt and decrypt sample data using the `RijndaelManaged` class. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RijndaelManaged/Overview/class1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RijndaelManaged/Overview/class1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/RijndaelManaged/Overview/class1.vb" id="Snippet1"::: ]]> @@ -135,7 +135,7 @@ ## Examples The following example creates a new instance of the `RijndaelManaged` class. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RijndaelManaged/Overview/class1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RijndaelManaged/Overview/class1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/RijndaelManaged/Overview/class1.vb" id="Snippet1"::: ]]> @@ -435,7 +435,7 @@ ## Examples The following code examples demonstrates how to encrypt a message using the `CreateEncryptor` method. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RijndaelManaged/Overview/class1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RijndaelManaged/Overview/class1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/RijndaelManaged/Overview/class1.vb" id="Snippet1"::: ]]> @@ -578,7 +578,7 @@ ## Examples - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RijndaelManaged/Overview/class1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RijndaelManaged/Overview/class1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/RijndaelManaged/Overview/class1.vb" id="Snippet1"::: ]]> @@ -636,7 +636,7 @@ ## Examples - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RijndaelManaged/Overview/class1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RijndaelManaged/Overview/class1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/RijndaelManaged/Overview/class1.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Security.Cryptography/SymmetricAlgorithm.xml b/xml/System.Security.Cryptography/SymmetricAlgorithm.xml index 06e8f1a8f1b..42cd1f37b9f 100644 --- a/xml/System.Security.Cryptography/SymmetricAlgorithm.xml +++ b/xml/System.Security.Cryptography/SymmetricAlgorithm.xml @@ -653,7 +653,7 @@ We recommend that you specify the algorithm by calling the method. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/SymmetricAlgorithm/CreateEncryptor/encryptor.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/SymmetricAlgorithm/CreateEncryptor/encryptor.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/SymmetricAlgorithm/CreateEncryptor/encryptor.vb" id="Snippet1"::: ]]> @@ -2860,7 +2860,7 @@ Allows an to attempt to free resources and perfor ## Examples The following example shows the value of for the AES symmetric algorithm. - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/SymmetricAlgorithm/LegalBlockSizes/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/SymmetricAlgorithm/LegalBlockSizes/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography/SymmetricAlgorithm/LegalBlockSizes/program.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Text.RegularExpressions/Capture.xml b/xml/System.Text.RegularExpressions/Capture.xml index 5195186e79b..1f72919e20b 100644 --- a/xml/System.Text.RegularExpressions/Capture.xml +++ b/xml/System.Text.RegularExpressions/Capture.xml @@ -68,7 +68,7 @@ ## Examples The following example defines a regular expression that matches sentences that contain no punctuation except for a period ("."). - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Capture/Overview/example1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Capture/Overview/example1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Capture/Overview/example1.vb" id="Snippet1"::: The regular expression pattern `((\w+)[\s.])+` is defined as shown in the following table. Note that in this regular expression, a quantifier (+) is applied to the entire regular expression. @@ -307,7 +307,7 @@ ## Examples The following example defines a regular expression that matches sentences that contain no punctuation except for a period ("."). The `Match.Value` property displays the result string, which consists of a matched sentence, for each match. The `Group.Value` property displays the result string for each capturing group; it consists of the last string captured by that capturing group. The property displays the result string for each capture. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Capture/Overview/example1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Capture/Overview/example1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Capture/Overview/example1.vb" id="Snippet1"::: The regular expression pattern `((\w+)[\s.])+` is defined as shown in the following table. Note that in this regular expression, a quantifier (+) is applied to the entire regular expression. @@ -323,7 +323,7 @@ The following example uses a regular expression pattern, `^([a-z]+)(\d+)*\.([a-z]+(\d)*)$`, to match a product number that consists of two parts separated by a period. Both parts consist of alphabetic characters followed by optional numbers. Because the first input string does not match the pattern, the value of the returned object's `Value` property is . Similarly, when the regular expression pattern is unable to match a capturing group, the value of the corresponding object's `Value` property is . - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Capture/Value/value1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Capture/Value/value1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Capture/Value/value1.vb" id="Snippet1"::: The regular expression pattern is defined as shown in the following table: diff --git a/xml/System.Text.RegularExpressions/CaptureCollection.xml b/xml/System.Text.RegularExpressions/CaptureCollection.xml index 08fb4f69511..9487b94368f 100644 --- a/xml/System.Text.RegularExpressions/CaptureCollection.xml +++ b/xml/System.Text.RegularExpressions/CaptureCollection.xml @@ -126,7 +126,7 @@ This regular expression pattern identifies the words in a sentence. The pattern defines a single capturing group that consists of one or more word characters followed by one or two non-word characters. The regular expression pattern uses the `+` quantifier to match one or more occurrences of this group. The output from this example shows that the object and the object returned by the `Match.Captures` property contain information about the same match. The second object, which corresponds to the only capturing group in the regular expression, identifies only the last captured string, whereas the object returned by the first capturing group's property includes all captured substrings. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/CaptureCollection/Overview/capturecollectionex1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/CaptureCollection/Overview/capturecollectionex1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/CaptureCollection/Overview/capturecollectionex1.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Text.RegularExpressions/Group.xml b/xml/System.Text.RegularExpressions/Group.xml index 58cd6b153c0..6f309cb3c66 100644 --- a/xml/System.Text.RegularExpressions/Group.xml +++ b/xml/System.Text.RegularExpressions/Group.xml @@ -78,7 +78,7 @@ In this regular expression pattern, the subpattern `(\w+?)` is designed to match multiple words within a sentence. However, the value of the object represents only the last match that `(\w+?)` captures, whereas the property returns a that represents all captured text. As the output shows, the for the second capturing group contains four objects. The last of these corresponds to the object. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Group/Overview/groupandcaptures1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Group/Overview/groupandcaptures1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Group/Overview/groupandcaptures1.vb" id="Snippet1"::: ]]> @@ -133,12 +133,12 @@ ## Remarks If a quantifier is not applied to a capturing group, the collection returned by the property contains a single object that provides information about the same substring as the object. This is illustrated in the following example. It defines a regular expression, `\b(\w+)\b`, that extracts a single word from a sentence. The object captures the word "This", and the single object in the contains information about the same capture. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Group/Captures/captures1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Group/Captures/captures1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Group/Captures/captures1.vb" id="Snippet1"::: The real utility of the property occurs when a quantifier is applied to a capturing group so that the group captures multiple substrings in a single regular expression. In this case, the object contains information about the last captured substring, whereas the property contains information about all the substrings captured by the group. In the following example, the regular expression `\b(\w+\s*)+\.` matches an entire sentence that ends in a period. The group `(\w+\s*)+` captures the individual words in the collection. Because the collection contains information only about the last captured substring, it captures the last word in the sentence, "sentence". However, each word captured by the group is available from the collection returned by the property. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Group/Captures/captures2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Group/Captures/captures2.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Group/Captures/captures2.vb" id="Snippet2"::: ]]> diff --git a/xml/System.Text.RegularExpressions/GroupCollection.xml b/xml/System.Text.RegularExpressions/GroupCollection.xml index 63385f4fd1e..8a270f70f97 100644 --- a/xml/System.Text.RegularExpressions/GroupCollection.xml +++ b/xml/System.Text.RegularExpressions/GroupCollection.xml @@ -142,7 +142,7 @@ For each match, the contains three objects. The first object contains the string that matches the entire regular expression. The second object, which represents the first captured group, contains the product name. The third object, which represents the second captured group, contains the trademark or registered trademark symbol. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/GroupCollection/Overview/Example1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/GroupCollection/Overview/Example1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/GroupCollection/Overview/Example1.vb" id="Snippet1"::: ]]> @@ -252,7 +252,7 @@ ## Examples The following example extracts each word from a sentence and captures it in a capturing group, The method is then used to copy the elements in each match's object to an array that contains the capturing groups from all matches. The individual captured words are then displayed to the console. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/GroupCollection/CopyTo/copyto1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/GroupCollection/CopyTo/copyto1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/GroupCollection/CopyTo/copyto1.vb" id="Snippet1"::: The regular expression is defined as follows: @@ -643,7 +643,7 @@ A collection that is read-only does not allow the addition or removal of element |`(\w)`|This is the second capturing group.| |`\k`|Match the string captured by the second capturing group.| - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/GroupCollection/Item/item3.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/GroupCollection/Item/item3.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/GroupCollection/Item/item3.vb" id="Snippet2"::: ]]> @@ -721,7 +721,7 @@ A collection that is read-only does not allow the addition or removal of element |`(?\w)`|Match a single word character. Name this the `letter` capturing group.| |`\k`|Match the string captured by the `letter` capturing group.| - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/GroupCollection/Item/item2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/GroupCollection/Item/item2.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/GroupCollection/Item/item2.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Text.RegularExpressions/Match.xml b/xml/System.Text.RegularExpressions/Match.xml index d3c0a1f8816..c67f96cc4ba 100644 --- a/xml/System.Text.RegularExpressions/Match.xml +++ b/xml/System.Text.RegularExpressions/Match.xml @@ -95,14 +95,14 @@ The following examples use the regular expression `Console\.Write(Line)?`. The r The following example calls the method to retrieve all pattern matches in an input string. It then iterates the objects in the returned object to display information about each match. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Match/Overview/Match2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Match/Overview/Match2.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Match/Overview/Match2.vb" id="Snippet2"::: **Example 2** The following example calls the and methods to retrieve one match at a time. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Match/Overview/Match3.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Match/Overview/Match3.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Match/Overview/Match3.vb" id="Snippet3"::: ]]> @@ -217,7 +217,7 @@ The following examples use the regular expression `Console\.Write(Line)?`. The r ## Remarks A regular expression pattern can include subexpressions, which are defined by enclosing a portion of the regular expression pattern in parentheses. Every such subexpression forms a group. The property provides access to information about those subexpression matches. For example, the regular expression pattern `(\d{3})-(\d{3}-\d{4})`, which matches North American telephone numbers, has two subexpressions. The first consists of the area code, which composes the first three digits of the telephone number. This group is captured by the first portion of the regular expression, `(\d{3})`. The second consists of the individual telephone number, which composes the last seven digits of the telephone number. This group is captured by the second portion of the regular expression, `(\d{3}-\d{4})`. These two groups can then be retrieved from the object that is returned by the property, as the following example shows. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Match/Groups/groups1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Match/Groups/groups1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Match/Groups/groups1.vb" id="Snippet1"::: The object returned by the property is a zero-based collection object that always has at least one member. If the regular expression engine cannot find any matches in a particular input string, the property of the single object in the collection (the object at index 0) is set to `false` and the object's property is set to . If the regular expression engine can find a match, the first element of the object (the element at index 0) returned by the property contains a string that matches the entire regular expression pattern. Each subsequent element, from index one upward, represents a captured group, if the regular expression includes capturing groups. For more information, see the "Grouping Constructs and Regular Expression Objects" section of the [Grouping Constructs](/dotnet/standard/base-types/grouping-constructs-in-regular-expressions) article. @@ -227,7 +227,7 @@ The following examples use the regular expression `Console\.Write(Line)?`. The r ## Examples The following example attempts to match a regular expression pattern against a sample string. The example uses the property to store information that is retrieved by the match for display to the console. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Match/Groups/snippet8.cs" interactive="try-dotnet" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Match/Groups/snippet8.cs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Match/Groups/snippet8.vb" id="Snippet8"::: ]]> @@ -293,7 +293,7 @@ The following examples use the regular expression `Console\.Write(Line)?`. The r ## Examples The following example uses the method to capture regular expression matches beyond the first match. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Match/Groups/snippet8.cs" interactive="try-dotnet" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Match/Groups/snippet8.cs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Match/Groups/snippet8.vb" id="Snippet8"::: ]]> @@ -304,7 +304,7 @@ The following examples use the regular expression `Console\.Write(Line)?`. The r The following example provides an illustration. The regular expression pattern a* searches for zero or more occurrences of the letter "a" in the string "abaabb". As the output from the example shows, the search finds six matches. The first match attempt finds the first "a". The second match starts exactly where the first match ends, before the first b; it finds zero occurrences of "a" and returns an empty string. The third match does not begin exactly where the second match ended, because the second match returned an empty string. Instead, it begins one character later, after the first "b". The third match finds two occurrences of "a" and returns "aa". The fourth match attempt begins where the third match ended, before the second "b", and returns an empty string. The fifth match attempt again advances one character so that it begins before the third "b" and returns an empty string. The sixth match begins after the last "b" and returns an empty string again. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Match/NextMatch/nextmatch1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Match/NextMatch/nextmatch1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Match/NextMatch/nextmatch1.vb" id="Snippet1"::: @@ -368,7 +368,7 @@ The following examples use the regular expression `Console\.Write(Line)?`. The r ## Examples The following example replaces the hyphens that begin and end a parenthetical expression with parentheses. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Match/Result/result1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Match/Result/result1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Match/Result/result1.vb" id="Snippet1"::: The regular expression pattern `--(.+?)--` is interpreted as shown in the following table. diff --git a/xml/System.Text.RegularExpressions/MatchCollection.xml b/xml/System.Text.RegularExpressions/MatchCollection.xml index 48d32e44722..edfad1d8b63 100644 --- a/xml/System.Text.RegularExpressions/MatchCollection.xml +++ b/xml/System.Text.RegularExpressions/MatchCollection.xml @@ -124,7 +124,7 @@ ## Examples The following example illustrates the use of the class to interrogate a set of instances. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/MatchCollection/Overview/words.cs" interactive="try-dotnet" id="Snippet0"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/MatchCollection/Overview/words.cs" id="Snippet0"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/MatchCollection/Overview/words.vb" id="Snippet0"::: ]]> @@ -305,7 +305,7 @@ ## Examples The following example uses the property to determine whether the call to the method found any matches. If not, it indicates that no matches were found. Otherwise, it enumerates the matches and displays their value and the position in the input string at which they were found. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/MatchCollection/Count/countex1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/MatchCollection/Count/countex1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/MatchCollection/Count/countex1.vb" id="Snippet1"::: The regular expression pattern `\d+` matches one or more decimal characters in an input string. @@ -549,7 +549,7 @@ A collection that is read-only does not allow the addition or removal of element ## Examples The following example parses the first sentence of Nathaniel Hawthorne's *House of the Seven Gables* and returns a object that contains all words that begin with either an uppercase or lowercase "h". The property is then used to retrieve each word and display it to the console. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/MatchCollection/Item/RegEx_24804.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/MatchCollection/Item/RegEx_24804.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/MatchCollection/Item/RegEx_24804.vb" id="Snippet1"::: The example produces the following output: diff --git a/xml/System.Text.RegularExpressions/MatchEvaluator.xml b/xml/System.Text.RegularExpressions/MatchEvaluator.xml index a409a320928..7b3b675e843 100644 --- a/xml/System.Text.RegularExpressions/MatchEvaluator.xml +++ b/xml/System.Text.RegularExpressions/MatchEvaluator.xml @@ -73,7 +73,7 @@ ## Examples The following code example uses the delegate to replace every matched group of characters with the number of the match occurrence. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/MatchEvaluator/Overview/regexreplace.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/MatchEvaluator/Overview/regexreplace.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/MatchEvaluator/Overview/regexreplace.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Text.RegularExpressions/Regex.xml b/xml/System.Text.RegularExpressions/Regex.xml index 4e552f61f97..93a21f3d66b 100644 --- a/xml/System.Text.RegularExpressions/Regex.xml +++ b/xml/System.Text.RegularExpressions/Regex.xml @@ -221,7 +221,7 @@ ## Examples The following example illustrates how to use this constructor to instantiate a regular expression that matches any word that begins with the letters "a" or "t". - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/.ctor/constructors1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/.ctor/constructors1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/.ctor/constructors1.vb" id="Snippet1"::: Note that the regular expression pattern cannot match the word "The" at the beginning of the text, because comparisons are case-sensitive by default. For an example of case-insensitive comparison, see the constructor. @@ -367,7 +367,7 @@ ## Examples The following example illustrates how to use this constructor to instantiate a regular expression that matches any word that begins with the letters "a" or "t". - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/.ctor/Constructors2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/.ctor/Constructors2.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/.ctor/Constructors2.vb" id="Snippet2"::: Note that the match collection includes the word "The" that begins the text because the `options` parameter has defined case-insensitive comparisons. @@ -469,7 +469,7 @@ ## Examples The following example calls the constructor to instantiate a object with a time-out value of one second. The regular expression pattern `(a+)+$`, which matches one or more sequences of one or more "a" characters at the end of a line, is subject to excessive backtracking. If a is thrown, the example increases the time-out value up to the maximum value of three seconds. Otherwise, it abandons the attempt to match the pattern. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/.ctor/ctor1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/.ctor/ctor1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/.ctor/ctor1.vb" id="Snippet1"::: ]]> @@ -2453,7 +2453,7 @@ Allows an to attempt to free resources and perfor ## Examples The following example defines a general-purpose `ShowMatches` method that displays the names of regular expression groups and their matched text. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/GetGroupNames/getgroupnames1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/GetGroupNames/getgroupnames1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/GetGroupNames/getgroupnames1.vb" id="Snippet1"::: In this case, the regular expression pattern `\b(?\w+)\s?((\w+)\s)*(?\w+)?(?\p{Po})` is intended to parse a simple sentence, and to identify its first word, last word, and ending punctuation mark. The following table shows how the regular expression pattern is interpreted: @@ -2531,7 +2531,7 @@ Allows an to attempt to free resources and perfor ## Examples The following example defines a regular expression, `\b((?\w+)\s*)+(?[.?!])`, that matches a sentence. The regular expression includes three capturing groups: an unnamed group that captures an individual word along with a space character that may follow it; a group named `word` that captures the individual words in the sentence; and a group named `end` that captures the punctuation that ends the sentence. The example calls the method to get the numbers of all capturing groups, and then displays their captured string. In addition, the method is used to indicate whether a particular numbered group corresponds to a named group. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/GetGroupNumbers/getgroupnumbers1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/GetGroupNumbers/getgroupnumbers1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/GetGroupNumbers/getgroupnumbers1.vb" id="Snippet1"::: The regular expression pattern is interpreted as shown in the following table. @@ -2612,7 +2612,7 @@ Allows an to attempt to free resources and perfor ## Examples The following example defines a regular expression pattern that matches an address line containing a U.S. city name, state name, and zip code. The example uses the method to retrieve the names of capturing groups. It then uses these names to retrieve the corresponding captured groups for matches. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/GroupNameFromNumber/groupnamefromnumberex.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/GroupNameFromNumber/groupnamefromnumberex.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/GroupNameFromNumber/groupnamefromnumberex.vb" id="Snippet1"::: The regular expression pattern is defined by the following expression: @@ -2981,7 +2981,7 @@ Allows an to attempt to free resources and perfor ## Examples The following example illustrates the use of the method to determine whether a string is a valid part number. The regular expression assumes that the part number has a specific format that consists of three sets of characters separated by hyphens. The first set, which contains four characters, must consist of an alphanumeric character followed by two numeric characters followed by an alphanumeric character. The second set, which consists of three characters, must be numeric. The third set, which consists of four characters, must have three numeric characters followed by an alphanumeric character. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/IsMatch/ismatch2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/IsMatch/ismatch2.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/IsMatch/ismatch2.vb" id="Snippet2"::: The regular expression pattern is: @@ -3164,7 +3164,7 @@ For more details about `startat`, see the Remarks section of method to determine whether a string is a valid part number. It searches for a part number that follows a colon (:) character in a string. The method is used to determine the position of the colon character, which is then passed to the method. The regular expression assumes that the part number has a specific format that consists of three sets of characters separated by hyphens. The first set, which contains four characters, must consist of an alphanumeric character followed by two numeric characters followed by an alphanumeric character. The second set, which consists of three characters, must be numeric. The third set, which consists of four characters, must have three numeric characters followed by an alphanumeric character. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/IsMatch/ismatch3.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/IsMatch/ismatch3.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/IsMatch/ismatch3.vb" id="Snippet3"::: The regular expression pattern is: @@ -3269,7 +3269,7 @@ For more details about `startat`, see the Remarks section of method to determine whether a string is a valid part number. The regular expression assumes that the part number has a specific format that consists of three sets of characters separated by hyphens. The first set, which contains four characters, must consist of an alphanumeric character followed by two numeric characters followed by an alphanumeric character. The second set, which consists of three characters, must be numeric. The third set, which consists of four characters, must have three numeric characters followed by an alphanumeric character. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/IsMatch/ismatch1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/IsMatch/ismatch1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/IsMatch/ismatch1.vb" id="Snippet1"::: The regular expression pattern is: @@ -3435,7 +3435,7 @@ For more details about `startat`, see the Remarks section of method to determine whether a string is a valid part number. The regular expression assumes that the part number has a specific format that consists of three sets of characters separated by hyphens. The first set, which contains four characters, must consist of an alphanumeric character followed by two numeric characters followed by an alphanumeric character. The second set, which consists of three characters, must be numeric. The third set, which consists of four characters, must have three numeric characters followed by an alphanumeric character. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/IsMatch/ismatch4.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/IsMatch/ismatch4.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/IsMatch/ismatch4.vb" id="Snippet4"::: The regular expression pattern is: @@ -3614,7 +3614,7 @@ For more details about `startat`, see the Remarks section of method to determine whether a string is a valid part number. The regular expression assumes that the part number has a specific format that consists of three sets of characters separated by hyphens. The first set, which contains four characters, must consist of an alphanumeric character followed by two numeric characters followed by an alphanumeric character. The second set, which consists of three characters, must be numeric. The third set, which consists of four characters, must have three numeric characters followed by an alphanumeric character. Matching the regular expression pattern should involve minimal searching through the input string, so the method sets a time-out interval of 500 milliseconds. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/IsMatch/ismatch5.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/IsMatch/ismatch5.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/IsMatch/ismatch5.vb" id="Snippet5"::: The regular expression pattern is: @@ -3746,7 +3746,7 @@ For more details about `startat`, see the Remarks section of method to find the first word that contains at least one `z` character, and then calls the method to find any additional matches. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Match/match1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Match/match1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Match/match1.vb" id="Snippet1"::: The regular expression pattern `\b\w*z+\w*\b` is interpreted as shown in the following table. @@ -4091,7 +4091,7 @@ For more details about `startat`, see the Remarks section of option to ensure that the regular expression locates words beginning with both an uppercase "a" and a lowercase "a". - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Match/match2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Match/match2.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Match/match2.vb" id="Snippet2"::: The regular expression pattern `\ba\w*\b` is interpreted as shown in the following table. @@ -4303,7 +4303,7 @@ For more details about `startat`, see the Remarks section of method to identify any words in a sentence that end in "es". - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Matches/matches1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Matches/matches1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Matches/matches1.vb" id="Snippet1"::: The regular expression pattern `\b\w+es\b` is defined as shown in the following table. @@ -4392,7 +4392,7 @@ For more details about `startat`, see the Remarks section of method to find the first word in a sentence that ends in "es", and then calls the method to identify any additional words that end in "es". - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Matches/matches3.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Matches/matches3.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Matches/matches3.vb" id="Snippet3"::: The regular expression pattern `\b\w+es\b` is defined as shown in the following table. @@ -4490,7 +4490,7 @@ For more details about `startat`, see the Remarks section of method to identify any word in a sentence that ends in "es". - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Matches/matches2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Matches/matches2.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Matches/matches2.vb" id="Snippet2"::: The regular expression pattern `\b\w+es\b` is defined as shown in the following table. @@ -4592,7 +4592,7 @@ For more details about `startat`, see the Remarks section of method to identify any word in a sentence that ends in "es", and then calls the method to perform a case-insensitive comparison of the pattern with the input string. As the output shows, the two methods return different results. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Matches/matches4.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Matches/matches4.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Matches/matches4.vb" id="Snippet4"::: The regular expression pattern `\b\w+es\b` is defined as shown in the following table. @@ -4696,7 +4696,7 @@ For more details about `startat`, see the Remarks section of method to perform a case-sensitive comparison that matches any word in a sentence that ends in "es". It then calls the method to perform a case-insensitive comparison of the pattern with the input string. In both cases, the time-out interval is set to one second. As the output shows, the two methods return different results. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Matches/matches5.cs" interactive="try-dotnet" id="Snippet11"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Matches/matches5.cs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Matches/matches5.vb" id="Snippet11"::: The regular expression pattern `\b\w+es\b` is defined as shown in the following table. @@ -4779,7 +4779,7 @@ For more details about `startat`, see the Remarks section of object by calling the constructor; and you can set its value for all matching operations in an application domain by calling the method and providing a value for the "REGEX_DEFAULT_MATCH_TIMEOUT" property, as the following example illustrates. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/MatchTimeout/regexmatchtimeout1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/MatchTimeout/regexmatchtimeout1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/MatchTimeout/regexmatchtimeout1.vb" id="Snippet1"::: If you do not explicitly set a time-out interval, the default value is used, and matching operations do not time out. @@ -4990,12 +4990,12 @@ For more details about `startat`, see the Remarks section of @@ -5183,7 +5183,7 @@ For more details about `startat`, see the Remarks section of @@ -5274,12 +5274,12 @@ For more details about `startat`, see the Remarks section of method to replace the local machine and drive names in a UNC path with a local file path. The regular expression uses the property to include the name of the local computer, and the method to include the names of the logical drives. To run the example successfully, you should replace the literal string "MyMachine" with your local machine name. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Replace/replace3.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Replace/replace3.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Replace/replace3.vb" id="Snippet3"::: The regular expression pattern is defined by the following expression: @@ -5401,7 +5401,7 @@ For more details about `startat`, see the Remarks section of delegate to call a method named `WordScramble` that scrambles the individual letters in the word. To do this, the `WordScramble` method creates an array that contains the characters in the match. It also creates a parallel array that it populates with random floating-point numbers. The arrays are sorted by calling the method, and the sorted array is provided as an argument to a class constructor. This newly created string is then returned by the `WordScramble` method. The regular expression pattern `\w+` matches one or more word characters; the regular expression engine will continue to add characters to the match until it encounters a non-word character, such as a white-space character. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Replace/replace5.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Replace/replace5.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Replace/replace5.vb" id="Snippet2"::: ]]> @@ -5500,7 +5500,7 @@ For more details about `startat`, see the Remarks section of method to reverse "i" and "e" in the matched string. The remaining words remain unchanged. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Replace/replace7.cs" interactive="try-dotnet" id="Snippet11"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Replace/replace7.cs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Replace/replace7.vb" id="Snippet11"::: The regular expression `\w*(ie|ei)\w*` is defined as shown in the following table. @@ -5597,7 +5597,7 @@ For more details about `startat`, see the Remarks section of method to match the first line of the string, and uses the `Match.Index` and `Match.Count` properties to determine the starting position of the second line. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Replace/replaceexample9.cs" interactive="try-dotnet" id="Snippet9"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Replace/replaceexample9.cs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Replace/replaceexample9.vb" id="Snippet9"::: The regular expression pattern `^.*$` is defined as shown in the following table. @@ -5702,7 +5702,7 @@ For more details about `startat`, see the Remarks section of method to replace the local machine and drive names in a UNC path with a local file path. The regular expression uses the property to include the name of the local computer, and the method to include the names of the logical drives. All regular expression string comparisons are case-insensitive. To run the example successfully, you should replace the literal string "MyMachine" with your local machine name. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Replace/replace4.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Replace/replace4.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Replace/replace4.vb" id="Snippet4"::: The regular expression pattern is defined by the following expression: @@ -5831,7 +5831,7 @@ For more details about `startat`, see the Remarks section of delegate to call a method named `WordScramble` that scrambles the individual letters in the word. To do this, the `WordScramble` method creates an array that contains the characters in the match. It also creates a parallel array that it populates with random floating-point numbers. The arrays are sorted by calling the method, and the sorted array is provided as an argument to a class constructor. This newly created string is then returned by the `WordScramble` method. The regular expression pattern `\w+` matches one or more word characters; the regular expression engine will continue to add characters to the match until it encounters a non-word character, such as a white-space character. The call to the method includes the option so that the comment in the regular expression pattern `\w+ # Matches all the characters in a word.` is ignored by the regular expression engine. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Replace/replace6.cs" interactive="try-dotnet" id="Snippet10"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Replace/replace6.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Replace/replace6.vb" id="Snippet10"::: ]]> @@ -6020,7 +6020,7 @@ For more details about `startat`, see the Remarks section of method to replace the local machine and drive names in a UNC path with a local file path. The regular expression uses the property to include the name of the local computer and the method to include the names of the logical drives. All regular expression string comparisons are case-insensitive, and any single replacement operation times out if a match cannot be found in 0.5 second. To run the example successfully, you should replace the literal string "MyMachine" with your local machine name. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Replace/replace12.cs" interactive="try-dotnet" id="Snippet12"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Replace/replace12.cs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Replace/replace12.vb" id="Snippet12"::: The regular expression pattern is defined by the following expression: @@ -6161,7 +6161,7 @@ For more details about `startat`, see the Remarks section of delegate to call a method named `WordScramble` that scrambles the individual letters in the word. To do this, the `WordScramble` method creates an array that contains the characters in the match. It also creates a parallel array that it populates with random floating-point numbers. The arrays are sorted by calling the method, and the sorted array is provided as an argument to a class constructor. This newly created string is then returned by the `WordScramble` method. The regular expression pattern `\w+` matches one or more word characters; the regular expression engine will continue to add characters to the match until it encounters a non-word character, such as a white-space character. The call to the method includes the option so that the comment in the regular expression pattern `\w+ # Matches all the characters in a word.` is ignored by the regular expression engine. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Replace/replace13.cs" interactive="try-dotnet" id="Snippet13"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Replace/replace13.cs" id="Snippet13"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Replace/replace13.vb" id="Snippet13"::: ]]> @@ -6361,24 +6361,24 @@ For more details about `startat`, see the Remarks section of . - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split21.cs" interactive="try-dotnet" id="Snippet21"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split21.cs" id="Snippet21"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Split/split21.vb" id="Snippet21"::: If capturing parentheses are used in a expression, any captured text is included in the resulting string array. For example, if you split the string "plum-pear" on a hyphen placed within capturing parentheses, the returned array includes a string element that contains the hyphen. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split2.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Split/split2.vb" id="Snippet2"::: If the regular expression pattern includes multiple sets of capturing parentheses, and a match isn't found within the first set of capturing parentheses, captured text from additional capturing parentheses is included in the returned array. If the regular expression can match the empty string, splits the string into an array of single-character strings because the empty string delimiter can be found at every location. For example: - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split11.cs" interactive="try-dotnet" id="Snippet11"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split11.cs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Split/split11.vb" id="Snippet11"::: Note that the returned array also includes an empty string at the beginning and end of the array. @@ -6449,17 +6449,17 @@ If the regular expression pattern includes multiple sets of capturing parenthese If multiple matches are adjacent to one another or if a match is found at the beginning or end of `input`, and the number of matches found is at least two less than `count`, an empty string is inserted into the array. That is, empty strings that result from adjacent matches or from matches at the beginning or end of the input string are counted in determining whether the number of matched substrings equals `count`. In the following example, the regular expression `/d+` is used to split an input string that includes one or more decimal digits into a maximum of three substrings. Because the beginning of the input string matches the regular expression pattern, the first array element contains , the second contains the first set of alphabetic characters in the input string, and the third contains the remainder of the string that follows the third match. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split25.cs" interactive="try-dotnet" id="Snippet25"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split25.cs" id="Snippet25"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Split/split25.vb" id="Snippet25"::: If capturing parentheses are used in a regular expression, any captured text is included in the array of split strings. However, any array elements that contain captured text are not counted in determining whether the number of matches has reached `count`. For example, splitting the string "apple-apricot-plum-pear-banana" into a maximum of four substrings results in a seven-element array, as the following code shows. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split4.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split4.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Split/split4.vb" id="Snippet4"::: If the regular expression pattern includes multiple sets of capturing parentheses, and a match isn't found within the first set of capturing parentheses, captured text from additional capturing parentheses is included in the returned array. However, elements in the returned array that contain captured text are not counted in determining whether the number of matched substrings equals `count`. For example, in the following code, a regular expression uses two sets of capturing parentheses to extract the elements of a date from a date string. The first set of capturing parentheses captures the hyphen, and the second set captures the forward slash. The call to the method then specifies a maximum of two elements in the returned array. The method returns a three-element string array. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split5.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split5.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Split/split5.vb" id="Snippet5"::: If the regular expression can match the empty string, will split the string into an array of single-character strings because the empty string delimiter can be found at every location. The following example splits the string "characters" into as many elements as there are in the input string. Because the null string matches the beginning of the input string, a null string is inserted at the beginning of the returned array. This causes the tenth element to consist of the two characters at the end of the input string. @@ -6544,24 +6544,24 @@ If the regular expression pattern includes multiple sets of capturing parenthese If multiple matches are adjacent to one another, an empty string is inserted into the array. For example, splitting a string on a single hyphen causes the returned array to include an empty string in the position where two adjacent hyphens are found, as the following code shows. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split8.cs" interactive="try-dotnet" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split8.cs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Split/split8.vb" id="Snippet8"::: If a match is found at the beginning or the end of the input string, an empty string is included at the beginning or the end of the returned array. The following example uses the regular expression pattern `\d+` to split an input string on numeric characters. Because the string begins and ends with matching numeric characters, the value of the first and last element of the returned array is . - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split22.cs" interactive="try-dotnet" id="Snippet22"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split22.cs" id="Snippet22"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Split/split22.vb" id="Snippet22"::: If capturing parentheses are used in a expression, any captured text is included in the resulting string array. For example, if you split the string "plum-pear" on a hyphen placed within capturing parentheses, the returned array includes a string element that contains the hyphen. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split9.cs" interactive="try-dotnet" id="Snippet9"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split9.cs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Split/split9.vb" id="Snippet9"::: If the regular expression pattern includes multiple sets of capturing parentheses, and a match isn't found within the first set of capturing parentheses, captured text from additional capturing parentheses is included in the returned array. If the regular expression can match the empty string, will split the string into an array of single-character strings because the empty string delimiter can be found at every location. For example: - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split13.cs" interactive="try-dotnet" id="Snippet13"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split13.cs" id="Snippet13"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Split/split13.vb" id="Snippet13"::: Note that the returned array also includes an empty string at the beginning and end of the array. @@ -6642,19 +6642,19 @@ For more details about `startat`, see the Remarks section of splits the string into an array of single-character strings because the empty string delimiter can be found at every location. The following example splits the string "characters" into as many elements as the input string contains, starting with the character "a". Because the null string matches the end of the input string, a null string is inserted at the end of the returned array. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split14.cs" interactive="try-dotnet" id="Snippet14"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split14.cs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Split/split14.vb" id="Snippet14"::: The exception is thrown if the execution time of the split operation exceeds the time-out interval specified by the constructor. If you do not set a time-out interval when you call the constructor, the exception is thrown if the operation exceeds any time-out value established for the application domain in which the object is created. If no time-out is defined in the constructor call or in the application domain's properties, or if the time-out value is , no exception is thrown @@ -6741,12 +6741,12 @@ For more details about `startat`, see the Remarks section of . - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split24.cs" interactive="try-dotnet" id="Snippet24"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split24.cs" id="Snippet24"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Split/split24.vb" id="Snippet24"::: If capturing parentheses are used in a expression, any captured text is included in the resulting string array. For example, if you split the string "plum-pear" on a hyphen placed within capturing parentheses, the returned array includes a string element that contains the hyphen. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split9.cs" interactive="try-dotnet" id="Snippet9"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split9.cs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Split/split9.vb" id="Snippet9"::: However, when the regular expression pattern includes multiple sets of capturing parentheses, and a match is not found within the first set of capturing parentheses, captured text from additional capturing parentheses is included in the returned array. @@ -6841,12 +6841,12 @@ For more details about `startat`, see the Remarks section of . - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split23.cs" interactive="try-dotnet" id="Snippet23"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split23.cs" id="Snippet23"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Split/split23.vb" id="Snippet23"::: If capturing parentheses are used in a expression, any captured text is included in the resulting string array. For example, if you split the string "plum-pear" on a hyphen placed within capturing parentheses, the returned array includes a string element that contains the hyphen. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split9.cs" interactive="try-dotnet" id="Snippet9"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/Split/split9.cs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/Split/split9.vb" id="Snippet9"::: However, when the regular expression pattern includes multiple sets of capturing parentheses, and a match is not found within the first set of capturing parentheses, captured text from additional capturing parentheses is included in the returned array. diff --git a/xml/System.Text.RegularExpressions/RegexOptions.xml b/xml/System.Text.RegularExpressions/RegexOptions.xml index d3e37b62f01..1331dc94625 100644 --- a/xml/System.Text.RegularExpressions/RegexOptions.xml +++ b/xml/System.Text.RegularExpressions/RegexOptions.xml @@ -80,7 +80,7 @@ ## Examples The following example defines two regular expressions that identify repeated words in text but that are instantiated using different `RegexOptions` values. The first regular expression is case-insensitive; case is ignored when determining whether a word is identical to the preceding word. The second regular expression is case-sensitive; a word must match the case of the preceding word exactly to be considered a duplicate. - :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/RegexOptions/Overview/RegexOptions.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/RegexOptions/Overview/RegexOptions.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/RegexOptions/Overview/RegexOptions.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Text/ASCIIEncoding.xml b/xml/System.Text/ASCIIEncoding.xml index 69418d89a90..dcba6c17d2d 100644 --- a/xml/System.Text/ASCIIEncoding.xml +++ b/xml/System.Text/ASCIIEncoding.xml @@ -81,7 +81,7 @@ ## Examples The following example demonstrates how to encode Unicode characters into ASCII. Notice the loss of data that occurs when your application uses to encode Unicode characters outside of the ASCII range. - :::code language="csharp" source="~/snippets/csharp/System.Text/ASCIIEncoding/Overview/snippet.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/ASCIIEncoding/Overview/snippet.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/ASCIIEncoding/Overview/snippet.vb" id="Snippet1"::: ]]> @@ -696,7 +696,7 @@ ## Examples The following example demonstrates how to use the method to encode a range of characters from a string and store the encoded characters in a range of elements in a byte array. - :::code language="csharp" source="~/snippets/csharp/System.Text/ASCIIEncoding/GetBytes/getbytes-string-int32-int32-byte[]-int32.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/ASCIIEncoding/GetBytes/getbytes-string-int32-int32-byte[]-int32.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/ASCIIEncoding/GetBytes/getbytes-string-int32-int32-byte[]-int32.vb" id="Snippet1"::: ]]> @@ -802,7 +802,7 @@ ## Examples The following example demonstrates how to use the method to encode a range of elements from a Unicode character array and store the encoded bytes in a range of elements in a byte array. - :::code language="csharp" source="~/snippets/csharp/System.Text/ASCIIEncoding/GetBytes/getbytes-char[]-int32-int32-byte[]-int32.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/ASCIIEncoding/GetBytes/getbytes-char[]-int32-int32-byte[]-int32.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/ASCIIEncoding/GetBytes/getbytes-char[]-int32-int32-byte[]-int32.vb" id="Snippet1"::: ]]> @@ -1708,7 +1708,7 @@ ## Examples The following example demonstrates how to use the method to convert a byte array into a . - :::code language="csharp" source="~/snippets/csharp/System.Text/ASCIIEncoding/GetString/getstring-byte[].cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/ASCIIEncoding/GetString/getstring-byte[].cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/ASCIIEncoding/GetString/getstring-byte[].vb" id="Snippet1"::: ]]> diff --git a/xml/System.Text/Decoder.xml b/xml/System.Text/Decoder.xml index 72314fd3a16..7a057f15a7b 100644 --- a/xml/System.Text/Decoder.xml +++ b/xml/System.Text/Decoder.xml @@ -83,7 +83,7 @@ The method determines how many charac to convert two different byte arrays into a character array. One of the character's bytes spans the arrays. This is similar to what a object does internally when reading a stream. -:::code language="csharp" source="~/snippets/csharp/System.Text/Decoder/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System.Text/Decoder/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/Decoder/Overview/source.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Text/Encoder.xml b/xml/System.Text/Encoder.xml index 9781dc6a92d..ad84565f4fd 100644 --- a/xml/System.Text/Encoder.xml +++ b/xml/System.Text/Encoder.xml @@ -85,7 +85,7 @@ A object maintains state information between successi . Next, the array of characters is encoded using an . -:::code language="csharp" source="~/snippets/csharp/System.Text/Encoder/Overview/snippet.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System.Text/Encoder/Overview/snippet.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/Encoder/Overview/snippet.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Text/Encoding.xml b/xml/System.Text/Encoding.xml index 1d1c7935e07..0576841082f 100644 --- a/xml/System.Text/Encoding.xml +++ b/xml/System.Text/Encoding.xml @@ -91,7 +91,7 @@ The following example converts a string from one encoding to another. > [!NOTE] > The `byte[]` array is the only type in this example that contains the encoded data. The .NET `Char` and `String` types are themselves Unicode, so the call decodes the data back to Unicode. -:::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/Overview/convert.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/Overview/convert.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/Encoding/Overview/convert.vb" id="Snippet1"::: ]]> @@ -352,14 +352,14 @@ The following example converts a string from one encoding to another. The object that is returned by this property might not have the appropriate behavior for your app. It uses replacement fallback to replace each string that it cannot encode and each byte that it cannot decode with a question mark ("?") character. Instead, you can call the method to instantiate an object whose fallback is either an or a , as the following example illustrates. - :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/ASCII/encoding.ascii2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/ASCII/encoding.ascii2.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/Encoding/ASCII/encoding.ascii2.vb" id="Snippet1"::: ## Examples The following example demonstrates the effect of the ASCII encoding on characters that are outside the ASCII range. - :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/ASCII/ascii.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/ASCII/ascii.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/Encoding/ASCII/ascii.vb" id="Snippet1"::: ]]> @@ -420,7 +420,7 @@ The following example demonstrates the effect of the ASCII encoding on character ## Remarks The object that is returned by this property may not have the appropriate behavior for your app. It uses replacement fallback to replace each string that it cannot encode and each byte that it cannot decode with a question mark ("?") character. Instead, you can call the constructor to instantiate a big endian object whose fallback is either an or a , as the following example illustrates. - :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/BigEndianUnicode/bigendianunicode1.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/BigEndianUnicode/bigendianunicode1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/Encoding/BigEndianUnicode/bigendianunicode1.vb" id="Snippet2"::: The returned object has , , and properties, which yield the name "unicodeFFFE". Although the UTF-16 big endian byte order mark is hexadecimal FEFF, the name "unicodeFFFE" was chosen because the byte order mark appears as hexadecimal FFFE on little endian Windows computers. @@ -433,7 +433,7 @@ The following example demonstrates the effect of the ASCII encoding on character The following example determines the number of bytes required to encode a character array, encodes the characters, and displays the resulting bytes. - :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/BigEndianUnicode/getbytes_chararr.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/BigEndianUnicode/getbytes_chararr.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/Encoding/BigEndianUnicode/getbytes_chararr.vb" id="Snippet1"::: ]]> @@ -702,7 +702,7 @@ The following example demonstrates the effect of the ASCII encoding on character ## Examples The following example converts a Unicode-encoded string to an ASCII-encoded string. Because the ASCII encoding object returned by the property uses replacement fallback and the Pi character is not part of the ASCII character set, the Pi character is replaced with a question mark, as the output from the example shows. - :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/Overview/convert.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/Overview/convert.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/Encoding/Overview/convert.vb" id="Snippet1"::: ]]> @@ -1203,7 +1203,7 @@ For more information about this API, see @@ -1292,7 +1292,7 @@ For more information about this API, see @@ -1438,7 +1438,7 @@ For more information about this API, see @@ -1625,7 +1625,7 @@ For more information about this API, see @@ -1715,7 +1715,7 @@ For more information about this API, see @@ -1802,7 +1802,7 @@ For more information about this API, see @@ -1889,7 +1889,7 @@ For more information about this API, see @@ -2049,7 +2049,7 @@ For more information about this API, see @@ -2139,7 +2139,7 @@ For more information about this API, see @@ -2334,7 +2334,7 @@ For more information about this API, see @@ -2447,7 +2447,7 @@ For more information about this API, see @@ -2560,7 +2560,7 @@ For more information about this API, see @@ -2808,12 +2808,12 @@ For more information about this API, see @@ -2921,7 +2921,7 @@ For more information about this API, see @@ -3085,7 +3085,7 @@ For more information about this API, see @@ -3308,12 +3308,12 @@ For more information about this API, see @@ -3573,7 +3573,7 @@ You can also supply a value of 0 for the `codepage` argument. The behavior varie ## Examples The following example gets two instances of the same encoding (one by code page and another by name), and checks their equality. - :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/Equals/equals.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/Equals/equals.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/Encoding/Equals/equals.vb" id="Snippet1"::: ]]> @@ -3664,7 +3664,7 @@ In .NET 5 and later versions, the code page name `utf-7` is not supported. ## Examples The following example gets two instances of the same encoding (one by code page and another by name), and checks their equality. - :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/Equals/equals.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/Equals/equals.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/Encoding/Equals/equals.vb" id="Snippet1"::: ]]> @@ -3777,7 +3777,7 @@ You can also supply a value of 0 for the `codepage` argument. The behavior varie ## Examples The following example demonstrates the method. - :::code language="csharp" source="~/snippets/csharp/System.Text/EncoderReplacementFallback/Overview/fallEncRpl.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/EncoderReplacementFallback/Overview/fallEncRpl.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/EncoderReplacementFallback/Overview/fallEncRpl.vb" id="Snippet1"::: ]]> @@ -3869,7 +3869,7 @@ In .NET 5 and later versions, the code page name `utf-7` is not supported. ## Examples The following example demonstrates the method. - :::code language="csharp" source="~/snippets/csharp/System.Text/EncoderReplacementFallback/Overview/fallEncRpl.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/EncoderReplacementFallback/Overview/fallEncRpl.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/EncoderReplacementFallback/Overview/fallEncRpl.vb" id="Snippet1"::: ]]> @@ -4077,7 +4077,7 @@ In .NET 5 and later versions, the code page name `utf-7` is not supported. ## Examples The following example determines the number of bytes required to encode a character array, encodes the characters, and displays the resulting bytes. - :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/BigEndianUnicode/getbytes_chararr.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/BigEndianUnicode/getbytes_chararr.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/Encoding/BigEndianUnicode/getbytes_chararr.vb" id="Snippet1"::: ]]> @@ -4166,7 +4166,7 @@ In .NET 5 and later versions, the code page name `utf-7` is not supported. ## Examples The following example encodes a string into an array of bytes, and then decodes the bytes into an array of characters. - :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/GetCharCount/getchars.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/GetCharCount/getchars.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/Encoding/GetCharCount/getchars.vb" id="Snippet1"::: ]]> @@ -4267,7 +4267,7 @@ In .NET 5 and later versions, the code page name `utf-7` is not supported. ## Examples The following example determines the byte order of the encoding based on the preamble. - :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/GetPreamble/preamble.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/GetPreamble/preamble.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/Encoding/GetPreamble/preamble.vb" id="Snippet1"::: ]]> @@ -5487,13 +5487,13 @@ Starting with .NET Framework 4.6, .NET Framework includes one encoding provider, The object that is returned by this property may not have the appropriate behavior for your app. It uses replacement fallback to replace each string that it cannot encode and each byte that it cannot decode with a question mark ("?") character. Instead, you can call the constructor to instantiate a little endian object whose fallback is either an or a , as the following example illustrates. - :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/Unicode/unicode1.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/Unicode/unicode1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/Encoding/Unicode/unicode1.vb" id="Snippet2"::: ## Examples The following example determines the number of bytes required to encode a character array, encodes the characters, and displays the resulting bytes. - :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/BigEndianUnicode/getbytes_chararr.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/BigEndianUnicode/getbytes_chararr.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/Encoding/BigEndianUnicode/getbytes_chararr.vb" id="Snippet1"::: ]]> @@ -5551,7 +5551,7 @@ Starting with .NET Framework 4.6, .NET Framework includes one encoding provider, ## Remarks The object that is returned by this property may not have the appropriate behavior for your app. It uses replacement fallback to replace each string that it cannot encode and each byte that it cannot decode with the Unicode REPLACEMENT CHARACTER (U+FFFE). Instead, you can call the constructor to instantiate a object whose fallback is either an or a , as the following example illustrates. - :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/UTF32/encoding.utf32.1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/UTF32/encoding.utf32.1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/Encoding/UTF32/encoding.utf32.1.vb" id="Snippet1"::: For a discussion of little endian byte order, see . @@ -5561,7 +5561,7 @@ Starting with .NET Framework 4.6, .NET Framework includes one encoding provider, ## Examples The following example determines the number of bytes required to encode a character array, encodes the characters, and displays the resulting bytes. - :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/BigEndianUnicode/getbytes_chararr.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/BigEndianUnicode/getbytes_chararr.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/Encoding/BigEndianUnicode/getbytes_chararr.vb" id="Snippet1"::: ]]> @@ -5630,7 +5630,7 @@ Starting with .NET Framework 4.6, .NET Framework includes one encoding provider, ## Examples The following example determines the number of bytes required to encode a character array, encodes the characters, and displays the resulting bytes. - :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/BigEndianUnicode/getbytes_chararr.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/BigEndianUnicode/getbytes_chararr.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/Encoding/BigEndianUnicode/getbytes_chararr.vb" id="Snippet1"::: ]]> @@ -5701,7 +5701,7 @@ Starting with .NET Framework 4.6, .NET Framework includes one encoding provider, - It returns a object that uses replacement fallback to replace each string that it can't encode and each byte that it can't decode with a question mark ("?") character. Instead, you can call the constructor to instantiate a object whose fallback is either an or a , as the following example illustrates. - :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/UTF8/encoding.utf8.1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/UTF8/encoding.utf8.1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/Encoding/UTF8/encoding.utf8.1.vb" id="Snippet1"::: ## Examples @@ -5721,7 +5721,7 @@ Starting with .NET Framework 4.6, .NET Framework includes one encoding provider, It displays the UTF-16 code units of each character and determines the number of bytes required by a UTF-8 encoder to encode the character array. It then encodes the characters and displays the resulting UTF-8-encoded bytes. - :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/UTF8/example1.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/Encoding/UTF8/example1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/Encoding/UTF8/example1.vb" id="Snippet2"::: ]]> diff --git a/xml/System.Text/StringBuilder.xml b/xml/System.Text/StringBuilder.xml index 2b177a66915..da1c9cfbab5 100644 --- a/xml/System.Text/StringBuilder.xml +++ b/xml/System.Text/StringBuilder.xml @@ -78,7 +78,7 @@ class. -:::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Overview/StringBuilder.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Overview/StringBuilder.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Text/StringBuilder/Overview/StringBuilder.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/StringBuilder/Overview/StringBuilder.vb" id="Snippet1"::: ]]> @@ -1258,7 +1258,7 @@ The following example shows how to call many of the methods defined by the method modifies the existing instance of this class; it does not return a new class instance. Because of this, you can call a method or property on the existing reference and you do not have to assign the return value to a object, as the following example illustrates. It defines a `Dog` class, creates a `Dog` object, and makes three calls to the method to create a string that contains the dog's name and breed. - :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Append/append4.cs" interactive="try-dotnet" id="Snippet18"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Append/append4.cs" id="Snippet18"::: :::code language="fsharp" source="~/snippets/fsharp/System.Text/StringBuilder/Append/append4.fs" id="Snippet18"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/StringBuilder/Append/append4.vb" id="Snippet18"::: @@ -2489,7 +2489,7 @@ The following example shows how to call many of the methods defined by the method. - :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/AppendFormat/appfmt.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/AppendFormat/appfmt.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Text/StringBuilder/AppendFormat/appfmt.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/StringBuilder/AppendFormat/appfmt.vb" id="Snippet1"::: @@ -2617,7 +2617,7 @@ The following example shows how to call many of the methods defined by the method. - :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/AppendFormat/appfmt.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/AppendFormat/appfmt.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Text/StringBuilder/AppendFormat/appfmt.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/StringBuilder/AppendFormat/appfmt.vb" id="Snippet1"::: @@ -2974,13 +2974,13 @@ The index of a format item is less than 0 (zero), or greater than or equal to th ## Examples The following example demonstrates the method. - :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/AppendFormat/appfmt.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/AppendFormat/appfmt.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Text/StringBuilder/AppendFormat/appfmt.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/StringBuilder/AppendFormat/appfmt.vb" id="Snippet1"::: The following example defines a custom implementation named `CustomerFormatter` that formats a 10-digit customer number with hyphens after the fourth and seventh digits. It is passed to the method to create a string that includes the formatted customer number and customer name. - :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/AppendFormat/customernumberformatter1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/AppendFormat/customernumberformatter1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Text/StringBuilder/AppendFormat/customernumberformatter1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/StringBuilder/AppendFormat/customernumberformatter1.vb" id="Snippet1"::: @@ -3310,7 +3310,7 @@ The index of a format item is less than 0 (zero), or greater than or equal to th ## Examples The following example demonstrates the method. - :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/AppendFormat/appfmt.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/AppendFormat/appfmt.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Text/StringBuilder/AppendFormat/appfmt.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/StringBuilder/AppendFormat/appfmt.vb" id="Snippet1"::: @@ -3441,7 +3441,7 @@ The index of a format item is less than 0 (zero), or greater than or equal to th ## Examples The following example uses the method to display time and temperature data stored in a generic object. Note that the format string has three format items, although there are only to objects to format. This is because the first object in the list (a date and time value) is used by two format items: The first format item displays the time, and the second displays the date. - :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/AppendFormat/appendformat2.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/AppendFormat/appendformat2.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System.Text/StringBuilder/AppendFormat/appendformat2.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/StringBuilder/AppendFormat/appendformat2.vb" id="Snippet3"::: @@ -3565,7 +3565,7 @@ The index of a format item is less than 0 (zero), or greater than or equal to th ## Examples The following example demonstrates the method. - :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/AppendFormat/appfmt.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/AppendFormat/appfmt.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Text/StringBuilder/AppendFormat/appfmt.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/StringBuilder/AppendFormat/appfmt.vb" id="Snippet1"::: @@ -3698,7 +3698,7 @@ The index of a format item is less than 0 (zero), or greater than or equal to th ## Examples The following example uses the method to illustrate the result of a Boolean `And` operation with integer values. Note that the format string includes six format items, but the method has only three items in its argument list, because each item is formatted in two different ways. - :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/AppendFormat/appendformat3.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/AppendFormat/appendformat3.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System.Text/StringBuilder/AppendFormat/appendformat3.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/StringBuilder/AppendFormat/appendformat3.vb" id="Snippet4"::: @@ -4566,7 +4566,7 @@ The index of a format item is less than 0 (zero), or greater than or equal to th ## Examples The following example demonstrates the method. - :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/AppendLine/al.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/AppendLine/al.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Text/StringBuilder/AppendLine/al.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/StringBuilder/AppendLine/al.vb" id="Snippet1"::: @@ -4809,7 +4809,7 @@ The index of a format item is less than 0 (zero), or greater than or equal to th ## Examples The following example demonstrates the property. - :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Capacity/cap.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Capacity/cap.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Text/StringBuilder/Capacity/cap.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/StringBuilder/Capacity/cap.vb" id="Snippet1"::: @@ -4874,7 +4874,7 @@ The `index` parameter is the position of a character within the is the default property of the class. In C#, it is an indexer. This means that individual characters can be retrieved from the property as shown in the following example, which counts the number of alphabetic, white-space, and punctuation characters in a string. -:::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Chars/chars1.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Chars/chars1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Text/StringBuilder/Chars/chars1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/StringBuilder/Chars/chars1.vb" id="Snippet1"::: @@ -4940,7 +4940,7 @@ The `index` parameter is the position of a character within the object with a string, calls the method, and then appends a new string. -:::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Clear/clear1.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Clear/clear1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Text/StringBuilder/Clear/clear1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/StringBuilder/Clear/clear1.vb" id="Snippet1"::: @@ -5072,7 +5072,7 @@ The following example instantiates a object wit ## Examples The following example demonstrates the method. - :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/CopyTo/ct2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/CopyTo/ct2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Text/StringBuilder/CopyTo/ct2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/StringBuilder/CopyTo/ct2.vb" id="Snippet1"::: @@ -5151,7 +5151,7 @@ The following example instantiates a object wit ## Examples The following example demonstrates the method. - :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Capacity/cap.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Capacity/cap.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Text/StringBuilder/Capacity/cap.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/StringBuilder/Capacity/cap.vb" id="Snippet1"::: @@ -5280,7 +5280,7 @@ The `Equals` method performs an ordinal comparison to determine whether the char ## Examples The following code uses the method to check whether two objects are equal. The method is called repeatedly after small changes are made to each object, and the results are displayed to the console. - :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Capacity/cap.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Capacity/cap.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Text/StringBuilder/Capacity/cap.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/StringBuilder/Capacity/cap.vb" id="Snippet1"::: @@ -5371,7 +5371,7 @@ foreach (ReadOnlyMemory chunk in sb.GetChunks()) ## Examples The following example demonstrates the method. - :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Insert/insert.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Insert/insert.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Text/StringBuilder/Insert/insert.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/StringBuilder/Insert/insert.vb" id="Snippet1"::: @@ -6785,7 +6785,7 @@ The existing characters are shifted to make room for the character sequence in t ## Examples The following example demonstrates the property. - :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Capacity/cap.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Capacity/cap.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Text/StringBuilder/Capacity/cap.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/StringBuilder/Capacity/cap.vb" id="Snippet1"::: @@ -6916,7 +6916,7 @@ In .NET Core and in the .NET Framework 4.0 and later versions, when you instanti ## Examples The following example demonstrates the method. - :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Remove/remove.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Remove/remove.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Text/StringBuilder/Remove/remove.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/StringBuilder/Remove/remove.vb" id="Snippet1"::: @@ -6943,7 +6943,7 @@ In .NET Core and in the .NET Framework 4.0 and later versions, when you instanti ## Examples The following example demonstrates the method. - :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Replace/replace.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/StringBuilder/Replace/replace.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System.Text/StringBuilder/Replace/replace.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/StringBuilder/Replace/replace.vb" id="Snippet1"::: diff --git a/xml/System.Text/UTF32Encoding.xml b/xml/System.Text/UTF32Encoding.xml index 1e0192154ee..610f681b26e 100644 --- a/xml/System.Text/UTF32Encoding.xml +++ b/xml/System.Text/UTF32Encoding.xml @@ -105,12 +105,12 @@ ## Examples The following example demonstrates the behavior of objects with and without error detection enabled. It creates a byte array whose last four bytes represent an invalid surrogate pair; the high surrogate U+D8FF is followed by an U+01FF, which is outside the range of low surrogates (0xDC00 through 0xDFFF). Without error detection, the UTF32 decoder uses replacement fallback to replace the invalid surrogate pair with REPLACEMENT CHARACTER (U+FFFD). - :::code language="csharp" source="~/snippets/csharp/System.Text/UTF32Encoding/Overview/errordetection.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UTF32Encoding/Overview/errordetection.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UTF32Encoding/Overview/ErrorDetection.vb" id="Snippet1"::: The following example encodes a string of Unicode characters into a byte array by using a object. The byte array is then decoded into a string to demonstrate that there is no loss of data. - :::code language="csharp" source="~/snippets/csharp/System.Text/UTF32Encoding/Overview/snippet.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UTF32Encoding/Overview/snippet.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UTF32Encoding/Overview/snippet.vb" id="Snippet1"::: The following example uses the same string as the previous one, except that it writes the encoded bytes to a file and prefixes the byte stream with a byte order mark (BOM). It then reads the file in two different ways: as a text file by using a object; and as a binary file. As you would expect, neither newly-read string includes the BOM. diff --git a/xml/System.Text/UTF7Encoding.xml b/xml/System.Text/UTF7Encoding.xml index 347fd50cedf..ec6d731bf1b 100644 --- a/xml/System.Text/UTF7Encoding.xml +++ b/xml/System.Text/UTF7Encoding.xml @@ -86,7 +86,7 @@ ## Examples The following code example demonstrates how to use a to encode a string of Unicode characters and store them in a byte array. Notice that when the byte array is decoded back to a string, no data is lost. - :::code language="csharp" source="~/snippets/csharp/System.Text/UTF7Encoding/Overview/snippet.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UTF7Encoding/Overview/snippet.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UTF7Encoding/Overview/snippet.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Text/UTF8Encoding.xml b/xml/System.Text/UTF8Encoding.xml index 1f87cf5444a..168b091da2b 100644 --- a/xml/System.Text/UTF8Encoding.xml +++ b/xml/System.Text/UTF8Encoding.xml @@ -95,12 +95,12 @@ ## Examples The following example uses a object to encode a string of Unicode characters and store them in a byte array. The Unicode string includes two characters, Pi (U+03A0) and Sigma (U+03A3), that are outside the ASCII character range. When the encoded byte array is decoded back to a string, the Pi and Sigma characters are still present. - :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/Overview/snippet.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/Overview/snippet.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UTF8Encoding/Overview/snippet.vb" id="Snippet1"::: The following example uses the same string as the previous example, except that it writes the encoded bytes to a file and prefixes the byte stream with a byte order mark (BOM). It then reads the file in two different ways: as a text file by using a object; and as a binary file. As you would expect, neither newly-read string includes the BOM. - :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/Overview/bom1.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/Overview/bom1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UTF8Encoding/Overview/bom1.vb" id="Snippet2"::: ]]> @@ -171,7 +171,7 @@ ## Examples The following example creates a new instance and displays its name. - :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/.ctor/ctor.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/.ctor/ctor.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UTF8Encoding/.ctor/ctor.vb" id="Snippet1"::: ]]> @@ -236,7 +236,7 @@ ## Examples The following example creates a new instance and specifies that a Unicode byte order mark prefix should be emitted by the method. The method then returns the Unicode byte order mark prefix. - :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/.ctor/ctor-boolean.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/.ctor/ctor-boolean.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UTF8Encoding/.ctor/ctor-boolean.vb" id="Snippet1"::: ]]> @@ -304,7 +304,7 @@ ## Examples The following example creates a new instance, specifying that the method should not emit a Unicode byte order mark prefix, and an exception should be thrown when an invalid encoding is detected. The behavior of this constructor is compared to the default constructor, which does not throw an exception when an invalid encoding is detected. The two instances encode a character array that contains two high surrogates (U+D801 and U+D802) in a row, which is an invalid character sequence; a high surrogate should always be followed by a low surrogate. - :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/.ctor/ctor-boolean-boolean.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/.ctor/ctor-boolean-boolean.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UTF8Encoding/.ctor/ctor-boolean-boolean.vb" id="Snippet1"::: ]]> @@ -382,7 +382,7 @@ ## Examples The following example uses the method to test whether the current object is equal to a different object. Four objects are created and compared and the results of the comparisons are displayed. - :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/Equals/equals-object.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/Equals/equals-object.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UTF8Encoding/Equals/equals-object.vb" id="Snippet1"::: ]]> @@ -522,7 +522,7 @@ ## Examples The following example calls the and methods to calculate the maximum and actual number of bytes required to encode a string. It also displays the actual number of bytes required to store a byte stream with a byte order mark. - :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetByteCount/getbytecount1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetByteCount/getbytecount1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UTF8Encoding/GetByteCount/getbytecount1.vb" id="Snippet1"::: ]]> @@ -698,7 +698,7 @@ ## Examples The following example populates an array with a Latin uppercase and lowercase characters and calls the method to determine the number of bytes needed to encode the Latin lowercase characters. It then displays this information along with the total number of bytes needed if a byte order mark is added. It compares this number with the value returned by the method, which indicates maximum number of bytes needed to encode the Latin lowercase characters. - :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetByteCount/getbytecount2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetByteCount/getbytecount2.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UTF8Encoding/GetByteCount/getbytecount2.vb" id="Snippet2"::: ]]> @@ -993,7 +993,7 @@ ## Examples The following example uses the method to encode a range of characters from a string and stores the encoded bytes in a range of elements in a byte array. - :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetBytes/getbytes-string-int32-int32-byte[]-int32.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetBytes/getbytes-string-int32-int32-byte[]-int32.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UTF8Encoding/GetBytes/getbytes-string-int32-int32-byte[]-int32.vb" id="Snippet1"::: ]]> @@ -1104,7 +1104,7 @@ ## Examples The following example uses the method to encode a range of elements from a Unicode character array and store the encoded bytes in a range of elements in a byte array. - :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetBytes/getbytes-char[]-int32-int32-byte[]-int32.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetBytes/getbytes-char[]-int32-int32-byte[]-int32.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UTF8Encoding/GetBytes/getbytes-char[]-int32-int32-byte[]-int32.vb" id="Snippet1"::: ]]> @@ -1350,7 +1350,7 @@ ## Examples The following example uses the method to return the number of characters produced by decoding a range of elements in a byte array. - :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetCharCount/getcharcount-byte[]-int32-int32.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetCharCount/getcharcount-byte[]-int32-int32.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UTF8Encoding/GetCharCount/getcharcount-byte[]-int32-int32.vb" id="Snippet1"::: ]]> @@ -1615,7 +1615,7 @@ ## Examples The following example uses the method to decode a range of elements in a byte array and store the result in a character array. - :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetChars/getchars-byte[]-int32-int32-char[]-int32.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetChars/getchars-byte[]-int32-int32-char[]-int32.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UTF8Encoding/GetChars/getchars-byte[]-int32-int32-char[]-int32.vb" id="Snippet1"::: ]]> @@ -1706,7 +1706,7 @@ ## Examples The following example uses the method to obtain a UTF-8 decoder. The decoder converts a sequence of bytes into a sequence of characters. - :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetDecoder/getdecoder-.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetDecoder/getdecoder-.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UTF8Encoding/GetDecoder/getdecoder-.vb" id="Snippet1"::: ]]> @@ -1773,7 +1773,7 @@ ## Examples The following example uses the method to obtain an encoder to convert a sequence of characters into a UTF-8 encoded sequence of bytes. - :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetEncoder/getencoder-.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetEncoder/getencoder-.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UTF8Encoding/GetEncoder/getencoder-.vb" id="Snippet1"::: ]]> @@ -1904,7 +1904,7 @@ ## Examples The following example uses the method to return the maximum number of bytes required to encode a specified number of characters. - :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetMaxByteCount/getmaxbytecount-int32.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetMaxByteCount/getmaxbytecount-int32.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UTF8Encoding/GetMaxByteCount/getmaxbytecount-int32.vb" id="Snippet1"::: ]]> @@ -1989,7 +1989,7 @@ ## Examples The following example uses the method to return the maximum number of characters produced by decoding a specified number of bytes. - :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetMaxCharCount/getmaxcharcount-int32.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetMaxCharCount/getmaxcharcount-int32.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UTF8Encoding/GetMaxCharCount/getmaxcharcount-int32.vb" id="Snippet1"::: ]]> @@ -2080,12 +2080,12 @@ ## Examples The following example uses the method to return the Unicode byte order mark encoded in UTF-8 format. Notice that the parameterless constructor for does not provide a preamble. - :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetPreamble/getpreamble-.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetPreamble/getpreamble-.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UTF8Encoding/GetPreamble/getpreamble-.vb" id="Snippet1"::: The following example instantiates two objects, the first by calling the parameterless constructor, which does not provide a BOM, and the second by calling the constructor with its `encoderShouldEmitUTF8Identifier` argument set to `true`. It then calls the method to write the BOM to a file before writing a UF8-encoded string. As the console output from the example shows, the file that saves the bytes from the second encoder has three more bytes than the first. - :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetPreamble/getpreamble1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UTF8Encoding/GetPreamble/getpreamble1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UTF8Encoding/GetPreamble/getpreamble1.vb" id="Snippet1"::: You can also compare the files by using the `fc` command in a console window, or you can inspect the files in a text editor that includes a Hex View mode. Note that when the file is opened in an editor that supports UTF-8, the BOM is not displayed. diff --git a/xml/System.Text/UnicodeEncoding.xml b/xml/System.Text/UnicodeEncoding.xml index 39d51d49e6f..85dbd6e83e6 100644 --- a/xml/System.Text/UnicodeEncoding.xml +++ b/xml/System.Text/UnicodeEncoding.xml @@ -113,12 +113,12 @@ ## Examples The following example demonstrates how to encode a string of Unicode characters into a byte array by using a object. The byte array is decoded into a string to demonstrate that there is no loss of data. - :::code language="csharp" source="~/snippets/csharp/System.Text/UnicodeEncoding/Overview/snippet.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UnicodeEncoding/Overview/snippet.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UnicodeEncoding/Overview/snippet.vb" id="Snippet1"::: The following example uses the same string as the previous one, except that it writes the encoded bytes to a file and prefixes the byte stream with a byte order mark (BOM). It then reads the file in two different ways: as a text file by using a object; and as a binary file. As you would expect, neither newly-read string includes the BOM. - :::code language="csharp" source="~/snippets/csharp/System.Text/UnicodeEncoding/Overview/bom1.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UnicodeEncoding/Overview/bom1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UnicodeEncoding/Overview/bom1.vb" id="Snippet2"::: ]]> @@ -194,7 +194,7 @@ ## Examples The following example demonstrates how to create a new instance and display the name of the encoding. - :::code language="csharp" source="~/snippets/csharp/System.Text/UnicodeEncoding/.ctor/ctor.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UnicodeEncoding/.ctor/ctor.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UnicodeEncoding/.ctor/ctor.vb" id="Snippet1"::: ]]> @@ -261,7 +261,7 @@ ## Examples The following example demonstrates how to create a new instance specifying whether to support little endian or big endian byte ordering and the Unicode byte order mark. - :::code language="csharp" source="~/snippets/csharp/System.Text/UnicodeEncoding/.ctor/ctor-boolean-boolean.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UnicodeEncoding/.ctor/ctor-boolean-boolean.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UnicodeEncoding/.ctor/ctor-boolean-boolean.vb" id="Snippet1"::: ]]> @@ -329,7 +329,7 @@ ## Examples The following example demonstrates the behavior of , both with error detection enabled and without. - :::code language="csharp" source="~/snippets/csharp/System.Text/UnicodeEncoding/.ctor/errordetection.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UnicodeEncoding/.ctor/errordetection.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UnicodeEncoding/.ctor/errordetection.vb" id="Snippet1"::: ]]> @@ -970,7 +970,7 @@ ## Examples The following example demonstrates how to use the method to encode a range of characters from a and store the encoded bytes in a range of elements in a byte array. - :::code language="csharp" source="~/snippets/csharp/System.Text/UnicodeEncoding/GetBytes/getbytes-string-int32-int32-byte[]-int32.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UnicodeEncoding/GetBytes/getbytes-string-int32-int32-byte[]-int32.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UnicodeEncoding/GetBytes/getbytes-string-int32-int32-byte[]-int32.vb" id="Snippet1"::: ]]> @@ -1080,7 +1080,7 @@ ## Examples The following example demonstrates how to encode a range of elements from a Unicode character array and store the encoded bytes in a range of elements in a byte array. - :::code language="csharp" source="~/snippets/csharp/System.Text/UnicodeEncoding/GetBytes/getbytes-char[]-int32-int32-byte[]-int32.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Text/UnicodeEncoding/GetBytes/getbytes-char[]-int32-int32-byte[]-int32.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Text/UnicodeEncoding/GetBytes/getbytes-char[]-int32-int32-byte[]-int32.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Web/HttpUtility.xml b/xml/System.Web/HttpUtility.xml index 4b073611681..3d35e476911 100644 --- a/xml/System.Web/HttpUtility.xml +++ b/xml/System.Web/HttpUtility.xml @@ -845,7 +845,7 @@ ## Examples The following code example demonstrates how to use the method. Multiple occurrences of the same query string variable are consolidated in one entry of the returned . - :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/HttpUtility_ParseQueryString/cs/httputility_parsequerystring.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/HttpUtility_ParseQueryString/cs/httputility_parsequerystring.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/HttpUtility_ParseQueryString/vb/httputility_parsequerystring.vb" id="Snippet1"::: ]]> diff --git a/xml/System/Action`1.xml b/xml/System/Action`1.xml index 57b782357b3..a2ce46de20e 100644 --- a/xml/System/Action`1.xml +++ b/xml/System/Action`1.xml @@ -109,7 +109,7 @@ ## Examples The following example demonstrates the use of the delegate to print the contents of a object. In this example, the `Print` method is used to display the contents of the list to the console. In addition, the C# example also demonstrates the use of anonymous methods to display the contents to the console. Note that the example does not explicitly declare an variable. Instead, it passes a reference to a method that takes a single parameter and that does not return a value to the method, whose single parameter is an delegate. Similarly, in the C# example, an delegate is not explicitly instantiated because the signature of the anonymous method matches the signature of the delegate that is expected by the method. - :::code language="csharp" source="~/snippets/csharp/System/ActionT/Overview/action.cs" interactive="try-dotnet-method" id="Snippet01"::: + :::code language="csharp" source="~/snippets/csharp/System/ActionT/Overview/action.cs" id="Snippet01"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action_PrintExample/fs/action.fs" id="Snippet01"::: :::code language="vb" source="~/snippets/visualbasic/System/ActionT/Overview/action.vb" id="Snippet01"::: diff --git a/xml/System/Action`2.xml b/xml/System/Action`2.xml index 1e05e6b7d3a..a8c2b4d748a 100644 --- a/xml/System/Action`2.xml +++ b/xml/System/Action`2.xml @@ -107,23 +107,23 @@ When you use the delegate, you do not have to explicitly define a delegate that encapsulates a method with two parameters. For example, the following code explicitly declares a delegate named `ConcatStrings`. It then assigns a reference to either of two methods to its delegate instance. One method writes two strings to the console; the second writes two strings to a file. - :::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2/Overview/Delegate.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2/Overview/Delegate.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~2/fs/Delegate.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/ActionT1,T2/Overview/Delegate.vb" id="Snippet1"::: The following example simplifies this code by instantiating the delegate instead of explicitly defining a new delegate and assigning a named method to it. - :::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2/Overview/Action2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2/Overview/Action2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~2/fs/Action2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/ActionT1,T2/Overview/action2.vb" id="Snippet2"::: You can also use the 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).) - :::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2/Overview/Anon.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2/Overview/Anon.cs" id="Snippet3"::: You can also assign a lambda expression to an delegate instance, as the following example illustrates. (For an introduction to lambda expressions, see [Lambda Expressions (C#)](/dotnet/csharp/programming-guide/statements-expressions-operators/lambda-expressions), or [Lambda Expressions (F#)](/dotnet/fsharp/language-reference/functions/lambda-expressions-the-fun-keyword).) - :::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2/Overview/Lambda.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2/Overview/Lambda.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~2/fs/Lambda.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/ActionT1,T2/Overview/lambda.vb" id="Snippet4"::: diff --git a/xml/System/Action`3.xml b/xml/System/Action`3.xml index 45970bf080c..881beb5a966 100644 --- a/xml/System/Action`3.xml +++ b/xml/System/Action`3.xml @@ -121,23 +121,23 @@ When you use the delegate, you don't have to explicitly define a delegate that encapsulates a method with three parameters. For example, the following code explicitly declares a delegate named `StringCopy` and assigns a reference to the `CopyStrings` method to its delegate instance. - :::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3/Overview/Delegate.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3/Overview/Delegate.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~3/fs/Delegate.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/ActionT1,T2,T3/Overview/Delegate.vb" id="Snippet1"::: The following example simplifies this code by instantiating the delegate instead of explicitly defining a new delegate and assigning a named method to it. - :::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3/Overview/Action3.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3/Overview/Action3.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~3/fs/Action3.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/ActionT1,T2,T3/Overview/Action3.vb" id="Snippet2"::: You can also use the 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).) - :::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3/Overview/Anon.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3/Overview/Anon.cs" id="Snippet3"::: You can also assign a lambda expression to an delegate instance, as the following example illustrates. (For an introduction to lambda expressions, see [Lambda Expressions (C#)](/dotnet/csharp/programming-guide/statements-expressions-operators/lambda-expressions) or [Lambda Expressions (F#)](/dotnet/fsharp/language-reference/functions/lambda-expressions-the-fun-keyword).) - :::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3/Overview/Lambda.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3/Overview/Lambda.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~3/fs/Lambda.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/ActionT1,T2,T3/Overview/lambda.vb" id="Snippet4"::: diff --git a/xml/System/Activator.xml b/xml/System/Activator.xml index aec33d80b3d..f241e33e28c 100644 --- a/xml/System/Activator.xml +++ b/xml/System/Activator.xml @@ -408,7 +408,7 @@ ## Examples The following code example demonstrates how to call the method. Instances of several different types are created and their default values are displayed. - :::code language="csharp" source="~/snippets/csharp/System/Activator/Overview/source2.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Activator/Overview/source2.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/ActivatorX/fs/source2.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Activator/Overview/source2.vb" id="Snippet4"::: @@ -815,13 +815,13 @@ Note: In .NET for Win ## Examples The following example calls the method to create a object. It calls the constructor to instantiate a string that contains ten elements from a character array starting at the fourteenth position. - :::code language="csharp" source="~/snippets/csharp/System/Activator/CreateInstance/CreateInstance5.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Activator/CreateInstance/CreateInstance5.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.activator.createinstance/fs/CreateInstance5.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Activator/CreateInstance/CreateInstance5.vb" id="Snippet5"::: The following example creates a jagged array whose elements are arguments to be passed to a constructor. The example then passes each array to the method to invoke the appropriate string constructor. - :::code language="csharp" source="~/snippets/csharp/System/Activator/CreateInstance/createinstance2.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Activator/CreateInstance/createinstance2.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.activator.createinstance/fs/createinstance2.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Activator/CreateInstance/createinstance2.vb" id="Snippet4"::: diff --git a/xml/System/AppDomain.xml b/xml/System/AppDomain.xml index 79713bf9294..d4dedb92d8e 100644 --- a/xml/System/AppDomain.xml +++ b/xml/System/AppDomain.xml @@ -7839,7 +7839,7 @@ The friendly name of the default application domain is the file name of the proc The following example demonstrates how to use the method to create a new value pair. The example then uses the method to retrieve the value, and displays it to the console. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ADGetData/CPP/adgetdata.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/AppDomain/GetData/adgetdata.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/AppDomain/GetData/adgetdata.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/AppDomain/GetData/adgetdata.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/AppDomain/GetData/adgetdata.vb" id="Snippet1"::: diff --git a/xml/System/ArgumentException.xml b/xml/System/ArgumentException.xml index a5e22114fd3..b40cb409a0d 100644 --- a/xml/System/ArgumentException.xml +++ b/xml/System/ArgumentException.xml @@ -101,7 +101,7 @@ In F#, you can use the [invalidArg](/dotnet/fsharp/language-reference/exception- The following example demonstrates how to throw and catch an . It uses the [ArgumentException.GetType().Name](xref:System.Type.Name%2A) property to display the name of the exception object, and also uses the property to display the text of the exception message. - :::code language="csharp" source="~/snippets/csharp/System/ArgumentException/Overview/argumentexception2.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/ArgumentException/Overview/argumentexception2.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/ArgumentException/FS/argumentexception2.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/ArgumentException/Overview/program2.vb" id="Snippet3"::: diff --git a/xml/System/ArgumentOutOfRangeException.xml b/xml/System/ArgumentOutOfRangeException.xml index 0d66777f33b..c16e1ff7da8 100644 --- a/xml/System/ArgumentOutOfRangeException.xml +++ b/xml/System/ArgumentOutOfRangeException.xml @@ -94,7 +94,7 @@ The conditions in which an exception i 1. The collection has no members, and your code assumes that it does. The following example attempts to retrieve the first element of a collection that has no elements: - :::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/NoElements.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/NoElements.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/System.ArgumentOutOfRangeException/fs/NoElements.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/ArgumentOutOfRangeException/Overview/NoElements.vb" id="Snippet4"::: @@ -118,7 +118,7 @@ The conditions in which an exception i 3. You're attempting to retrieve an item whose index is negative. This usually occurs because you've searched a collection for the index of a particular element and have erroneously assumed that the search is successful. In the following example, the call to the method fails to find a string equal to "Z" and so returns -1. However, this is an invalid index value. - :::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/BadSearch.cs" interactive="try-dotnet" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/BadSearch.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/System.ArgumentOutOfRangeException/fs/BadSearch.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/ArgumentOutOfRangeException/Overview/BadSearch.vb" id="Snippet6"::: @@ -130,7 +130,7 @@ The conditions in which an exception i 4. You're attempting to retrieve an element whose index is equal to the value of the collection's `Count` property, as the following example illustrates. - :::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/OOR2.cs" interactive="try-dotnet" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/OOR2.cs" id="Snippet8"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/System.ArgumentOutOfRangeException/fs/OOR2.fs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System/ArgumentOutOfRangeException/Overview/OOR2.vb" id="Snippet8"::: @@ -168,7 +168,7 @@ The conditions in which an exception i To eliminate the exception, validate the value returned by the string search method before calling the string manipulation method. - :::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/NoFind2.cs" interactive="try-dotnet" id="Snippet18"::: + :::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/NoFind2.cs" id="Snippet18"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/System.ArgumentOutOfRangeException/fs/NoFind2.fs" id="Snippet18"::: :::code language="vb" source="~/snippets/visualbasic/System/ArgumentOutOfRangeException/Overview/NoFind2.vb" id="Snippet18"::: @@ -192,7 +192,7 @@ The conditions in which an exception i The following example defines a `FindWords` method that uses the method to identify space characters and punctuation marks in a string and returns an array that contains the words found in the string. - :::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/FindWords1.cs" interactive="try-dotnet" id="Snippet19"::: + :::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/FindWords1.cs" id="Snippet19"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/System.ArgumentOutOfRangeException/fs/FindWords1.fs" id="Snippet19"::: :::code language="vb" source="~/snippets/visualbasic/System/ArgumentOutOfRangeException/Overview/FindWords1.vb" id="Snippet19"::: @@ -250,7 +250,7 @@ For a list of initial property values for an instance of exception is thrown. - :::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/program.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/program.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/ArgumentOutOfRangeException/FS/program.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/ArgumentOutOfRangeException/Overview/program.vb" id="Snippet1"::: diff --git a/xml/System/Array.xml b/xml/System/Array.xml index 1cdea66d158..064d1a90d7b 100644 --- a/xml/System/Array.xml +++ b/xml/System/Array.xml @@ -129,13 +129,13 @@ The following code example shows how copies elements between an array of type integer and an array of type . :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic Array Example/FS/source.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/Array/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/Overview/source.vb" id="Snippet1"::: The following code example creates and initializes an and displays its properties and its elements. :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic Array Example/FS/source3.fs" id="Snippet2"::: - :::code language="csharp" source="~/snippets/csharp/System/Array/Overview/source3.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/Overview/source3.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/Overview/source3.vb" id="Snippet2"::: ]]> @@ -218,7 +218,7 @@ ## Examples The following example wraps an array in a read-only . - :::code language="csharp" source="~/snippets/csharp/System/Array/AsReadOnlyT/arrayasreadonly.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/AsReadOnlyT/arrayasreadonly.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Array.AsReadOnly/FS/arrayasreadonly.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/AsReadOnlyT/arrayasreadonly.vb" id="Snippet1"::: @@ -334,7 +334,7 @@ > The array is created with its elements in ascending sort order. The method requires the array to be sorted in ascending order. :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic Array.BinarySearch Example/FS/source.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/Array/BinarySearch/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/BinarySearch/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/BinarySearch/source.vb" id="Snippet1"::: ]]> @@ -798,7 +798,7 @@ The generic method overload is then used to search for two strings, one that is not in the array and one that is. The array and the return value of the method are passed to the `ShowWhere` generic method (the `showWhere` function in the F# example), which displays the index value if the string is found, and otherwise the elements the search string would fall between if it were in the array. The index is negative if the string is not in the array, so the `ShowWhere` method takes the bitwise complement (the ~ operator in C#, the ~~~ operator in F#, `Xor`-1 in Visual Basic) to obtain the index of the first element in the list that is larger than the search string. - :::code language="csharp" source="~/snippets/csharp/System/Array/BinarySearchT/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/BinarySearchT/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_SortSearch/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/BinarySearchT/source.vb" id="Snippet1"::: @@ -929,7 +929,7 @@ The generic method overload is then used to search for two strings, one that is not in the array and one that is. The array and the return value of the method are passed to the `ShowWhere` generic method (the `showWhere` function in the F# example), which displays the index value if the string is found, and otherwise the elements the search string would fall between if it were in the array. The index is negative if the string is not n the array, so the `ShowWhere` method takes the bitwise complement (the ~ operator in C#, the ~~~ operator in F#, `Xor` -1 in Visual Basic) to obtain the index of the first element in the list that is larger than the search string. - :::code language="csharp" source="~/snippets/csharp/System/Array/BinarySearchT/source1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/BinarySearchT/source1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_SortSearchComparer/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/BinarySearchT/source1.vb" id="Snippet1"::: @@ -1307,7 +1307,7 @@ ## Examples The following example uses the method to reset integer values in a one-dimensional, two-dimensional, and three-dimensional array. - :::code language="csharp" source="~/snippets/csharp/System/Array/Clear/example.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/Clear/example.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Array.Clear/fs/example.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/Clear/example.vb" id="Snippet1"::: @@ -1407,7 +1407,7 @@ ## Examples The following code example clones a array and demonstrates the behavior of a shallow copy. - :::code language="csharp" source="~/snippets/csharp/System/Array/Clone/arrayclone.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/Clone/arrayclone.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Array.Clone/FS/arrayclone.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/Clone/arrayclone.vb" id="Snippet1"::: @@ -1612,7 +1612,7 @@ ## Examples The following code example defines a method named `PointFToPoint` that converts a structure to a structure. The example then creates an array 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. In the F# example, the `pointFToPoint` function is implicitly casted to the `Converter` delegate. Both lists are displayed. - :::code language="csharp" source="~/snippets/csharp/System/Array/ConvertAllTInput,TOutput/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/ConvertAllTInput,TOutput/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_ConvertAll/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/ConvertAllTInput,TOutput/source.vb" id="Snippet1"::: @@ -1645,7 +1645,7 @@ The following code example shows how to copy from one of type to another of type integer. :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic Array.Copy1 Example/FS/source.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/Array/Copy/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/Copy/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/Copy/source.vb" id="Snippet1"::: ]]> @@ -2174,13 +2174,13 @@ The following code example shows how to copy an to another . :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic Array.CopyTo Example/FS/source.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/Array/CopyTo/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/CopyTo/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/CopyTo/source.vb" id="Snippet1"::: The following code example shows how to copy an to another with a nonzero lower bound. Note that the entire source is copied, including empty elements that overwrite existing elements in the target . :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic Array.CopyTo Example/FS/source2.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/Array/CopyTo/source2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/CopyTo/source2.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/CopyTo/source2.vb" id="Snippet1"::: ]]> @@ -2438,7 +2438,7 @@ The following code example shows how to create and initialize a one-dimensional . :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance Example/FS/source.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/Array/CreateInstance/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/CreateInstance/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/CreateInstance/source.vb" id="Snippet1"::: ]]> @@ -2540,7 +2540,7 @@ The following code example shows how to create and initialize a multidimensional . :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance3 Example/FS/source.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/Array/CreateInstance/source3.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/CreateInstance/source3.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/CreateInstance/source3.vb" id="Snippet1"::: ]]> @@ -2641,7 +2641,7 @@ The following code example shows how to create and initialize a multidimensional . :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance3 Example/FS/source.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/Array/CreateInstance/source3.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/CreateInstance/source3.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/CreateInstance/source3.vb" id="Snippet1"::: ]]> @@ -2735,7 +2735,7 @@ The following code example shows how to create and initialize a two-dimensional . :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance1 Example/FS/source.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/Array/CreateInstance/source1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/CreateInstance/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/CreateInstance/source1.vb" id="Snippet1"::: ]]> @@ -2841,7 +2841,7 @@ The following code example shows how to create and initialize a multidimensional with specified lower bounds. :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance4 Example/FS/source.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/Array/CreateInstance/source4.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/CreateInstance/source4.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/csharp/System/Array/CreateInstance/source4.cs" id="Snippet1"::: ]]> @@ -2949,7 +2949,7 @@ The following code example shows how to create and initialize a three-dimensional . :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic Array.CreateInstance2 Example/FS/source.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/Array/CreateInstance/source2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/CreateInstance/source2.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/CreateInstance/source2.vb" id="Snippet1"::: ]]> @@ -3272,19 +3272,19 @@ ## Examples The following example specifies the match conditions for the method using lambda expressions to check whether a planet starts with a given letter or whether the planet is found on the given array. - :::code language="csharp" source="~/snippets/csharp/System/Array/ExistsT/exists3.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/ExistsT/exists3.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.array.exists/fs/exists3.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/ExistsT/exists3.vb" id="Snippet3"::: The following example uses the method to indicate whether any names in a string array begin with a specified character. The example instantiates a `StringSearcher` object by passing the string to search for to its class constructor. The `StringSearcher.StartsWith` method has same signature as the delegate. When the method is called, each member of the array is passed to the delegate until it returns `true` or iterates all the elements in the array. - :::code language="csharp" source="~/snippets/csharp/System/Array/ExistsT/exists1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/ExistsT/exists1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.array.exists/fs/exists1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/ExistsT/exists1.vb" id="Snippet1"::: You can also use a lambda expression rather than explicitly define a method whose signature corresponds to that of the delegate. The following example replaces the `StringSearcher` class and its `StartsWith` method with a lambda expression. - :::code language="csharp" source="~/snippets/csharp/System/Array/ExistsT/exists2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/ExistsT/exists2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.array.exists/fs/exists2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/ExistsT/exists2.vb" id="Snippet2"::: @@ -3492,13 +3492,13 @@ > [!NOTE] > Visual Basic, C#, and F# users do not have to create the delegate explicitly or specify the type argument of the generic method. The compilers determine the necessary types from the method arguments you supply. - :::code language="csharp" source="~/snippets/csharp/System/Array/FindT/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/FindT/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.array.find/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/FindT/source.vb" id="Snippet1"::: Rather than explicitly defining a method with the necessary signature, instantiating a delegate, and passing the delegate to the method, it is customary to use a lambda expression. The following example is identical to the previous one, except that it uses a lambda expression as the `match` argument. - :::code language="csharp" source="~/snippets/csharp/System/Array/FindT/lambda.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/FindT/lambda.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.array.find/fs/lambda.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/FindT/lambda.vb" id="Snippet2"::: @@ -3592,7 +3592,7 @@ ## Examples The following example creates an array of 50 random numbers with values that can range from 0 to 1,000. It then calls the method with a lambda expression that returns the values that range from 300 to 600. Note that the lambda expression is passed a parameter named `x`; this represents the individual array member that is passed to the . Also note that the local `lBound` and `uBound` variables are accessible within the lambda expression. - :::code language="csharp" source="~/snippets/csharp/System/Array/FindAllT/findall.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/FindAllT/findall.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.array.findall/fs/findall.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/FindAllT/findall.vb" id="Snippet1"::: @@ -3607,7 +3607,7 @@ The code example also demonstrates the and generic methods. - :::code language="csharp" source="~/snippets/csharp/System/Array/FindAllT/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/FindAllT/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_FindEtAl/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/FindAllT/source.vb" id="Snippet1"::: @@ -3652,7 +3652,7 @@ The method overload is used to search the array beginning at position 2 and continuing to the end of the array. It finds the element at position 5. Finally, the method overload is used to search the range of three elements beginning at position 2. It returns -1 because there are no dinosaur names in that range that end with "saurus". - :::code language="csharp" source="~/snippets/csharp/System/Array/FindIndexT/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/FindIndexT/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_FindIndex/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/FindIndexT/source.vb" id="Snippet1"::: @@ -4017,7 +4017,7 @@ The code example also demonstrates the and generic methods. - :::code language="csharp" source="~/snippets/csharp/System/Array/FindAllT/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/FindAllT/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_FindEtAl/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/FindAllT/source.vb" id="Snippet1"::: @@ -4062,7 +4062,7 @@ The method overload is used to search the array beginning at position 4 and continuing backward to the beginning of the array. It finds the element at position 1. Finally, the method overload is used to search the range of three elements beginning at position 4 and working backward (that is, elements 4, 3, and 2). It returns -1 because there are no dinosaur names in that range that end with "saurus". - :::code language="csharp" source="~/snippets/csharp/System/Array/FindLastIndexT/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/FindLastIndexT/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_FindLastIndex/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/FindLastIndexT/source.vb" id="Snippet1"::: @@ -4412,7 +4412,7 @@ ## Examples The following example shows how to use to display the squares of each element in an integer array. - :::code language="csharp" source="~/snippets/csharp/System/Array/ForEachT/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/ForEachT/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.array.foreach/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/ForEachT/source.vb" id="Snippet1"::: @@ -4501,7 +4501,7 @@ ## Examples The following code example shows how to use to list the elements of an array. - :::code language="csharp" source="~/snippets/csharp/System/Array/GetEnumerator/array_getenumerator.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/GetEnumerator/array_getenumerator.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Array_GetEnumerator/FS/array_getenumerator.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/GetEnumerator/array_getenumerator.vb" id="Snippet1"::: @@ -4574,7 +4574,7 @@ ## Examples The following example shows how to use to display the dimensions of two arrays with different ranks. - :::code language="csharp" source="~/snippets/csharp/System/Array/GetLength/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/GetLength/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.array.getlength/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/GetLength/source.vb" id="Snippet1"::: @@ -4733,7 +4733,7 @@ ## Examples The following example uses the and methods to display the bounds of a one-dimensional and two-dimensional array and to display the values of their array elements. - :::code language="csharp" source="~/snippets/csharp/System/Array/GetLowerBound/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/GetLowerBound/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.array.getupperbound/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/GetLowerBound/source.vb" id="Snippet1"::: @@ -4818,7 +4818,7 @@ ## Examples The following example uses the and methods to display the bounds of a one-dimensional and two-dimensional array and to display the values of their array elements. - :::code language="csharp" source="~/snippets/csharp/System/Array/GetLowerBound/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/GetLowerBound/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.array.getupperbound/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/GetLowerBound/source.vb" id="Snippet1"::: @@ -4849,7 +4849,7 @@ ## Examples The following code example demonstrates how to set and get a specific value in a one-dimensional or multidimensional array. - :::code language="csharp" source="~/snippets/csharp/System/Array/GetValue/array_getsetvalue.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/GetValue/array_getsetvalue.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Array_GetSetValue/FS/array_getsetvalue.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/GetValue/array_getsetvalue.vb" id="Snippet1"::: @@ -5533,7 +5533,7 @@ - , to determine the first occurrence of the string "the" in a string array from the element that follows the last successful match to the end of the array. :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic Array.IndexOf Example/FS/source.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/Array/IndexOf/source.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/IndexOf/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/IndexOf/source.vb" id="Snippet1"::: ]]> @@ -5633,7 +5633,7 @@ - , to determine the first occurrence of the string "the" in a string array from the element that follows the last successful match to the end of the array. :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic Array.IndexOf Example/FS/source.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/Array/IndexOf/source.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/IndexOf/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/IndexOf/source.vb" id="Snippet1"::: ]]> @@ -5742,7 +5742,7 @@ - , to determine the first occurrence of the string "the" in a string array from the element that follows the last successful match to the end of the array. To determine the value of the `count` argument, it subtracts the upper bound of the array from the starting index and adds one. :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic Array.IndexOf Example/FS/source.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/Array/IndexOf/source.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/IndexOf/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/IndexOf/source.vb" id="Snippet1"::: ]]> @@ -5836,7 +5836,7 @@ ## Examples The following example demonstrates all three generic overloads of the method. An array of strings is created, with one entry that appears twice, at index location 0 and index location 5. The method overload searches the array from the beginning, and finds the first occurrence of the string. The method overload is used to search the array beginning with index location 3 and continuing to the end of the array, and finds the second occurrence of the string. Finally, the method overload is used to search a range of two entries, beginning at index location two; it returns -1 because there are no instances of the search string in that range. - :::code language="csharp" source="~/snippets/csharp/System/Array/IndexOfT/source.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/IndexOfT/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_IndexOf/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/IndexOfT/source.vb" id="Snippet1"::: @@ -5923,7 +5923,7 @@ ## Examples The following example demonstrates all three generic overloads of the method. An array of strings is created, with one entry that appears twice, at index location 0 and index location 5. The method overload searches the array from the beginning, and finds the first occurrence of the string. The method overload is used to search the array beginning with index location 3 and continuing to the end of the array, and finds the second occurrence of the string. Finally, the method overload is used to search a range of two entries, beginning at index location two; it returns -1 because there are no instances of the search string in that range. - :::code language="csharp" source="~/snippets/csharp/System/Array/IndexOfT/source.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/IndexOfT/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_IndexOf/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/IndexOfT/source.vb" id="Snippet1"::: @@ -6014,7 +6014,7 @@ ## Examples The following example demonstrates all three generic overloads of the method. An array of strings is created, with one entry that appears twice, at index location 0 and index location 5. The method overload searches the array from the beginning, and finds the first occurrence of the string. The method overload is used to search the array beginning with index location 3 and continuing to the end of the array, and finds the second occurrence of the string. Finally, the method overload is used to search a range of two entries, beginning at index location two; it returns -1 because there are no instances of the search string in that range. - :::code language="csharp" source="~/snippets/csharp/System/Array/IndexOfT/source.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/IndexOfT/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_IndexOf/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/IndexOfT/source.vb" id="Snippet1"::: @@ -6392,7 +6392,7 @@ The following code example shows how to determine the index of the last occurrence of a specified element in an array. :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic Array.LastIndexOf Example/FS/source.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/Array/LastIndexOf/source.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/LastIndexOf/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/LastIndexOf/source.vb" id="Snippet1"::: ]]> @@ -6487,7 +6487,7 @@ The following code example shows how to determine the index of the last occurrence of a specified element in an array. :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic Array.LastIndexOf Example/FS/source.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/Array/LastIndexOf/source.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/LastIndexOf/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/LastIndexOf/source.vb" id="Snippet1"::: ]]> @@ -6590,7 +6590,7 @@ The following code example shows how to determine the index of the last occurrence of a specified element in an array. Note that the method is a backward search; therefore, `count` must be less than or equal to (`startIndex` minus the lower bound of the array plus 1). :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic Array.LastIndexOf Example/FS/source.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/Array/LastIndexOf/source.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/LastIndexOf/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/LastIndexOf/source.vb" id="Snippet1"::: ]]> @@ -6686,7 +6686,7 @@ ## Examples The following code example demonstrates all three generic overloads of the method. An array of strings is created, with one entry that appears twice, at index location 0 and index location 5. The method overload searches the entire array from the end, and finds the second occurrence of the string. The method overload is used to search the array backward beginning with index location 3 and continuing to the beginning of the array, and finds the first occurrence of the string. Finally, the method overload is used to search a range of four entries, beginning at index location 4 and extending backward (that is, it searches the items at locations 4, 3, 2, and 1); this search returns -1 because there are no instances of the search string in that range. - :::code language="csharp" source="~/snippets/csharp/System/Array/LastIndexOfT/source.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/LastIndexOfT/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_LastIndexOf/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/LastIndexOfT/source.vb" id="Snippet1"::: @@ -6773,7 +6773,7 @@ ## Examples The following code example demonstrates all three generic overloads of the method. An array of strings is created, with one entry that appears twice, at index location 0 and index location 5. The method overload searches the entire array from the end, and finds the second occurrence of the string. The method overload is used to search the array backward beginning with index location 3 and continuing to the beginning of the array, and finds the first occurrence of the string. Finally, the method overload is used to search a range of four entries, beginning at index location 4 and extending backward (that is, it searches the items at locations 4, 3, 2, and 1); this search returns -1 because there are no instances of the search string in that range. - :::code language="csharp" source="~/snippets/csharp/System/Array/LastIndexOfT/source.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/LastIndexOfT/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_LastIndexOf/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/LastIndexOfT/source.vb" id="Snippet1"::: @@ -6864,7 +6864,7 @@ ## Examples The following code example demonstrates all three generic overloads of the method. An array of strings is created, with one entry that appears twice, at index location 0 and index location 5. The method overload searches the entire array from the end, and finds the second occurrence of the string. The method overload is used to search the array backward beginning with index location 3 and continuing to the beginning of the array, and finds the first occurrence of the string. Finally, the method overload is used to search a range of four entries, beginning at index location 4 and extending backward (that is, it searches the items at locations 4, 3, 2, and 1); this search returns -1 because there are no instances of the search string in that range. - :::code language="csharp" source="~/snippets/csharp/System/Array/LastIndexOfT/source.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/LastIndexOfT/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_LastIndexOf/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/LastIndexOfT/source.vb" id="Snippet1"::: @@ -6949,7 +6949,7 @@ ## Examples The following example uses the property to get the total number of elements in an array. It also uses the method to determine the number of elements in each dimension of a multidimensional array. - :::code language="csharp" source="~/snippets/csharp/System/Array/Length/length1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/Length/length1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.array.length/fs/length1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/Length/length1.vb" id="Snippet1"::: @@ -7151,7 +7151,7 @@ int[,,] TDArray = new int[1,1,1]; ## Examples The following example initializes a one-dimensional array, a two-dimensional array, and a jagged array, and retrieves the property of each. - :::code language="csharp" source="~/snippets/csharp/System/Array/Rank/rank1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/Rank/rank1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.array.rank/fs/rank1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/Rank/rank1.vb" id="Snippet1"::: @@ -7245,7 +7245,7 @@ int[,,] TDArray = new int[1,1,1]; The method resizes a one-dimensional array only. The class does not include a method for resizing multi-dimensional arrays. To do this, you must either provide your own code or call a special-purpose method in a third-party library. The following code illustrates one possible implementation for a method that resizes an array of *n* dimensions. - :::code language="csharp" source="~/snippets/csharp/System/Array/ResizeT/resizexd.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/ResizeT/resizexd.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Array.Resize/FS/resizexd.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/ResizeT/resizexd.vb" id="Snippet2"::: @@ -7254,7 +7254,7 @@ int[,,] TDArray = new int[1,1,1]; ## Examples The following example shows how resizing affects the array. - :::code language="csharp" source="~/snippets/csharp/System/Array/ResizeT/arrayresize.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/ResizeT/arrayresize.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Array.Resize/FS/arrayresize.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/ResizeT/arrayresize.vb" id="Snippet1"::: @@ -7340,7 +7340,7 @@ int[,,] TDArray = new int[1,1,1]; As the following example shows, the method can be used to reverse a jagged array. It initializes a jagged array with one element for each month of the current year in the current culture's calendar. Each element contains an array with as many elements as that month has days. The example displays the contents of the array, calls the method, and then displays the contents of the reversed array. - :::code language="csharp" source="~/snippets/csharp/System/Array/Reverse/reversejagged.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/Reverse/reversejagged.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.array.reverse/fs/reversejagged.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/Reverse/reversejagged.vb" id="Snippet1"::: @@ -7350,7 +7350,7 @@ int[,,] TDArray = new int[1,1,1]; The following code example shows how to reverse the sort of the values in an . :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic Array.Reverse Example/FS/source.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/Array/Reverse/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/Reverse/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/Reverse/source.vb" id="Snippet1"::: ]]> @@ -7436,7 +7436,7 @@ int[,,] TDArray = new int[1,1,1]; The following code example shows how to reverse the sort of the values in a range of elements in an . :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic Array.Reverse1 Example/FS/source.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/Array/Reverse/source1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/Reverse/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/Reverse/source1.vb" id="Snippet1"::: ]]> @@ -7589,7 +7589,7 @@ int[,,] TDArray = new int[1,1,1]; ## Examples The following code example demonstrates how to set and get a specific value in a one-dimensional or multidimensional array. - :::code language="csharp" source="~/snippets/csharp/System/Array/GetValue/array_getsetvalue.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/GetValue/array_getsetvalue.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Array_GetSetValue/FS/array_getsetvalue.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/GetValue/array_getsetvalue.vb" id="Snippet1"::: @@ -8351,7 +8351,7 @@ int[,,] TDArray = new int[1,1,1]; ## Examples The following code example shows how to sort the values in an using the default comparer and a custom comparer that reverses the sort order. Note that the result might vary depending on the current . - :::code language="csharp" source="~/snippets/csharp/System/Array/Sort/arraysort.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/Sort/arraysort.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Array.Sort/FS/arraysort.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/Sort/arraysort.vb" id="Snippet1"::: @@ -8459,7 +8459,7 @@ int[,,] TDArray = new int[1,1,1]; ## Examples The following example shows how to sort two associated arrays where the first array contains the keys and the second array contains the values. Sorts are done using the default comparer and a custom comparer that reverses the sort order. Note that the result might vary depending on the current . - :::code language="csharp" source="~/snippets/csharp/System/Array/Sort/arraysort2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/Sort/arraysort2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Array.Sort2/FS/arraysort2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/Sort/arraysort2.vb" id="Snippet1"::: @@ -8582,7 +8582,7 @@ This method is an O(`n` log `n`) operation, where `n` is the implementation named `ReverseComparer` that reverses an object's default sort order while performing a case-insensitive string comparison. Note that the output might vary depending on the current culture. - :::code language="csharp" source="~/snippets/csharp/System/Array/Sort/arraysort.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/Sort/arraysort.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Array.Sort/FS/arraysort.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/Sort/arraysort.vb" id="Snippet1"::: @@ -8713,7 +8713,7 @@ This method is an O(`n` log `n`) operation, where `n` is the . - :::code language="csharp" source="~/snippets/csharp/System/Array/Sort/arraysort2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/Sort/arraysort2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Array.Sort2/FS/arraysort2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/Sort/arraysort2.vb" id="Snippet1"::: @@ -8823,7 +8823,7 @@ This method is an O(`n` log `n`) operation, where `n` is the using the default comparer and a custom comparer that reverses the sort order. Note that the result might vary depending on the current . - :::code language="csharp" source="~/snippets/csharp/System/Array/Sort/arraysort.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/Sort/arraysort.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Array.Sort/FS/arraysort.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/Sort/arraysort.vb" id="Snippet1"::: @@ -8943,7 +8943,7 @@ This method is an O(`n` log `n`) operation, where `n` is the . - :::code language="csharp" source="~/snippets/csharp/System/Array/Sort/arraysort2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/Sort/arraysort2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Array.Sort2/FS/arraysort2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/Sort/arraysort2.vb" id="Snippet1"::: @@ -9083,7 +9083,7 @@ This method is an O(`n` log `n`) operation, where `n` is the using the default comparer and a custom comparer that reverses the sort order. Note that the result might vary depending on the current . - :::code language="csharp" source="~/snippets/csharp/System/Array/Sort/arraysort.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/Sort/arraysort.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Array.Sort/FS/arraysort.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/Sort/arraysort.vb" id="Snippet1"::: @@ -9233,7 +9233,7 @@ This method is an O(`n` log `n`) operation, where `n` is the . - :::code language="csharp" source="~/snippets/csharp/System/Array/Sort/arraysort2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/Sort/arraysort2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Array.Sort2/FS/arraysort2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/Sort/arraysort2.vb" id="Snippet1"::: @@ -9374,7 +9374,7 @@ This method is an O(`n` log `n`) operation, where `n` is the generic method overload is then used to search for two strings, one that is not in the array and one that is. The array and the return value of the method are passed to the `ShowWhere` generic method, which displays the index value if the string is found, and otherwise the elements the search string would fall between if it were in the array. The index is negative if the string is not n the array, so the `ShowWhere` method takes the bitwise complement (the ~ operator in C#, `Xor` -1 in Visual Basic) to obtain the index of the first element in the list that is larger than the search string. - :::code language="csharp" source="~/snippets/csharp/System/Array/BinarySearchT/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/BinarySearchT/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_SortSearch/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/BinarySearchT/source.vb" id="Snippet1"::: @@ -9493,7 +9493,7 @@ This method is an O(`n` log `n`) operation, where `n` is the generic method overload is then used to search for two strings, one that is not in the array and one that is. The array and the return value of the method are passed to the `ShowWhere` generic method, which displays the index value if the string is found, and otherwise the elements the search string would fall between if it were in the array. The index is negative if the string is not n the array, so the `ShowWhere` method takes the bitwise complement (the ~ operator in C#, `Xor` -1 in Visual Basic) to obtain the index of the first element in the list that is larger than the search string. - :::code language="csharp" source="~/snippets/csharp/System/Array/BinarySearchT/source1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/BinarySearchT/source1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_SortSearchComparer/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/BinarySearchT/source1.vb" id="Snippet1"::: @@ -9597,7 +9597,7 @@ This method is an O(`n` log `n`) operation, where `n` is the generic delegate representing the `CompareDinosByLength` method, and displayed again. - :::code language="csharp" source="~/snippets/csharp/System/Array/SortT/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/SortT/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_SortComparison/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/SortT/source.vb" id="Snippet1"::: @@ -9715,7 +9715,7 @@ This method is an O(`n` log `n`) operation, where `n` is the [!NOTE] > The calls to the and generic methods do not look any different from calls to their nongeneric counterparts, because Visual Basic, C#, and C++ infer the type of the generic type parameter from the type of the first argument. If you use the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler) to examine the Microsoft intermediate language (MSIL), you can see that the generic methods are being called. - :::code language="csharp" source="~/snippets/csharp/System/Array/SortT/source1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/SortT/source1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_SortIntIntIComparer/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/SortT/source1.vb" id="Snippet1"::: @@ -9848,7 +9848,7 @@ This method is an O(`n` log `n`) operation, where `n` is the [!NOTE] > The calls to the and generic methods do not look any different from calls to their nongeneric counterparts, because Visual Basic, C#, and C++ infer the type of the generic type parameter from the type of the first argument. If you use the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler) to examine the Microsoft intermediate language (MSIL), you can see that the generic methods are being called. - :::code language="csharp" source="~/snippets/csharp/System/Array/SortT/source1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/SortT/source1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_SortIntIntIComparer/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/SortT/source1.vb" id="Snippet1"::: @@ -9991,7 +9991,7 @@ This method is an O(`n` log `n`) operation, where `n` is the [!NOTE] > The calls to the generic methods do not look any different from calls to their nongeneric counterparts, because Visual Basic, C#, and C++ infer the type of the generic type parameter from the type of the first two arguments. If you use the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler) to examine the Microsoft intermediate language (MSIL), you can see that the generic methods are being called. - :::code language="csharp" source="~/snippets/csharp/System/Array/SortTKey,TValue/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/SortTKey,TValue/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_Sort2IntIntIComparer/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/SortTKey,TValue/source.vb" id="Snippet1"::: @@ -10131,7 +10131,7 @@ This method is an O(`n` log `n`) operation, where `n` is the [!NOTE] > The calls to the generic methods do not look any different from calls to their nongeneric counterparts, because Visual Basic, C#, and C++ infer the type of the generic type parameter from the type of the first two arguments. If you use the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler) to examine the Microsoft intermediate language (MSIL), you can see that the generic methods are being called. - :::code language="csharp" source="~/snippets/csharp/System/Array/SortTKey,TValue/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/SortTKey,TValue/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_Sort2IntIntIComparer/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/SortTKey,TValue/source.vb" id="Snippet1"::: @@ -10274,7 +10274,7 @@ This method is an O(`n` log `n`) operation, where `n` is the [!NOTE] > The calls to the generic methods do not look any different from calls to their nongeneric counterparts, because Visual Basic, C#, and C++ infer the type of the generic type parameter from the type of the first two arguments. If you use the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler) to examine the Microsoft intermediate language (MSIL), you can see that the generic methods are being called. - :::code language="csharp" source="~/snippets/csharp/System/Array/SortTKey,TValue/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/SortTKey,TValue/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_Sort2IntIntIComparer/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/SortTKey,TValue/source.vb" id="Snippet1"::: @@ -10435,7 +10435,7 @@ This method is an O(`n` log `n`) operation, where `n` is the [!NOTE] > The calls to the generic methods do not look any different from calls to their nongeneric counterparts, because Visual Basic, C#, and C++ infer the type of the generic type parameter from the type of the first two arguments. If you use the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler) to examine the Microsoft intermediate language (MSIL), you can see that the generic methods are being called. - :::code language="csharp" source="~/snippets/csharp/System/Array/SortTKey,TValue/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/SortTKey,TValue/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Array_Sort2IntIntIComparer/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/SortTKey,TValue/source.vb" id="Snippet1"::: @@ -11540,13 +11540,13 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example determines whether the last character of each element in a string array is a number. It creates two string arrays. The first array includes both strings that end with alphabetic characters and strings that end with numeric characters. The second array consists only of strings that end with numeric characters. The example also defines an `EndWithANumber` method whose signature matches the delegate. The example passes each array to the method along with a delegate that represents the `EndsWithANumber` method. - :::code language="csharp" source="~/snippets/csharp/System/Array/TrueForAllT/trueforall2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/TrueForAllT/trueforall2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.array.trueforall/fs/trueforall2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/TrueForAllT/trueforall2.vb" id="Snippet2"::: The following example is similar to the first, except that it passes the string array to the method along with a lambda expression that determines whether a particular array element ends with the string representation of a number. - :::code language="csharp" source="~/snippets/csharp/System/Array/TrueForAllT/trueforall1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/TrueForAllT/trueforall1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.array.trueforall/fs/trueforall1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/TrueForAllT/trueforall1.vb" id="Snippet1"::: diff --git a/xml/System/ArraySegment`1.xml b/xml/System/ArraySegment`1.xml index 04391e99186..50fffa0ed2f 100644 --- a/xml/System/ArraySegment`1.xml +++ b/xml/System/ArraySegment`1.xml @@ -133,7 +133,7 @@ If you want to retrieve an element by its index in the object, you must cast it to an object and retrieve it or modify it by using the property. Note that this is not necessary in F#. The following example retrieves the element in an object that delimits a section of a string array. - :::code language="csharp" source="~/snippets/csharp/System/ArraySegmentT/Overview/example1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/ArraySegmentT/Overview/example1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.arraysegment.class/fs/example1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/ArraySegmentT/Overview/example1.vb" id="Snippet1"::: @@ -142,7 +142,7 @@ ## Examples The following code example passes an structure to a method. - :::code language="csharp" source="~/snippets/csharp/System/ArraySegmentT/Overview/arraysegment.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/ArraySegmentT/Overview/arraysegment.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.ArraySegment/FS/arraysegment.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/ArraySegmentT/Overview/arraysegment.vb" id="Snippet1"::: @@ -168,7 +168,7 @@ ## Examples The following code example passes an structure to a method. - :::code language="csharp" source="~/snippets/csharp/System/ArraySegmentT/Overview/arraysegment.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/ArraySegmentT/Overview/arraysegment.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.ArraySegment/FS/arraysegment.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/ArraySegmentT/Overview/arraysegment.vb" id="Snippet1"::: @@ -357,7 +357,7 @@ ## Examples The following code example passes an to a method. - :::code language="csharp" source="~/snippets/csharp/System/ArraySegmentT/Overview/arraysegment.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/ArraySegmentT/Overview/arraysegment.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.ArraySegment/FS/arraysegment.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/ArraySegmentT/Overview/arraysegment.vb" id="Snippet1"::: @@ -1802,7 +1802,7 @@ The underlying array of is instance is cast to an interface, as the following example shows. - :::code language="csharp" source="~/snippets/csharp/System/ArraySegmentT/Overview/example1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/ArraySegmentT/Overview/example1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.arraysegment.class/fs/example1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/ArraySegmentT/Overview/example1.vb" id="Snippet1"::: diff --git a/xml/System/ArrayTypeMismatchException.xml b/xml/System/ArrayTypeMismatchException.xml index 3ff14baf88a..1a69a3273ef 100644 --- a/xml/System/ArrayTypeMismatchException.xml +++ b/xml/System/ArrayTypeMismatchException.xml @@ -90,7 +90,7 @@ ## Examples The following code example demonstrates scenarios where is thrown. - :::code language="csharp" source="~/snippets/csharp/System/ArrayTypeMismatchException/Overview/class1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/ArrayTypeMismatchException/Overview/class1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.ArrayTypeMismatch/FS/class1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/ArrayTypeMismatchException/Overview/class1.vb" id="Snippet1"::: diff --git a/xml/System/Attribute.xml b/xml/System/Attribute.xml index 5ac69fe85da..f61ac0db394 100644 --- a/xml/System/Attribute.xml +++ b/xml/System/Attribute.xml @@ -98,7 +98,7 @@ ## Examples The following code example demonstrates the usage of . - :::code language="csharp" source="~/snippets/csharp/System/Attribute/Overview/customattribute.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Attribute/Overview/customattribute.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/AnimalAttributes/FS/customattribute.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Attribute/Overview/customattribute.vb" id="Snippet1"::: @@ -400,7 +400,7 @@ When implementing your own class derived from , you can o ## Examples The following code example illustrates the use of the method taking a as a parameter.   - :::code language="csharp" source="~/snippets/csharp/System/Attribute/GetCustomAttribute/id4.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Attribute/GetCustomAttribute/id4.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/IsDefined/FS/id4.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Attribute/GetCustomAttribute/id4.vb" id="Snippet4"::: @@ -548,7 +548,7 @@ When implementing your own class derived from , you can o ## Examples The following code example defines a custom parameter class and applies the custom attribute to a method in a derived class and the base of the derived class. The example shows the use of the method to return the attributes. - :::code language="csharp" source="~/snippets/csharp/System/Attribute/.ctor/getcustattrparam.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Attribute/.ctor/getcustattrparam.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Attribute.GetCustomAttribute/FS/getcustattrparam.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Attribute/.ctor/getcustattrparam.vb" id="Snippet1"::: @@ -707,7 +707,7 @@ When implementing your own class derived from , you can o ## Examples The following code example illustrates the use of the method taking a as a parameter.   - :::code language="csharp" source="~/snippets/csharp/System/Attribute/GetCustomAttribute/id4.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Attribute/GetCustomAttribute/id4.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/IsDefined/FS/id4.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Attribute/GetCustomAttribute/id4.vb" id="Snippet4"::: @@ -859,7 +859,7 @@ When implementing your own class derived from , you can o ## Examples The following code example defines a custom parameter class and applies the custom attribute to a method in a derived class and the base of the derived class. The example shows the use of the method to return the attributes. - :::code language="csharp" source="~/snippets/csharp/System/Attribute/.ctor/getcustattrprminh.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Attribute/.ctor/getcustattrprminh.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Attribute.GetCustomAttribute/FS/getcustattrprminh.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Attribute/.ctor/getcustattrprminh.vb" id="Snippet3"::: @@ -1128,7 +1128,7 @@ When implementing your own class derived from , you can o ## Examples The following code example demonstrates the use of , taking a as a parameter. - :::code language="csharp" source="~/snippets/csharp/System/Attribute/GetCustomAttributes/ca5.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Attribute/GetCustomAttributes/ca5.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/GetCustomAttributes/FS/ca5.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Attribute/GetCustomAttributes/ca5.vb" id="Snippet5"::: @@ -1527,7 +1527,7 @@ When implementing your own class derived from , you can o ## Examples The following code example demonstrates the use of , taking a as a parameter. - :::code language="csharp" source="~/snippets/csharp/System/Attribute/GetCustomAttributes/ca5.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Attribute/GetCustomAttributes/ca5.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/GetCustomAttributes/FS/ca5.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Attribute/GetCustomAttributes/ca5.vb" id="Snippet5"::: @@ -1594,7 +1594,7 @@ When implementing your own class derived from , you can o ## Examples The following code example demonstrates the use of , taking a as a parameter. - :::code language="csharp" source="~/snippets/csharp/System/Attribute/GetCustomAttributes/ca5.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Attribute/GetCustomAttributes/ca5.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/GetCustomAttributes/FS/ca5.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Attribute/GetCustomAttributes/ca5.vb" id="Snippet5"::: @@ -1890,7 +1890,7 @@ When implementing your own class derived from , you can o ## Examples The following code example demonstrates the use of , taking a as a parameter. - :::code language="csharp" source="~/snippets/csharp/System/Attribute/GetCustomAttributes/ca5.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Attribute/GetCustomAttributes/ca5.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/GetCustomAttributes/FS/ca5.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Attribute/GetCustomAttributes/ca5.vb" id="Snippet5"::: @@ -2248,7 +2248,7 @@ When implementing your own class derived from , you can o ## Examples The following code example illustrates the use of , taking a as a parameter. - :::code language="csharp" source="~/snippets/csharp/System/Attribute/GetCustomAttribute/id4.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Attribute/GetCustomAttribute/id4.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/IsDefined/FS/id4.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Attribute/GetCustomAttribute/id4.vb" id="Snippet4"::: @@ -2386,7 +2386,7 @@ When implementing your own class derived from , you can o ## Examples The following code example illustrates the use of , taking a as a parameter. - :::code language="csharp" source="~/snippets/csharp/System/Attribute/GetCustomAttribute/id5.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Attribute/GetCustomAttribute/id5.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/IsDefined/FS/id5.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Attribute/GetCustomAttribute/id5.vb" id="Snippet5"::: @@ -2530,7 +2530,7 @@ When implementing your own class derived from , you can o ## Examples The following code example illustrates the use of , taking a as a parameter. - :::code language="csharp" source="~/snippets/csharp/System/Attribute/GetCustomAttribute/id4.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Attribute/GetCustomAttribute/id4.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/IsDefined/FS/id4.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Attribute/GetCustomAttribute/id4.vb" id="Snippet4"::: @@ -2673,7 +2673,7 @@ When implementing your own class derived from , you can o ## Examples The following code example illustrates the use of , taking a as a parameter. - :::code language="csharp" source="~/snippets/csharp/System/Attribute/GetCustomAttribute/id5.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Attribute/GetCustomAttribute/id5.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/IsDefined/FS/id5.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Attribute/GetCustomAttribute/id5.vb" id="Snippet5"::: @@ -3002,7 +3002,7 @@ When implementing your own class derived from , you can o ## Examples The following code example implements the property in a custom parameter class and shows its use. - :::code language="csharp" source="~/snippets/csharp/System/Attribute/TypeId/typeid.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Attribute/TypeId/typeid.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Attribute.TypeId/FS/typeid.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Attribute/TypeId/typeid.vb" id="Snippet1"::: diff --git a/xml/System/Base64FormattingOptions.xml b/xml/System/Base64FormattingOptions.xml index 128d31e7883..f51363aa27f 100644 --- a/xml/System/Base64FormattingOptions.xml +++ b/xml/System/Base64FormattingOptions.xml @@ -69,7 +69,7 @@ ## Examples The following example calls the method with a `InsertLineBreaks` argument to insert line breaks in the string that is produced by encoding a 100-element byte array: - :::code language="csharp" source="~/snippets/csharp/System/Base64FormattingOptions/Overview/ToBase64String3.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Base64FormattingOptions/Overview/ToBase64String3.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/System.Convert.ToBase64String/fs/ToBase64String3.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Base64FormattingOptions/Overview/ToBase64String3.vb" id="Snippet3"::: diff --git a/xml/System/BitConverter.xml b/xml/System/BitConverter.xml index 6501c4d2d9b..1055a5960f5 100644 --- a/xml/System/BitConverter.xml +++ b/xml/System/BitConverter.xml @@ -88,7 +88,7 @@ If you use methods to round-trip data, make sure that the overload and the `To`*Type* method specify the same type. As the following example illustrates, restoring an array that represents a signed integer by calling the method can result in a value that is different from the original. For more information, see [Working with Signed Non-Decimal and Bitwise Values](/archive/blogs/bclteam/working-with-signed-non-decimal-and-bitwise-values-ron-petrusha). - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/Overview/example1.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/Overview/example1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.Class/FS/example1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/Overview/example1.vb" id="Snippet3"::: @@ -105,7 +105,7 @@ - If systems sending and receiving data can have different endianness, always transmit data in a particular order. This means that the order of bytes in the array may have to be reversed either before sending them or after receiving them. A common convention is to transmit data in network byte order (big-endian order). The following example provides an implementation for sending an integer value in network byte order. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/Overview/networkorder1.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/Overview/networkorder1.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.Class/FS/networkorder1.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/Overview/networkorder1.vb" id="Snippet4"::: @@ -114,7 +114,7 @@ ## Examples The following code example illustrates the use of several class methods. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/Overview/bitconv.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/Overview/bitconv.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.Class/FS/bitconv.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/Overview/bitconv.vb" id="Snippet1"::: @@ -186,7 +186,7 @@ ## Examples The following code example converts the bit patterns of several values to values with the `DoubleToInt64Bits` method. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/DoubleToInt64Bits/dbltobits.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/DoubleToInt64Bits/dbltobits.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.DoubleInt64/FS/dbltobits.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/DoubleToInt64Bits/dbltobits.vb" id="Snippet2"::: @@ -308,7 +308,7 @@ ## Examples The following example converts the bit patterns of values to arrays with the `GetBytes` method. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesbool.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesbool.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.Others/FS/bytesbool.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/GetBytes/bytesbool.vb" id="Snippet1"::: @@ -374,7 +374,7 @@ ## Examples The following code example converts the bit patterns of values (Unicode characters) to arrays with the `GetBytes` method. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/byteschar.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/byteschar.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.Others/FS/byteschar.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/GetBytes/byteschar.vb" id="Snippet2"::: @@ -446,7 +446,7 @@ ## Examples The following code example converts the bit patterns of values to arrays with the `GetBytes` method. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesdouble.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesdouble.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.Others/FS/bytesdouble.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/GetBytes/bytesdouble.vb" id="Snippet4"::: @@ -591,7 +591,7 @@ ## Examples The following code example converts the bit patterns of values to arrays with the `GetBytes` method. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesint16.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesint16.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.SInts/FS/bytesint16.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/GetBytes/bytesint16.vb" id="Snippet3"::: @@ -663,7 +663,7 @@ ## Examples The following code example converts the bit patterns of values to arrays with the `GetBytes` method. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesint32.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesint32.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.SInts/FS/bytesint32.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/GetBytes/bytesint32.vb" id="Snippet2"::: @@ -735,7 +735,7 @@ ## Examples The following example calls the method to convert each element in an array to a arrays. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesint64.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesint64.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.SInts/FS/bytesint64.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/GetBytes/bytesint64.vb" id="Snippet1"::: @@ -807,7 +807,7 @@ ## Examples The following code example converts the bit patterns of values to arrays with the `GetBytes` method. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytessingle.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytessingle.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.Others/FS/bytessingle.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/GetBytes/bytessingle.vb" id="Snippet3"::: @@ -920,7 +920,7 @@ ## Examples The following code example converts the bit patterns of values to arrays with the `GetBytes` method. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesuint16.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesuint16.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.UInts/FS/bytesuint16.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/GetBytes/bytesuint16.vb" id="Snippet3"::: @@ -992,7 +992,7 @@ ## Examples The following code example converts the bit patterns of values to arrays with the `GetBytes` method. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesuint32.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesuint32.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.UInts/FS/bytesuint32.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/GetBytes/bytesuint32.vb" id="Snippet2"::: @@ -1064,7 +1064,7 @@ ## Examples The following code example converts the bit patterns of values to arrays with the `GetBytes` method. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesuint64.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesuint64.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.UInts/FS/bytesuint64.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/GetBytes/bytesuint64.vb" id="Snippet1"::: @@ -1363,7 +1363,7 @@ ## Examples The following code example illustrates the use of the `IsLittleEndian` field. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/Overview/littleend.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/Overview/littleend.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.Class/FS/littleend.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/Overview/littleend.vb" id="Snippet2"::: @@ -1561,7 +1561,7 @@ ## Examples The following code example converts elements of arrays to values with the `ToBoolean` method. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToBoolean/batobool.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToBoolean/batobool.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.Others/FS/batobool.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/ToBoolean/batobool.vb" id="Snippet1"::: @@ -1676,7 +1676,7 @@ ## Examples The following code example converts elements of arrays to values (Unicode characters) with the `ToChar` method. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToBoolean/batochar.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToBoolean/batochar.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.Others/FS/batochar.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/ToBoolean/batochar.vb" id="Snippet2"::: @@ -1799,7 +1799,7 @@ ## Examples The following code example converts elements of arrays to values with the `ToDouble` method. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToBoolean/batodouble.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToBoolean/batodouble.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.Others/FS/batodouble.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/ToBoolean/batodouble.vb" id="Snippet3"::: @@ -2087,7 +2087,7 @@ ## Examples The following code example converts elements of arrays to values with the `ToInt16` method. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToInt16/batoint16.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToInt16/batoint16.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.SInts/FS/batoint16.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/ToInt16/batoint16.vb" id="Snippet1"::: @@ -2210,7 +2210,7 @@ ## Examples The following example uses the method to create values from a four-byte array and from the upper four bytes of an eight-byte array. It also uses the and methods to round-trip an value. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToInt32/toint32.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToInt32/toint32.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.bitconverter.toint32/fs/toint32.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/ToInt32/toint32.vb" id="Snippet1"::: @@ -2333,7 +2333,7 @@ ## Examples The following code example converts elements of arrays to values with the `ToInt64` method. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToInt16/batoint64.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToInt16/batoint64.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.SInts/FS/batoint64.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/ToInt16/batoint64.vb" id="Snippet3"::: @@ -2456,7 +2456,7 @@ ## Examples The following code example converts elements of arrays to values with the `ToSingle` method. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToBoolean/batosingle.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToBoolean/batosingle.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.Others/FS/batosingle.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/ToBoolean/batosingle.vb" id="Snippet4"::: @@ -2540,7 +2540,7 @@ ## Examples The following code example converts arrays to objects with the `ToString` method. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToString/batostring.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToString/batostring.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToString/FS/batostring.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/ToString/batostring.vb" id="Snippet1"::: @@ -2609,7 +2609,7 @@ ## Examples The following code example converts the part of a array starting at the specified `startIndex` to a with the `ToString` method. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToString/batostringii.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToString/batostringii.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToString/FS/batostringii.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/ToString/batostringii.vb" id="Snippet2"::: @@ -2682,7 +2682,7 @@ ## Examples The following example uses the method to convert part of a byte array, starting at the specified `startIndex` and with the specified `length`, to a string. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToString/batostringii.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToString/batostringii.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToString/FS/batostringii.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/ToString/batostringii.vb" id="Snippet2"::: @@ -2905,7 +2905,7 @@ ## Examples The following code example converts elements of arrays to values with the `ToUInt16` method. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToUInt16/batouint16.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToUInt16/batouint16.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.UInts/FS/batouint16.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/ToUInt16/batouint16.vb" id="Snippet1"::: @@ -3034,7 +3034,7 @@ ## Examples The following code example converts elements of arrays to values with the `ToUInt32` method. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToUInt16/batouint32.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToUInt16/batouint32.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.UInts/FS/batouint32.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/ToUInt16/batouint32.vb" id="Snippet2"::: @@ -3163,7 +3163,7 @@ ## Examples The following code example converts elements of arrays to values with the `ToUInt64` method. - :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToUInt16/batouint64.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToUInt16/batouint64.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.UInts/FS/batouint64.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/BitConverter/ToUInt16/batouint64.vb" id="Snippet3"::: diff --git a/xml/System/Boolean.xml b/xml/System/Boolean.xml index 08fec309e17..fcc11529227 100644 --- a/xml/System/Boolean.xml +++ b/xml/System/Boolean.xml @@ -698,7 +698,7 @@ The `value` parameter, optionally preceded or trailed by white space, must conta The following code example illustrates the use of method. - :::code language="csharp" source="~/snippets/csharp/System/Boolean/Parse/booleanmembers.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Boolean/Parse/booleanmembers.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Boolean/Parse/booleanmembers.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Boolean/Parse/booleanmembers.vb" id="Snippet2"::: @@ -1969,7 +1969,7 @@ This method returns the constants "True" or "False". The following example illustrates the method. - :::code language="csharp" source="~/snippets/csharp/System/Boolean/Parse/booleanmembers.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Boolean/Parse/booleanmembers.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Boolean/Parse/booleanmembers.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Boolean/Parse/booleanmembers.vb" id="Snippet1"::: @@ -2259,7 +2259,7 @@ The method is like the method to parse an array of strings. Note that the parse operation succeeds only if the string to be parsed is "True" (the value of the field) or "False" (the value of the field) in a case-insensitive comparison. - :::code language="csharp" source="~/snippets/csharp/System/Boolean/TryParse/tryparseex.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Boolean/TryParse/tryparseex.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Boolean/TryParse/tryparseex.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Boolean/TryParse/tryparseex.vb" id="Snippet1"::: diff --git a/xml/System/Buffer.xml b/xml/System/Buffer.xml index 1d62a8142a9..6a55863b008 100644 --- a/xml/System/Buffer.xml +++ b/xml/System/Buffer.xml @@ -75,7 +75,7 @@ ## Examples The following code example illustrates the use of several `Buffer` class methods. - :::code language="csharp" source="~/snippets/csharp/System/Buffer/Overview/buffer.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Buffer/Overview/buffer.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Buffer.BlockCopy/FS/buffer.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Buffer/Overview/buffer.vb" id="Snippet1"::: @@ -152,13 +152,13 @@ As its name suggests, the method copies a block of bytes as a whole, rather than copying one byte at a time. Therefore, if `src` and `dst` reference the same array, and the range from `srcOffset` + `count` -1 overlaps the range from `dstOffset` + `count` - 1, the values of the overlapping bytes are not overwritten before they are copied to the destination. In the following example, the values of bytes 0-16 in an array named `arr` are copied to bytes 12-28. Despite the overlapping range, the values of the source bytes are successfully copied. - :::code language="csharp" source="~/snippets/csharp/System/Buffer/Overview/overlap1.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Buffer/Overview/overlap1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Buffer.BlockCopy/FS/overlap1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Buffer/Overview/overlap1.vb" id="Snippet3"::: In the following example, the values of bytes 12-28 in an array named `arr` are copied to bytes 0-16. Again, despite the overlapping range, the values of the source bytes are successfully copied. - :::code language="csharp" source="~/snippets/csharp/System/Buffer/Overview/overlap1.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Buffer/Overview/overlap1.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Buffer.BlockCopy/FS/overlap1.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Buffer/Overview/overlap1.vb" id="Snippet4"::: @@ -245,7 +245,7 @@ ## Examples The following code example illustrates the use of the `ByteLength` method to return the number of bytes in an array. - :::code language="csharp" source="~/snippets/csharp/System/Buffer/ByteLength/bytelength.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Buffer/ByteLength/bytelength.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Buffer.Bytes/FS/bytelength.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Buffer/ByteLength/bytelength.vb" id="Snippet1"::: @@ -557,7 +557,7 @@ ## Examples The following code example assigns values to bytes at particular locations within arrays using the `SetByte` method. - :::code language="csharp" source="~/snippets/csharp/System/Buffer/ByteLength/setbyte.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Buffer/ByteLength/setbyte.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Buffer.Bytes/FS/setbyte.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Buffer/ByteLength/setbyte.vb" id="Snippet2"::: diff --git a/xml/System/Byte.xml b/xml/System/Byte.xml index 185852ac305..5c2f78e3b1e 100644 --- a/xml/System/Byte.xml +++ b/xml/System/Byte.xml @@ -720,7 +720,7 @@ ## Examples The following code example determines whether the first value is equal to the second value, and whether the first value is equal to the boxed version of the second value. - :::code language="csharp" source="~/snippets/csharp/System/Byte/Equals/eq.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/Equals/eq.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.byte.equals/fs/eq.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Byte/Equals/eq.vb" id="Snippet1"::: @@ -1463,7 +1463,7 @@ For , this method matches the IEEE 754: ## Examples The following example demonstrates how to convert a string value into a byte value using the method. The resulting byte value is then displayed to the console. - :::code language="csharp" source="~/snippets/csharp/System/Byte/Parse/parse.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/Parse/parse.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Byte.Parse/FS/parse.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Byte/Parse/parse.vb" id="Snippet1"::: @@ -1677,7 +1677,7 @@ For , this method matches the IEEE 754: ## Examples The following example parses string representations of `Byte` values with the method. The current culture for the example is en-US. - :::code language="csharp" source="~/snippets/csharp/System/Byte/Parse/parse.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/Parse/parse.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Byte.Parse/FS/parse.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Byte/Parse/parse.vb" id="Snippet3"::: @@ -1794,7 +1794,7 @@ For , this method matches the IEEE 754: ## Examples The following example parses string representations of `Byte` values with the method. - :::code language="csharp" source="~/snippets/csharp/System/Byte/Parse/parse.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/Parse/parse.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Byte.Parse/FS/parse.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Byte/Parse/parse.vb" id="Snippet2"::: @@ -2030,7 +2030,7 @@ For , this method matches the IEEE 754: ## Examples The following code example parses string representations of `Byte` values with this overload of the method. - :::code language="csharp" source="~/snippets/csharp/System/Byte/Parse/parse.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/Parse/parse.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Byte.Parse/FS/parse.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Byte/Parse/parse.vb" id="Snippet4"::: @@ -6073,7 +6073,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example displays an array of byte values. Note that the method is not called explicitly in the example. Instead, it is called implicitly, because of the use of the [composite formatting](/dotnet/standard/base-types/composite-formatting) feature, the F# example uses [string interpolation](/dotnet/fsharp/language-reference/interpolated-strings). - :::code language="csharp" source="~/snippets/csharp/System/Byte/ToString/NewByteMembers.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/ToString/NewByteMembers.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Byte.ToString/FS/NewByteMembers.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Byte/ToString/NewByteMembers.vb" id="Snippet2"::: @@ -6173,7 +6173,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example iterates an array of byte values and displays each of them to the console by calling the method with different format providers. - :::code language="csharp" source="~/snippets/csharp/System/Byte/ToString/NewByteMembers.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/ToString/NewByteMembers.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Byte.ToString/FS/NewByteMembers.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Byte/ToString/NewByteMembers.vb" id="Snippet3"::: @@ -6373,7 +6373,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example uses the standard "N" format string and four different objects to display the string representation of a byte value to the console. - :::code language="csharp" source="~/snippets/csharp/System/Byte/ToString/NewByteMembers.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/ToString/NewByteMembers.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Byte.ToString/FS/NewByteMembers.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Byte/ToString/NewByteMembers.vb" id="Snippet5"::: @@ -6736,7 +6736,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example calls the method with a number of different string values. - :::code language="csharp" source="~/snippets/csharp/System/Byte/TryParse/TryParse.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/TryParse/TryParse.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Byte.TryParse/fs/TryParse.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Byte/TryParse/TryParse.vb" id="Snippet1"::: @@ -7106,7 +7106,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example calls the method with a number of different string values. - :::code language="csharp" source="~/snippets/csharp/System/Byte/TryParse/TryParse2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/TryParse/TryParse2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Byte.TryParse/fs/TryParse2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Byte/TryParse/TryParse2.vb" id="Snippet2"::: diff --git a/xml/System/Char.xml b/xml/System/Char.xml index 735e2cda555..ec9acb518a3 100644 --- a/xml/System/Char.xml +++ b/xml/System/Char.xml @@ -260,7 +260,7 @@ . - :::code language="csharp" source="~/snippets/csharp/System/Char/Overview/charstructure.cs" interactive="try-dotnet" id="Snippet23"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/Overview/charstructure.cs" id="Snippet23"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char/FS/charstructure.fs" id="Snippet23"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/Overview/charstructure.vb" id="Snippet23"::: ]]> @@ -461,7 +461,7 @@ The following code example demonstrates some of the methods in . - :::code language="csharp" source="~/snippets/csharp/System/Char/CompareTo/compareto.cs" interactive="try-dotnet" id="Snippet19"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/CompareTo/compareto.cs" id="Snippet19"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.CompareTo/FS/compareto.fs" id="Snippet19"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/CompareTo/compareto.vb" id="Snippet19"::: @@ -531,7 +531,7 @@ The following code example demonstrates some of the methods in and methods. - :::code language="csharp" source="~/snippets/csharp/System/Char/ConvertFromUtf32/utf.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/ConvertFromUtf32/utf.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/char.cvtutf32/FS/utf.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/ConvertFromUtf32/utf.vb" id="Snippet1"::: @@ -561,7 +561,7 @@ The following code example demonstrates some of the methods in and methods. - :::code language="csharp" source="~/snippets/csharp/System/Char/ConvertFromUtf32/utf.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/ConvertFromUtf32/utf.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/char.cvtutf32/FS/utf.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/ConvertFromUtf32/utf.vb" id="Snippet1"::: @@ -837,7 +837,7 @@ The following code example demonstrates some of the methods in . - :::code language="csharp" source="~/snippets/csharp/System/Char/Equals/equals.cs" interactive="try-dotnet" id="Snippet20"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/Equals/equals.cs" id="Snippet20"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.Equals/FS/equals.fs" id="Snippet20"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/Equals/equals.vb" id="Snippet20"::: @@ -961,7 +961,7 @@ The following code example demonstrates some of the methods in method assumes that `c` corresponds to a single linguistic character and checks whether that character can be converted to a decimal digit. However, some numbers in the Unicode standard are represented by two objects that form a surrogate pair. For example, the Aegean numbering system consists of code points U+10107 through U+10133. The following example uses the method to instantiate a string that represents AEGEAN NUMBER ONE. As the output from the example shows, the method returns -1 if it is passed either a high surrogate or a low surrogate of this character. - :::code language="csharp" source="~/snippets/csharp/System/Char/GetNumericValue/getnumericvalue1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/GetNumericValue/getnumericvalue1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.GetNumericValue/FS/getnumericvalue1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/GetNumericValue/getnumericvalue1.vb" id="Snippet2"::: @@ -970,7 +970,7 @@ The following code example demonstrates some of the methods in . - :::code language="csharp" source="~/snippets/csharp/System/Char/GetNumericValue/getnumericvalue.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/GetNumericValue/getnumericvalue.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.GetNumericValue/FS/getnumericvalue.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/GetNumericValue/getnumericvalue.vb" id="Snippet1"::: @@ -1045,7 +1045,7 @@ The following code example demonstrates some of the methods in object at position `index` is the first character of a valid surrogate pair, the method determines whether the surrogate pair forms a numeric digit. For example, the Aegean numbering system consists of code points U+10107 through U+10133. The following example uses the method to instantiate a string that represents each Aegean number. As the output from the example shows, the method returns the correct numeric value if it is passed the high surrogate of an Aegean number. However, if it is passed the low surrogate, it considers only the low surrogate in isolation and returns -1. - :::code language="csharp" source="~/snippets/csharp/System/Char/GetNumericValue/getnumericvalue1.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/GetNumericValue/getnumericvalue1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.GetNumericValue/FS/getnumericvalue1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/GetNumericValue/getnumericvalue1.vb" id="Snippet3"::: @@ -1054,7 +1054,7 @@ The following code example demonstrates some of the methods in . - :::code language="csharp" source="~/snippets/csharp/System/Char/GetNumericValue/getnumericvalue.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/GetNumericValue/getnumericvalue.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.GetNumericValue/FS/getnumericvalue.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/GetNumericValue/getnumericvalue.vb" id="Snippet1"::: @@ -1126,7 +1126,7 @@ The following code example demonstrates some of the methods in . - :::code language="csharp" source="~/snippets/csharp/System/Char/GetUnicodeCategory/getunicodecategory.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/GetUnicodeCategory/getunicodecategory.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.GetUnicodeCategory/FS/getunicodecategory.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/GetUnicodeCategory/getunicodecategory.vb" id="Snippet1"::: @@ -1785,7 +1785,7 @@ The method does not validate that `maxInclusive` is greater than or equal ## Examples The following example lists the Unicode code point of each of the control characters. - :::code language="csharp" source="~/snippets/csharp/System/Char/IsControl/IsControl1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/IsControl/IsControl1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.IsControl/FS/IsControl1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/IsControl/IsControl1.vb" id="Snippet1"::: @@ -1886,7 +1886,7 @@ The method does not validate that `maxInclusive` is greater than or equal ## Examples The following code example demonstrates . - :::code language="csharp" source="~/snippets/csharp/System/Char/IsDigit/isdigit.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/IsDigit/isdigit.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.IsDigit/FS/isdigit.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/IsDigit/isdigit.vb" id="Snippet4"::: @@ -2048,7 +2048,7 @@ The method does not validate that `maxInclusive` is greater than or equal ## Examples The following code example demonstrates the , , and methods. - :::code language="csharp" source="~/snippets/csharp/System/Char/IsHighSurrogate/sur.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/IsHighSurrogate/sur.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/char.surrogate/FS/sur.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/IsHighSurrogate/sur.vb" id="Snippet1"::: @@ -2208,7 +2208,7 @@ The method does not validate that `maxInclusive` is greater than or equal The following code example demonstrates . - :::code language="csharp" source="~/snippets/csharp/System/Char/IsLetter/isletter.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/IsLetter/isletter.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.IsLetter/FS/isletter.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/IsLetter/isletter.vb" id="Snippet5"::: @@ -2386,7 +2386,7 @@ The following code example demonstrates . ## Examples The following code example demonstrates . - :::code language="csharp" source="~/snippets/csharp/System/Char/IsLetterOrDigit/isletterordigit.cs" interactive="try-dotnet" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/IsLetterOrDigit/isletterordigit.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.IsLetterOrDigit/FS/isletterordigit.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/IsLetterOrDigit/isletterordigit.vb" id="Snippet6"::: @@ -2548,7 +2548,7 @@ The following code example demonstrates . ## Examples The following code example demonstrates . - :::code language="csharp" source="~/snippets/csharp/System/Char/IsLower/islower.cs" interactive="try-dotnet" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/IsLower/islower.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.IsLower/FS/islower.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/IsLower/islower.vb" id="Snippet7"::: @@ -2708,7 +2708,7 @@ The following code example demonstrates . ## Examples The following code example demonstrates the , , and methods. - :::code language="csharp" source="~/snippets/csharp/System/Char/IsHighSurrogate/sur.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/IsHighSurrogate/sur.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/char.surrogate/FS/sur.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/IsHighSurrogate/sur.vb" id="Snippet1"::: @@ -2911,7 +2911,7 @@ The following code example demonstrates . The method assumes that `c` corresponds to a single linguistic character and checks whether that character represents a number. However, some numbers in the Unicode standard are represented by two objects that form a surrogate pair. For example, the Aegean numbering system consists of code points U+10107 through U+10133. The following example uses the method to instantiate a string that represents AEGEAN NUMBER ONE. As the output from the example shows, the method returns `false` if it is passed either a high surrogate or a low surrogate of this character. - :::code language="csharp" source="~/snippets/csharp/System/Char/IsNumber/isnumber1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/IsNumber/isnumber1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.IsNumber/FS/isnumber1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/IsNumber/isnumber1.vb" id="Snippet1"::: @@ -2920,7 +2920,7 @@ The following code example demonstrates . ## Examples The following example demonstrates . - :::code language="csharp" source="~/snippets/csharp/System/Char/IsNumber/isnumber.cs" interactive="try-dotnet" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/IsNumber/isnumber.cs" id="Snippet8"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.IsNumber/FS/isnumber.fs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/IsNumber/isnumber.vb" id="Snippet8"::: @@ -3001,7 +3001,7 @@ The following code example demonstrates . If the object at position `index` is the first character of a valid surrogate pair, the method determines whether the surrogate pair forms a numeric digit. For example, the Aegean numbering system consists of code points U+10107 through U+10133. The following example uses the method to instantiate a string that represents AEGEAN NUMBER ONE. As the output from the example shows, the method returns `true` if it is passed the high surrogate of AEGEAN NUMBER ONE. However, if it is passed the low surrogate, it considers only the category of the low surrogate and returns `false`. - :::code language="csharp" source="~/snippets/csharp/System/Char/IsNumber/isnumber1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/IsNumber/isnumber1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.IsNumber/FS/isnumber1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/IsNumber/isnumber1.vb" id="Snippet2"::: @@ -3010,7 +3010,7 @@ The following code example demonstrates . ## Examples The following example demonstrates . - :::code language="csharp" source="~/snippets/csharp/System/Char/IsNumber/isnumber.cs" interactive="try-dotnet" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/IsNumber/isnumber.cs" id="Snippet8"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.IsNumber/FS/isnumber.fs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/IsNumber/isnumber.vb" id="Snippet8"::: @@ -3140,7 +3140,7 @@ The following code example demonstrates . ## Examples The following code example demonstrates . - :::code language="csharp" source="~/snippets/csharp/System/Char/IsPunctuation/ispunctuation.cs" interactive="try-dotnet" id="Snippet9"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/IsPunctuation/ispunctuation.cs" id="Snippet9"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.IsPunctuation/FS/ispunctuation.fs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/IsPunctuation/ispunctuation.vb" id="Snippet9"::: @@ -3568,7 +3568,7 @@ The following code example demonstrates . ## Examples The following example lists the objects that are classified as separator characters. - :::code language="csharp" source="~/snippets/csharp/System/Char/IsSeparator/isseparator1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/IsSeparator/isseparator1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.IsSeparator/FS/isseparator1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/IsSeparator/isseparator1.vb" id="Snippet1"::: @@ -3655,7 +3655,7 @@ The following code example demonstrates . ## Examples The following example demonstrates . - :::code language="csharp" source="~/snippets/csharp/System/Char/IsSeparator/isseparator.cs" interactive="try-dotnet" id="Snippet10"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/IsSeparator/isseparator.cs" id="Snippet10"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.IsSeparator/FS/isseparator.fs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/IsSeparator/isseparator.vb" id="Snippet10"::: @@ -3686,7 +3686,7 @@ The following code example demonstrates . ## Examples The following example demonstrates the method. - :::code language="csharp" source="~/snippets/csharp/System/Char/IsSurrogate/issurrogate.cs" interactive="try-dotnet" id="Snippet11"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/IsSurrogate/issurrogate.cs" id="Snippet11"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.IsSurrogate/FS/issurrogate.fs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/IsSurrogate/issurrogate.vb" id="Snippet11"::: @@ -3841,7 +3841,7 @@ The following code example demonstrates . ## Examples The following code example demonstrates the , , and methods. - :::code language="csharp" source="~/snippets/csharp/System/Char/IsHighSurrogate/sur.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/IsHighSurrogate/sur.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/char.surrogate/FS/sur.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/IsHighSurrogate/sur.vb" id="Snippet1"::: @@ -4012,7 +4012,7 @@ The following code example demonstrates . ## Examples The following code example demonstrates . - :::code language="csharp" source="~/snippets/csharp/System/Char/IsSymbol/issymbol.cs" interactive="try-dotnet" id="Snippet12"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/IsSymbol/issymbol.cs" id="Snippet12"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.IsSymbol/FS/issymbol.fs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/IsSymbol/issymbol.vb" id="Snippet12"::: @@ -4362,7 +4362,7 @@ The following code example demonstrates . ## Examples The following example demonstrates the method. - :::code language="csharp" source="~/snippets/csharp/System/Char/IsWhiteSpace/iswhitespace.cs" interactive="try-dotnet" id="Snippet14"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/IsWhiteSpace/iswhitespace.cs" id="Snippet14"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.IsWhiteSpace/FS/iswhitespace.fs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/IsWhiteSpace/iswhitespace.vb" id="Snippet14"::: @@ -4680,7 +4680,7 @@ The following code example demonstrates . ## Examples The following code example demonstrates . - :::code language="csharp" source="~/snippets/csharp/System/Char/Parse/parse.cs" interactive="try-dotnet" id="Snippet15"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/Parse/parse.cs" id="Snippet15"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.Parse/FS/parse.fs" id="Snippet15"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/Parse/parse.vb" id="Snippet15"::: @@ -9249,7 +9249,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example demonstrates . - :::code language="csharp" source="~/snippets/csharp/System/Char/ToLower/tolower.cs" interactive="try-dotnet" id="Snippet16"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/ToLower/tolower.cs" id="Snippet16"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.ToLower/FS/tolower.fs" id="Snippet16"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/ToLower/tolower.vb" id="Snippet16"::: @@ -9473,7 +9473,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following code example demonstrates . - :::code language="csharp" source="~/snippets/csharp/System/Char/ToString/tostring.cs" interactive="try-dotnet" id="Snippet17"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/ToString/tostring.cs" id="Snippet17"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Char.ToString/FS/tostring.fs" id="Snippet17"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/ToString/tostring.vb" id="Snippet17"::: @@ -9731,7 +9731,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example converts each character in an array to its uppercase equivalent. - :::code language="csharp" source="~/snippets/csharp/System/Char/ToUpper/toupper1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/ToUpper/toupper1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.char.toupper/fs/toupper1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/ToUpper/toupper1.vb" id="Snippet1"::: @@ -9807,7 +9807,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example converts each character in an array to its uppercase equivalent for the en-US culture, the invariant culture, and the tr-TR culture. In this example, the uppercase equivalent of each lowercase letter is identical for all cultures except for one case. The lowercase "i" character (U+0069) converts to "I" (U+0049) in the en-US and invariant cultures, but to "İ" (U+0130) in the tr-TR culture. - :::code language="csharp" source="~/snippets/csharp/System/Char/ToUpper/toupper5.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Char/ToUpper/toupper5.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.char.toupper/fs/toupper5.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Char/ToUpper/toupper5.vb" id="Snippet2"::: diff --git a/xml/System/Comparison`1.xml b/xml/System/Comparison`1.xml index 7d697b175bf..bc4c7a6477e 100644 --- a/xml/System/Comparison`1.xml +++ b/xml/System/Comparison`1.xml @@ -107,13 +107,13 @@ A of strings is created and populated with four strings, in no particular order. The list also includes an empty string and a null reference. The list is displayed, sorted using a generic delegate representing the `CompareDinosByLength` method, and displayed again. - :::code language="csharp" source="~/snippets/csharp/System/ComparisonT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/ComparisonT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/List`1_SortComparison/fs/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/ComparisonT/Overview/source.vb" id="Snippet1"::: The following example uses the delegate to sort the elements of a collection of `CityInfo` objects. `CityInfo` is an application-defined class that contains information about a city and its population. The example defines three methods, `CompareByName`, `CompareByPopulation`, and `CompareByNames`, that offer three different ways of ordering the `CityInfo` objects. Each method is assigned to the `comparison` argument of the method. - :::code language="csharp" source="~/snippets/csharp/System/ComparisonT/Overview/comparisont1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/ComparisonT/Overview/comparisont1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.comparison`1/fs/comparisont1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/ComparisonT/Overview/comparisont1.vb" id="Snippet1"::: diff --git a/xml/System/Console.xml b/xml/System/Console.xml index 90f8b8a28fe..c134e8b78da 100644 --- a/xml/System/Console.xml +++ b/xml/System/Console.xml @@ -5891,7 +5891,7 @@ This method can be used to reacquire the standard output stream after it has bee ## Examples The example changes the line terminator from its default value of "\r\n" or `vbCrLf` to "\r\n\r\n" or `vbCrLf` + `vbCrLf`. It then calls the and methods to display output to the console. - :::code language="csharp" source="~/snippets/csharp/System/Console/WriteLine/newline1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Console/WriteLine/newline1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Console.WriteLine/FS/newline1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Console/WriteLine/newline1.vb" id="Snippet2"::: @@ -5960,7 +5960,7 @@ This method can be used to reacquire the standard output stream after it has bee ## Examples The following example generates ten random integers and uses the method to indicate whether they are even. - :::code language="csharp" source="~/snippets/csharp/System/Console/WriteLine/writeline_boolean1.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Console/WriteLine/writeline_boolean1.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Console.WriteLine/FS/writeline_boolean1.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Console/WriteLine/writeline_boolean1.vb" id="Snippet4"::: @@ -6418,7 +6418,7 @@ This method can be used to reacquire the standard output stream after it has bee ## Examples The following example uses the method to display each value in an object array to the console. - :::code language="csharp" source="~/snippets/csharp/System/Console/WriteLine/writeline_obj1.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Console/WriteLine/writeline_obj1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Console.WriteLine/FS/writeline_obj1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Console/WriteLine/writeline_obj1.vb" id="Snippet3"::: @@ -6580,7 +6580,7 @@ This method can be used to reacquire the standard output stream after it has bee ## Examples The example changes the line terminator from its default value of "\r\n" or `vbCrLf` to "\r\n\r\n" or `vbCrLf` + `vbCrLf`. It then calls the and methods to display output to the console. - :::code language="csharp" source="~/snippets/csharp/System/Console/WriteLine/newline1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Console/WriteLine/newline1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Console.WriteLine/FS/newline1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Console/WriteLine/newline1.vb" id="Snippet2"::: @@ -6826,7 +6826,7 @@ This method can be used to reacquire the standard output stream after it has bee ## Examples The following example calls the method to display five randomly generated values. - :::code language="csharp" source="~/snippets/csharp/System/Console/WriteLine/WriteLine6.cs" interactive="try-dotnet-method" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/Console/WriteLine/WriteLine6.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Console.WriteLine/FS/WriteLine6.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Console/WriteLine/WriteLine6.vb" id="Snippet6"::: diff --git a/xml/System/Convert.xml b/xml/System/Convert.xml index ae949c28536..db7ba975cbe 100644 --- a/xml/System/Convert.xml +++ b/xml/System/Convert.xml @@ -195,13 +195,13 @@ The method can convert an enumeration value to another type. However, it cannot convert another type to an enumeration value, even if the source type is the underlying type of the enumeration. To convert a type to an enumeration value, use a casting operator (in C#) or a conversion function (in Visual Basic). The following example illustrates the conversion to and from a Continent enumeration value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ChangeType/changetype_enum2.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ChangeType/changetype_enum2.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ChangeType/changetype_enum2.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ChangeType/changetype_enum2.vb" id="Snippet5"::: The method can convert a nullable type to another type. However, it cannot convert another type to a value of a nullable type, even if is the underlying type of the .To perform the conversion, you can use a casting operator (in C#) or a conversion function (in Visual Basic). The following example illustrates the conversion to and from a nullable type. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ChangeType/changetype_nullable.cs" interactive="try-dotnet" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ChangeType/changetype_nullable.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ChangeType/changetype_nullable.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ChangeType/changetype_nullable.vb" id="Snippet7"::: @@ -416,13 +416,13 @@ The method can convert an enumeration value to another type. However, it cannot convert another type to an enumeration value, even if the source type is the underlying type of the enumeration. To convert a type to an enumeration value, use a casting operator (in C#) or a conversion function (in Visual Basic). The following example illustrates the conversion to and from a Continent enumeration value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ChangeType/changetype_enum2.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ChangeType/changetype_enum2.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ChangeType/changetype_enum2.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ChangeType/changetype_enum2.vb" id="Snippet5"::: The method can convert a nullable type to another type. However, it cannot convert another type to a value of a nullable type, even if is the underlying type of the . To perform the conversion, you can use a casting operator (in C#) or a conversion function (in Visual Basic). The following example illustrates the conversion to and from a nullable type. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ChangeType/changetype_nullable_1.cs" interactive="try-dotnet" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ChangeType/changetype_nullable_1.cs" id="Snippet8"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ChangeType/changetype_nullable_1.fs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ChangeType/changetype_nullable_1.vb" id="Snippet8"::: @@ -672,7 +672,7 @@ If an integral number of 3-byte groups does not exist, the remaining bytes are effectively padded with zeros to form a complete group. In this example, the value of the last byte is hexadecimal FF. The first 6 bits are equal to decimal 63, which corresponds to the base-64 digit "/" at the end of the output, and the next 2 bits are padded with zeros to yield decimal 48, which corresponds to the base-64 digit, "w". The last two 6-bit values are padding and correspond to the valueless padding character, "=". - :::code language="csharp" source="~/snippets/csharp/System/Convert/FromBase64CharArray/tb64ca.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/FromBase64CharArray/tb64ca.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/FromBase64CharArray/tb64ca.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/FromBase64CharArray/tb64ca.vb" id="Snippet1"::: @@ -767,13 +767,13 @@ ## Examples The following example uses the method to convert a byte array to a UUencoded (base-64) string, and then calls the method to restore the original byte array. - :::code language="csharp" source="~/snippets/csharp/System/Base64FormattingOptions/Overview/ToBase64String2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Base64FormattingOptions/Overview/ToBase64String2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Base64FormattingOptions/Overview/ToBase64String2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Base64FormattingOptions/Overview/ToBase64String2.vb" id="Snippet1"::: The following is a more complex example that creates a 20-element array of 32-bit integers. It then uses the method to convert each element into a byte array, which it stores in the appropriate position in a buffer by calling the method. This buffer is then passed to the method to create a UUencoded (base-64) string. It then calls the method to decode the UUencoded string, and calls the method to convert each set of four bytes (the size of a 32-bit integer) to an integer. The output from the example shows that the original array has been successfully restored. - :::code language="csharp" source="~/snippets/csharp/System/Base64FormattingOptions/Overview/ToBase64String.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Base64FormattingOptions/Overview/ToBase64String.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Base64FormattingOptions/Overview/ToBase64String.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Base64FormattingOptions/Overview/ToBase64String.vb" id="Snippet2"::: @@ -1383,7 +1383,7 @@ If an integral number of 3-byte groups does not exist, the remaining bytes are effectively padded with zeros to form a complete group. In this example, the value of the last byte is hexadecimal FF. The first 6 bits are equal to decimal 63, which corresponds to the base-64 digit "/" at the end of the output, and the next 2 bits are padded with zeros to yield decimal 48, which corresponds to the base-64 digit, "w". The last two 6-bit values are padding and correspond to the valueless padding character, "=". - :::code language="csharp" source="~/snippets/csharp/System/Convert/FromBase64CharArray/tb64ca.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/FromBase64CharArray/tb64ca.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/FromBase64CharArray/tb64ca.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/FromBase64CharArray/tb64ca.vb" id="Snippet1"::: @@ -1487,13 +1487,13 @@ ## Examples The following example uses the method to convert a byte array to a UUencoded (base-64) string, and then calls the method to restore the original byte array. - :::code language="csharp" source="~/snippets/csharp/System/Base64FormattingOptions/Overview/ToBase64String2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Base64FormattingOptions/Overview/ToBase64String2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Base64FormattingOptions/Overview/ToBase64String2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Base64FormattingOptions/Overview/ToBase64String2.vb" id="Snippet1"::: The following is a more complex example that creates a 20-element array of 32-bit integers. It then uses the method to convert each element into a byte array, which it stores in the appropriate position in a buffer by calling the method. This buffer is then passed to the method to create a UUencoded (base-64) string. It then calls the method to decode the UUencoded string, and calls the method to convert each set of four bytes (the size of a 32-bit integer) to an integer. The output from the example shows that the original array has been successfully restored. - :::code language="csharp" source="~/snippets/csharp/System/Base64FormattingOptions/Overview/ToBase64String.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Base64FormattingOptions/Overview/ToBase64String.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Base64FormattingOptions/Overview/ToBase64String.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Base64FormattingOptions/Overview/ToBase64String.vb" id="Snippet2"::: @@ -1576,7 +1576,7 @@ ## Examples The following example calls the with a argument to insert line breaks in the string that is produced by encoding a 100-element byte array. - :::code language="csharp" source="~/snippets/csharp/System/Base64FormattingOptions/Overview/ToBase64String3.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Base64FormattingOptions/Overview/ToBase64String3.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Base64FormattingOptions/Overview/ToBase64String3.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Base64FormattingOptions/Overview/ToBase64String3.vb" id="Snippet3"::: @@ -1806,7 +1806,7 @@ If an integral number of 3-byte groups does not exist, the remaining bytes are effectively padded with zeros to form a complete group. In this example, the value of the last byte is hexadecimal FF. The first 6 bits are equal to decimal 63, which corresponds to the base-64 digit "/" at the end of the output, and the next 2 bits are padded with zeros to yield decimal 48, which corresponds to the base-64 digit, "w". The last two 6-bit values are padding and correspond to the valueless padding character, "=". - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBase64String/tb64s.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBase64String/tb64s.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToBase64String/tb64s.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToBase64String/tb64s.vb" id="Snippet1"::: @@ -1946,7 +1946,7 @@ ## Examples The following example converts an array of values to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" interactive="try-dotnet-method" id="Snippet12"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" id="Snippet12"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToBoolean/toboolean2.fs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToBoolean/toboolean2.vb" id="Snippet12"::: @@ -2120,7 +2120,7 @@ ## Examples The following example converts an array of values to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToBoolean/toboolean2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToBoolean/toboolean2.vb" id="Snippet2"::: @@ -2248,7 +2248,7 @@ ## Examples The following example converts an array of values to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToBoolean/toboolean2.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToBoolean/toboolean2.vb" id="Snippet3"::: @@ -2312,7 +2312,7 @@ ## Examples The following example converts an array of values to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToBoolean/toboolean2.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToBoolean/toboolean2.vb" id="Snippet4"::: @@ -2376,7 +2376,7 @@ ## Examples The following example converts an array of values to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToBoolean/toboolean2.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToBoolean/toboolean2.vb" id="Snippet5"::: @@ -2448,7 +2448,7 @@ ## Examples The following example converts an array of object values to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" interactive="try-dotnet-method" id="Snippet11"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" id="Snippet11"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToBoolean/toboolean2.fs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToBoolean/toboolean2.vb" id="Snippet11"::: @@ -2526,7 +2526,7 @@ ## Examples The following example converts an array of values to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" interactive="try-dotnet-method" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToBoolean/toboolean2.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToBoolean/toboolean2.vb" id="Snippet6"::: @@ -2590,7 +2590,7 @@ ## Examples The following example converts an array of values to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" interactive="try-dotnet-method" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToBoolean/toboolean2.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToBoolean/toboolean2.vb" id="Snippet7"::: @@ -2669,7 +2669,7 @@ ## Examples The following example uses the method to convert various strings to Boolean values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/ToBoolean1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/ToBoolean1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToBoolean/ToBoolean1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToBoolean/ToBoolean1.vb" id="Snippet1"::: @@ -2741,7 +2741,7 @@ ## Examples The following example converts an array of values to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" interactive="try-dotnet-method" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" id="Snippet8"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToBoolean/toboolean2.fs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToBoolean/toboolean2.vb" id="Snippet8"::: @@ -2811,7 +2811,7 @@ ## Examples The following example converts an array of values to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" interactive="try-dotnet-method" id="Snippet9"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" id="Snippet9"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToBoolean/toboolean2.fs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToBoolean/toboolean2.vb" id="Snippet9"::: @@ -2881,7 +2881,7 @@ ## Examples The following example converts an array of values to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" interactive="try-dotnet-method" id="Snippet10"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToBoolean/toboolean2.cs" id="Snippet10"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToBoolean/toboolean2.fs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToBoolean/toboolean2.vb" id="Snippet10"::: @@ -3115,7 +3115,7 @@ ## Examples The following example illustrates the conversion of to values. - :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Byte/Overview/tobyte1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/tobyte1.vb" id="Snippet1"::: @@ -3232,7 +3232,7 @@ ## Examples The following example converts an array of values to values. - :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Byte/Overview/tobyte1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/tobyte1.vb" id="Snippet2"::: @@ -3475,7 +3475,7 @@ ## Examples The following example converts an array of values to values. - :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte1.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Byte/Overview/tobyte1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/tobyte1.vb" id="Snippet3"::: @@ -3539,7 +3539,7 @@ ## Examples The following example converts an array of values to values. - :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte1.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte1.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Byte/Overview/tobyte1.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/tobyte1.vb" id="Snippet4"::: @@ -3603,7 +3603,7 @@ ## Examples The following example converts an array of values to values. - :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte1.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte1.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Byte/Overview/tobyte1.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/tobyte1.vb" id="Snippet5"::: @@ -3673,7 +3673,7 @@ ## Examples The following example uses the method to convert an array of objects to values. - :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte1.cs" interactive="try-dotnet-method" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte1.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/Byte/Overview/tobyte1.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/tobyte1.vb" id="Snippet6"::: @@ -3751,7 +3751,7 @@ ## Examples The following example converts an array of values to values. - :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte1.cs" interactive="try-dotnet-method" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte1.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/Byte/Overview/tobyte1.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/tobyte1.vb" id="Snippet7"::: @@ -3887,7 +3887,7 @@ ## Examples The following example defines a string array and attempts to convert each string to a . Note that while a `null` string parses to zero, throws a . Also note that while leading and trailing spaces parse successfully, formatting symbols, such as currency symbols, group separators, or decimal separators, do not. - :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/ToByte5.cs" interactive="try-dotnet" id="Snippet15"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/ToByte5.cs" id="Snippet15"::: :::code language="fsharp" source="~/snippets/fsharp/System/Byte/Overview/ToByte5.fs" id="Snippet15"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/tobyte5.vb" id="Snippet15"::: @@ -3960,7 +3960,7 @@ ## Examples The following example converts an array of unsigned 16-bit integers to values. - :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte1.cs" interactive="try-dotnet-method" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte1.cs" id="Snippet8"::: :::code language="fsharp" source="~/snippets/fsharp/System/Byte/Overview/tobyte1.fs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/tobyte1.vb" id="Snippet8"::: @@ -4030,7 +4030,7 @@ ## Examples The following example converts an array of unsigned integers to values. - :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte1.cs" interactive="try-dotnet-method" id="Snippet9"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte1.cs" id="Snippet9"::: :::code language="fsharp" source="~/snippets/fsharp/System/Byte/Overview/tobyte1.fs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/tobyte1.vb" id="Snippet9"::: @@ -4100,7 +4100,7 @@ ## Examples The following example converts an array of unsigned long integers to values. - :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte1.cs" interactive="try-dotnet-method" id="Snippet10"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte1.cs" id="Snippet10"::: :::code language="fsharp" source="~/snippets/fsharp/System/Byte/Overview/tobyte1.fs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/tobyte1.vb" id="Snippet10"::: @@ -4260,7 +4260,7 @@ ## Examples The following example creates a custom object that defines the positive sign as "pos" and the negative sign as "neg", which it uses in calls to the method. It then calls the method repeatedly to convert each element in a string array to a value. - :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte4.cs" interactive="try-dotnet" id="Snippet14"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte4.cs" id="Snippet14"::: :::code language="fsharp" source="~/snippets/fsharp/System/Byte/Overview/tobyte4.fs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/tobyte4.vb" id="Snippet14"::: @@ -4332,13 +4332,13 @@ Because the data type supports unsigned values only, the method assumes that `value` is expressed using unsigned binary representation. In other words, all eight bits are used to represent the numeric value, and a sign bit is absent. As a result, it is possible to write code in which a signed byte value that is out of the range of the data type is converted to a value without the method throwing an exception. The following example converts to its hexadecimal string representation, and then calls the method. Instead of throwing an exception, the method displays the message, "0x80 converts to 128." - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToByte/Conversion.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToByte/Conversion.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToByte/Conversion.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/Conversion.vb" id="Snippet3"::: When performing binary operations or numeric conversions, it is always the responsibility of the developer to verify that a method or operator is using the appropriate numeric representation to interpret a particular value. The following example illustrates one technique for ensuring that the method does not inappropriately use unsigned binary representation when it converts a hexadecimal string representation to a value. The example determines whether a value represents a signed or an unsigned integer while it is converting that value to its string representation. When the example converts the value back to a value, it checks whether the original value was a signed integer. If so, and if its high-order bit is set (which indicates that the value is negative and that it uses two's complement instead of unsigned binary representation), the method throws an exception. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToByte/Conversion.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToByte/Conversion.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToByte/Conversion.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/Conversion.vb" id="Snippet4"::: @@ -4347,7 +4347,7 @@ ## Examples The following example alternately attempts to interpret an array of strings as the representation of binary, octal, decimal, and hexadecimal values. - :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte2.cs" interactive="try-dotnet" id="Snippet11"::: + :::code language="csharp" source="~/snippets/csharp/System/Byte/Overview/tobyte2.cs" id="Snippet11"::: :::code language="fsharp" source="~/snippets/fsharp/System/Byte/Overview/tobyte2.fs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/tobyte2.vb" id="Snippet11"::: @@ -4484,7 +4484,7 @@ ## Examples The following example converts an array of unsigned bytes to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToChar/tochar1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToChar/tochar1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToChar/tochar1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToChar/tochar1.vb" id="Snippet1"::: @@ -4753,7 +4753,7 @@ ## Examples The following example converts an array of signed 16-bit integers to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToChar/tochar1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToChar/tochar1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToChar/tochar1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToChar/tochar1.vb" id="Snippet2"::: @@ -4817,7 +4817,7 @@ ## Examples The following example converts an array of signed integers to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToChar/tochar1.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToChar/tochar1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToChar/tochar1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToChar/tochar1.vb" id="Snippet3"::: @@ -5029,7 +5029,7 @@ ## Examples The following example converts an array of signed bytes to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToChar/tochar1.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToChar/tochar1.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToChar/tochar1.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToChar/tochar1.vb" id="Snippet4"::: @@ -5149,7 +5149,7 @@ ## Examples The following example converts each element in a string array to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToChar/tochar1.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToChar/tochar1.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToChar/tochar1.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToChar/tochar1.vb" id="Snippet5"::: @@ -5220,7 +5220,7 @@ ## Examples The following example converts each element in an array of unsigned 16-bit integers to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToChar/tochar1.cs" interactive="try-dotnet-method" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToChar/tochar1.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToChar/tochar1.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToChar/tochar1.vb" id="Snippet6"::: @@ -5288,7 +5288,7 @@ ## Examples The following example converts each element in an array of unsigned integers to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToChar/tochar1.cs" interactive="try-dotnet-method" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToChar/tochar1.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToChar/tochar1.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToChar/tochar1.vb" id="Snippet7"::: @@ -5358,7 +5358,7 @@ ## Examples The following example converts each element in an array of unsigned long integers to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToChar/tochar1.cs" interactive="try-dotnet-method" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToChar/tochar1.cs" id="Snippet8"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToChar/tochar1.fs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToChar/tochar1.vb" id="Snippet8"::: @@ -6563,7 +6563,7 @@ ## Examples The following example converts string representations of date values with the `ToDateTime` method, using an object. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDateTime/ToDateTime3.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDateTime/ToDateTime3.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDateTime/ToDateTime3.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDateTime/ToDateTime3.vb" id="Snippet3"::: @@ -6640,7 +6640,7 @@ ## Examples The following example illustrates the conversion of to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/todecimal11.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/todecimal11.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDecimal/todecimal11.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDecimal/todecimal11.vb" id="Snippet1"::: @@ -6928,7 +6928,7 @@ ## Remarks The value returned by this method contains a maximum of 15 significant digits. If the `value` parameter contains more than 15 significant digits, it is rounded using rounding to nearest. The following example illustrates how the method uses rounding to nearest to return a value with 15 significant digits. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/ToDecimal1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/ToDecimal1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDecimal/ToDecimal1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDecimal/ToDecimal1.vb" id="Snippet2"::: @@ -7003,7 +7003,7 @@ ## Examples The following example converts an array of 16-bit signed integers to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/todecimal11.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/todecimal11.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDecimal/todecimal11.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDecimal/todecimal11.vb" id="Snippet2"::: @@ -7066,7 +7066,7 @@ ## Examples The following example converts an array of signed integers to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/todecimal11.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/todecimal11.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDecimal/todecimal11.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDecimal/todecimal11.vb" id="Snippet3"::: @@ -7198,7 +7198,7 @@ ## Examples The following example tries to convert each element in an object array to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/todecimal11.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/todecimal11.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDecimal/todecimal11.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDecimal/todecimal11.vb" id="Snippet4"::: @@ -7277,7 +7277,7 @@ ## Examples The following example converts each element in an array of signed bytes to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/todecimal11.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/todecimal11.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDecimal/todecimal11.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDecimal/todecimal11.vb" id="Snippet5"::: @@ -7340,7 +7340,7 @@ ## Remarks The value returned by this method contains a maximum of seven significant digits. If the `value` parameter contains more than seven significant digits, it is rounded using rounding to nearest. The following example illustrates how the method uses rounding to nearest to return a value with seven significant digits. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/ToDecimal1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/ToDecimal1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDecimal/ToDecimal1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDecimal/ToDecimal1.vb" id="Snippet1"::: @@ -7349,7 +7349,7 @@ ## Examples The following example tries to convert each element in an array of values to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/todecimal11.cs" interactive="try-dotnet-method" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/todecimal11.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDecimal/todecimal11.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDecimal/todecimal11.vb" id="Snippet6"::: @@ -7492,7 +7492,7 @@ ## Examples The following example converts an array of 16-bit unsigned integers to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/todecimal11.cs" interactive="try-dotnet-method" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/todecimal11.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDecimal/todecimal11.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDecimal/todecimal11.vb" id="Snippet7"::: @@ -7561,7 +7561,7 @@ ## Examples The following example converts an array of unsigned integers to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/todecimal11.cs" interactive="try-dotnet-method" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/todecimal11.cs" id="Snippet8"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDecimal/todecimal11.fs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDecimal/todecimal11.vb" id="Snippet8"::: @@ -7630,7 +7630,7 @@ ## Examples The following example converts an array of unsigned long integers to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/todecimal11.cs" interactive="try-dotnet-method" id="Snippet9"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/todecimal11.cs" id="Snippet9"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDecimal/todecimal11.fs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDecimal/todecimal11.vb" id="Snippet9"::: @@ -7794,7 +7794,7 @@ ## Examples The following example attempts to convert an array of strings to values by using objects that represent two different cultures. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/todecimal3.cs" interactive="try-dotnet" id="Snippet12"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDecimal/todecimal3.cs" id="Snippet12"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDecimal/todecimal3.fs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDecimal/todecimal3.vb" id="Snippet12"::: @@ -8210,7 +8210,7 @@ ## Examples The following example converts each element in an array of 16-bit signed integers to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDouble/todouble1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDouble/todouble1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDouble/todouble1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDouble/todouble1.vb" id="Snippet1"::: @@ -8334,7 +8334,7 @@ ## Examples The following example converts each element in an array of signed long integers to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDouble/todouble1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDouble/todouble1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDouble/todouble1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDouble/todouble1.vb" id="Snippet2"::: @@ -8402,7 +8402,7 @@ ## Examples The following example attempts to convert each value in an object array to a . - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDouble/todouble1.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDouble/todouble1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDouble/todouble1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDouble/todouble1.vb" id="Snippet3"::: @@ -8480,7 +8480,7 @@ ## Examples The following example converts each element in an array of values to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDouble/todouble1.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDouble/todouble1.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDouble/todouble1.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDouble/todouble1.vb" id="Snippet4"::: @@ -8613,7 +8613,7 @@ ## Examples The following example attempts to convert each element in an array of numeric strings to a . The example's output is from a system whose current culture is en-US. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDouble/example8.cs" interactive="try-dotnet" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDouble/example8.cs" id="Snippet8"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDouble/example8.fs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDouble/example8.vb" id="Snippet8"::: @@ -8685,7 +8685,7 @@ ## Examples The following example converts each element in an array of values to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDouble/todouble1.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDouble/todouble1.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDouble/todouble1.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDouble/todouble1.vb" id="Snippet5"::: @@ -8753,7 +8753,7 @@ ## Examples The following example converts each element in an array of values to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDouble/todouble1.cs" interactive="try-dotnet-method" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDouble/todouble1.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDouble/todouble1.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDouble/todouble1.vb" id="Snippet6"::: @@ -8821,7 +8821,7 @@ ## Examples The following example converts each element in an array of values to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDouble/todouble1.cs" interactive="try-dotnet-method" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDouble/todouble1.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDouble/todouble1.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDouble/todouble1.vb" id="Snippet7"::: @@ -8975,7 +8975,7 @@ ## Examples The following example converts string representations of values with the `ToDouble` method, using an object. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDouble/todouble.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToDouble/todouble.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToDouble/todouble.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToDouble/todouble.vb" id="Snippet2"::: @@ -9329,7 +9329,7 @@ ## Examples The following example converts the Boolean values `true` and `false` to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt16/toint16_1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt16/toint16_1.vb" id="Snippet1"::: @@ -9391,7 +9391,7 @@ ## Examples The following example converts each element in an array of values to a 16-bit signed integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt16/toint16_1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt16/toint16_1.vb" id="Snippet2"::: @@ -9453,7 +9453,7 @@ ## Examples The following example attempts to convert each element in an array of values to a 16-bit signed integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt16/toint16_1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt16/toint16_1.vb" id="Snippet3"::: @@ -9567,7 +9567,7 @@ ## Examples The following example attempts to convert each element in an array of values to a 16-bit signed integer. The example illustrates that any fractional part of a value is rounded when performing the conversion. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt16/toint16_1.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt16/toint16_1.vb" id="Snippet4"::: @@ -9633,7 +9633,7 @@ ## Examples The following example converts each element in an array of values to a 16-bit signed integer. The example illustrates that any fractional part of a value is rounded before performing the conversion. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt16/toint16_1.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt16/toint16_1.vb" id="Snippet5"::: @@ -9751,7 +9751,7 @@ ## Examples The following example attempts to convert each element in an array of integers to a 16-bit signed integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" interactive="try-dotnet-method" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt16/toint16_1.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt16/toint16_1.vb" id="Snippet6"::: @@ -9815,7 +9815,7 @@ ## Examples The following example attempts to convert each element in an array of long integers to a 16-bit signed integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" interactive="try-dotnet-method" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt16/toint16_1.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt16/toint16_1.vb" id="Snippet7"::: @@ -9963,7 +9963,7 @@ ## Examples The following example converts each element in an array of signed bytes to a 16-bit signed integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" interactive="try-dotnet-method" id="Snippet9"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" id="Snippet9"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt16/toint16_1.fs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt16/toint16_1.vb" id="Snippet9"::: @@ -10026,7 +10026,7 @@ ## Examples The following example attempts to convert each element in an array of values to a 16-bit signed integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" interactive="try-dotnet-method" id="Snippet10"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" id="Snippet10"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt16/toint16_1.fs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt16/toint16_1.vb" id="Snippet10"::: @@ -10100,7 +10100,7 @@ ## Examples The following example converts string representations of 16-bit integers with the `ToInt16` method, using default formatting. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt16/toint16.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt16/toint16.vb" id="Snippet3"::: @@ -10173,7 +10173,7 @@ ## Examples The following example attempts to convert each element in an array of unsigned 16-bit integers to a 16-bit signed integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" interactive="try-dotnet-method" id="Snippet11"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" id="Snippet11"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt16/toint16_1.fs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt16/toint16_1.vb" id="Snippet11"::: @@ -10243,7 +10243,7 @@ ## Examples The following example attempts to convert each element in an array of unsigned integers to a 16-bit signed integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" interactive="try-dotnet-method" id="Snippet12"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" id="Snippet12"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt16/toint16_1.fs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt16/toint16_1.vb" id="Snippet12"::: @@ -10313,7 +10313,7 @@ ## Examples The following example attempts to convert each element in an array of unsigned long integers to a 16-bit signed integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" interactive="try-dotnet-method" id="Snippet13"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_1.cs" id="Snippet13"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt16/toint16_1.fs" id="Snippet13"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt16/toint16_1.vb" id="Snippet13"::: @@ -10465,7 +10465,7 @@ ## Examples The following example converts string representations of 16-bit integers with the `ToInt16` method, using an object. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt16/toint16.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt16/toint16.vb" id="Snippet3"::: @@ -10537,13 +10537,13 @@ Because the negative sign is not supported for non-base 10 numeric representations, the method assumes that negative numbers use two's complement representation. In other words, the method always interprets the highest-order binary bit of an integer (bit 15) as its sign bit. As a result, it is possible to write code in which a non-base 10 number that is out of the range of the data type is converted to an value without the method throwing an exception. The following example increments by one, converts the resulting number to its hexadecimal string representation, and then calls the method. Instead of throwing an exception, the method displays the message, "0x8000 converts to -32768." - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToByte/Conversion.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToByte/Conversion.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToByte/Conversion.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/Conversion.vb" id="Snippet5"::: When performing binary operations or numeric conversions, it is always the responsibility of the developer to verify that a method is using the appropriate numeric representation to interpret a particular value. As the following example illustrates, you can ensure that the method handles overflows appropriately by first retrieving the sign of the numeric value before converting it to its hexadecimal string representation. Throw an exception if the original value was positive but the conversion back to an integer yields a negative value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToByte/Conversion.cs" interactive="try-dotnet-method" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToByte/Conversion.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToByte/Conversion.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/Conversion.vb" id="Snippet6"::: @@ -10552,7 +10552,7 @@ ## Examples The following example attempts to interpret each element in a string array as a hexadecimal string and to convert it to a 16-bit signed integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_2.cs" interactive="try-dotnet" id="Snippet14"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt16/toint16_2.cs" id="Snippet14"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt16/toint16_2.fs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt16/toint16_2.vb" id="Snippet14"::: @@ -10642,7 +10642,7 @@ ## Examples The following example converts the values `true` and `false` to integers. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt32/toint32_1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt32/toint32_1.vb" id="Snippet1":::   @@ -10704,7 +10704,7 @@ ## Examples The following example converts each element in an array of bytes to an integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt32/toint32_1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt32/toint32_1.vb" id="Snippet2":::   @@ -10771,7 +10771,7 @@ ## Examples The following example converts each element in an array of values to an integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt32/toint32_1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt32/toint32_1.vb" id="Snippet3"::: @@ -10889,7 +10889,7 @@ ## Examples The following example attempts to convert each element in an array of values to an integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt32/toint32_1.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt32/toint32_1.vb" id="Snippet4":::   @@ -10955,7 +10955,7 @@ ## Examples The following example attempts to convert each element in an array of values to an integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt32/toint32_1.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt32/toint32_1.vb" id="Snippet5":::   @@ -11021,7 +11021,7 @@ ## Examples The following example converts each element in an array of 16-bit signed integers to an integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" interactive="try-dotnet-method" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt32/toint32_1.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt32/toint32_1.vb" id="Snippet6":::   @@ -11135,7 +11135,7 @@ ## Examples The following example attempts to convert each element in an array of long integers to an integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" interactive="try-dotnet-method" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt32/toint32_1.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt32/toint32_1.vb" id="Snippet7"::: @@ -11283,7 +11283,7 @@ ## Examples The following example converts each element in an array of signed bytes to an integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" interactive="try-dotnet-method" id="Snippet9"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" id="Snippet9"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt32/toint32_1.fs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt32/toint32_1.vb" id="Snippet9"::: @@ -11346,7 +11346,7 @@ ## Examples The following example attempts to convert each element in an array of values to an integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" interactive="try-dotnet-method" id="Snippet10"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" id="Snippet10"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt32/toint32_1.fs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt32/toint32_1.vb" id="Snippet10"::: @@ -11420,7 +11420,7 @@ ## Examples The following example attempts to convert each element in a numeric string array to an integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" interactive="try-dotnet-method" id="Snippet11"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" id="Snippet11"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt32/toint32_1.fs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt32/toint32_1.vb" id="Snippet11"::: @@ -11492,7 +11492,7 @@ ## Examples The following example converts each element in an array of 16-bit unsigned integers to an integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" interactive="try-dotnet-method" id="Snippet12"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" id="Snippet12"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt32/toint32_1.fs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt32/toint32_1.vb" id="Snippet12"::: @@ -11560,7 +11560,7 @@ ## Examples The following example attempts to convert each element in an array of unsigned integers to a signed integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" interactive="try-dotnet-method" id="Snippet13"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" id="Snippet13"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt32/toint32_1.fs" id="Snippet13"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt32/toint32_1.vb" id="Snippet13"::: @@ -11630,7 +11630,7 @@ ## Examples The following example attempts to convert each element in an array of unsigned long integers to a signed integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" interactive="try-dotnet-method" id="Snippet14"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_1.cs" id="Snippet14"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt32/toint32_1.fs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt32/toint32_1.vb" id="Snippet14"::: @@ -11786,7 +11786,7 @@ ## Examples The following example defines a custom object that recognizes the string "pos" as the positive sign and the string "neg" as the negative sign. It then attempts to convert each element of a numeric string array to an integer using both this provider and the provider for the invariant culture. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_2.cs" interactive="try-dotnet" id="Snippet15"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt32/toint32_2.cs" id="Snippet15"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt32/toint32_2.fs" id="Snippet15"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt32/toint32_2.vb" id="Snippet15"::: @@ -11857,13 +11857,13 @@ Because the negative sign is not supported for non-base 10 numeric representations, the method assumes that negative numbers use two's complement representation. In other words, the method always interprets the highest-order binary bit of an integer (bit 31) as its sign bit. As a result, it is possible to write code in which a non-base 10 number that is out of the range of the data type is converted to an value without the method throwing an exception. The following example increments by one, converts the resulting number to its hexadecimal string representation, and then calls the method. Instead of throwing an exception, the method displays the message, "0x80000000 converts to -2147483648." - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToByte/Conversion.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToByte/Conversion.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToByte/Conversion.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/Conversion.vb" id="Snippet1"::: When performing binary operations or numeric conversions, it is always the responsibility of the developer to verify that a method is using the appropriate numeric representation to interpret a particular value. As the following example illustrates, you can ensure that the method handles overflows appropriately by first retrieving the sign of the numeric value before converting it to its hexadecimal string representation. Throw an exception if the original value was positive but the conversion back to an integer yields a negative value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToByte/Conversion.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToByte/Conversion.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToByte/Conversion.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/Conversion.vb" id="Snippet2"::: @@ -11953,7 +11953,7 @@ ## Examples The following example converts the values `true` and `false` to long integers. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt64/toint64_1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt64/toint64_1.vb" id="Snippet1"::: @@ -12015,7 +12015,7 @@ ## Examples The following example converts each element in an array of bytes to a long integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt64/toint64_1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt64/toint64_1.vb" id="Snippet2"::: @@ -12077,7 +12077,7 @@ ## Examples The following example converts each element in a array to a long integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt64/toint64_1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt64/toint64_1.vb" id="Snippet3"::: @@ -12189,7 +12189,7 @@ ## Examples The following example attempts to convert each element in an array of values to a long integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt64/toint64_1.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt64/toint64_1.vb" id="Snippet4"::: @@ -12261,7 +12261,7 @@ ## Examples The following example attempts to convert each element in an array of values to a long integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt64/toint64_1.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt64/toint64_1.vb" id="Snippet5"::: @@ -12327,7 +12327,7 @@ ## Examples The following example converts each element in an array of 16-bit integers to a long integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" interactive="try-dotnet-method" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt64/toint64_1.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt64/toint64_1.vb" id="Snippet6"::: @@ -12441,7 +12441,7 @@ ## Examples The following example converts each element in an array of integers to a long integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" interactive="try-dotnet-method" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt64/toint64_1.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt64/toint64_1.vb" id="Snippet7"::: @@ -12587,7 +12587,7 @@ ## Examples The following example converts each element in a signed byte array to a long integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" interactive="try-dotnet-method" id="Snippet9"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" id="Snippet9"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt64/toint64_1.fs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt64/toint64_1.vb" id="Snippet9"::: @@ -12650,7 +12650,7 @@ ## Examples The following example attempts to convert each element in an array of values to a long integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" interactive="try-dotnet-method" id="Snippet10"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" id="Snippet10"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt64/toint64_1.fs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt64/toint64_1.vb" id="Snippet10"::: @@ -12724,7 +12724,7 @@ ## Examples The following example attempts to convert each element in an array of numeric strings to a long integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" interactive="try-dotnet-method" id="Snippet11"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" id="Snippet11"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt64/toint64_1.fs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt64/toint64_1.vb" id="Snippet11"::: @@ -12796,7 +12796,7 @@ ## Examples The following example converts each element in an array of 16-bit unsigned integers to a long integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" interactive="try-dotnet-method" id="Snippet12"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" id="Snippet12"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt64/toint64_1.fs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt64/toint64_1.vb" id="Snippet12"::: @@ -12864,7 +12864,7 @@ ## Examples The following example converts each element in an array of unsigned integers to a long integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" interactive="try-dotnet-method" id="Snippet13"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" id="Snippet13"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt64/toint64_1.fs" id="Snippet13"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt64/toint64_1.vb" id="Snippet13"::: @@ -12932,7 +12932,7 @@ ## Examples The following example attempts to convert each element in an array of unsigned long integers to a long integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" interactive="try-dotnet-method" id="Snippet14"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_1.cs" id="Snippet14"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt64/toint64_1.fs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt64/toint64_1.vb" id="Snippet14"::: @@ -13092,7 +13092,7 @@ ## Examples The following example defines a custom object that recognizes the string "pos" as the positive sign and the string "neg" as the negative sign. It then attempts to convert each element of a numeric string array to an integer using both this provider and the provider for the invariant culture. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_3.cs" interactive="try-dotnet" id="Snippet16"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_3.cs" id="Snippet16"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt64/toint64_3.fs" id="Snippet16"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt64/toint64_3.vb" id="Snippet16"::: @@ -13163,19 +13163,19 @@ Because the negative sign is not supported for non-base 10 numeric representations, the method assumes that negative numbers use two's complement representation. In other words, the method always interprets the highest-order binary bit of a long integer (bit 63) as its sign bit. As a result, it is possible to write code in which a non-base 10 number that is out of the range of the data type is converted to an value without the method throwing an exception. The following example converts to its hexadecimal string representation, and then calls the method. Instead of throwing an exception, the method displays the message, "0xFFFFFFFFFFFFFFFF converts to -1." - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToByte/Conversion.cs" interactive="try-dotnet-method" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToByte/Conversion.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToByte/Conversion.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/Conversion.vb" id="Snippet7"::: When performing binary operations or numeric conversions, it is always the responsibility of the developer to verify that a method is using the appropriate numeric representation to interpret a particular value. As the following example illustrates, you can ensure that the method handles overflows appropriately by first determining whether a value represents an unsigned or a signed type when converting it to its hexadecimal string representation. Throw an exception if the original value was an unsigned type but the conversion back to an integer yields a value whose sign bit is on. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToByte/Conversion.cs" interactive="try-dotnet-method" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToByte/Conversion.cs" id="Snippet8"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToByte/Conversion.fs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/Conversion.vb" id="Snippet8"::: The following example attempts to interpret each element in a string array as a hexadecimal string and convert it to a long integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_2.cs" interactive="try-dotnet" id="Snippet15"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToInt64/toint64_2.cs" id="Snippet15"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToInt64/toint64_2.fs" id="Snippet15"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToInt64/toint64_2.vb" id="Snippet15"::: @@ -14691,7 +14691,7 @@ ## Examples The following example converts the Boolean values `true` and `false` to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToSingle/tosingle1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToSingle/tosingle1.vb" id="Snippet1"::: @@ -14753,7 +14753,7 @@ ## Examples The following example converts each element in an array of byte values to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToSingle/tosingle1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToSingle/tosingle1.vb" id="Snippet2"::: @@ -14916,7 +14916,7 @@ ## Examples The following example converts each element in an array of values to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToSingle/tosingle1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToSingle/tosingle1.vb" id="Snippet3"::: @@ -14981,7 +14981,7 @@ ## Examples The following example converts each element in an array of values to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToSingle/tosingle1.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToSingle/tosingle1.vb" id="Snippet4"::: @@ -15045,7 +15045,7 @@ ## Examples The following example converts each element in an array of 16-bit integers to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToSingle/tosingle1.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToSingle/tosingle1.vb" id="Snippet5"::: @@ -15107,7 +15107,7 @@ ## Examples The following example converts each element in an integer array to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" interactive="try-dotnet-method" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToSingle/tosingle1.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToSingle/tosingle1.vb" id="Snippet6"::: @@ -15169,7 +15169,7 @@ ## Examples The following example converts each element in an array of long integers to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" interactive="try-dotnet-method" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToSingle/tosingle1.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToSingle/tosingle1.vb" id="Snippet7"::: @@ -15315,7 +15315,7 @@ ## Examples The following example converts each element in a signed byte array to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" interactive="try-dotnet-method" id="Snippet9"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" id="Snippet9"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToSingle/tosingle1.fs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToSingle/tosingle1.vb" id="Snippet9"::: @@ -15438,7 +15438,7 @@ ## Examples The following example attempts to convert each element in an array of numeric strings to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" interactive="try-dotnet-method" id="Snippet10"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" id="Snippet10"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToSingle/tosingle1.fs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToSingle/tosingle1.vb" id="Snippet10"::: @@ -15510,7 +15510,7 @@ ## Examples The following example converts each element in an array of unsigned 16-bit integers to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" interactive="try-dotnet-method" id="Snippet11"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" id="Snippet11"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToSingle/tosingle1.fs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToSingle/tosingle1.vb" id="Snippet11"::: @@ -15578,7 +15578,7 @@ ## Examples The following example converts each element in an array of unsigned integers to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" interactive="try-dotnet-method" id="Snippet12"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" id="Snippet12"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToSingle/tosingle1.fs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToSingle/tosingle1.vb" id="Snippet12"::: @@ -15646,7 +15646,7 @@ ## Examples The following example converts each element in an array of unsigned long integers to a value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" interactive="try-dotnet-method" id="Snippet13"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle1.cs" id="Snippet13"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToSingle/tosingle1.fs" id="Snippet13"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToSingle/tosingle1.vb" id="Snippet13"::: @@ -15806,7 +15806,7 @@ ## Examples The following example uses objects that represent the en-US and fr-FR cultures when it converts the elements in an array of numeric strings to values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle3.cs" interactive="try-dotnet" id="Snippet16"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToSingle/tosingle3.cs" id="Snippet16"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToSingle/tosingle3.fs" id="Snippet16"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToSingle/tosingle3.vb" id="Snippet16"::: @@ -15889,7 +15889,7 @@ ## Examples The following example illustrates the conversion of a to a , using `ToString`. It also illustrates that the string returned by the conversion equals either or . - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/ToString_Bool1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/ToString_Bool1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/ToString_Bool1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/ToString_Bool1.vb" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Convert.ToString/fs/ToString_Bool1.fs" id="Snippet1"::: @@ -15957,7 +15957,7 @@ ## Examples The following example converts each value in a array to a string. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/ToString.Byte1.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/ToString.Byte1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/ToString.Byte1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/ToString.Byte1.vb" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Convert.ToString/fs/ToString_Byte1.fs" id="Snippet3"::: @@ -16293,7 +16293,7 @@ ## Examples The following example converts each element in an array of 16-bit integers to its equivalent string representation. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring1.vb" id="Snippet2"::: @@ -16358,7 +16358,7 @@ ## Examples The following example compares the method with the method. It defines a custom object that uses the sting "minus" to represent the negative sign. It converts each element in an integer array to its equivalent string representation using default formatting (the formatting conventions of the current culture) and the custom format provider. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring7.cs" interactive="try-dotnet" id="Snippet27"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring7.cs" id="Snippet27"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring7.fs" id="Snippet27"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring7.vb" id="Snippet27"::: @@ -16425,7 +16425,7 @@ ## Examples The following example converts each element in a long integer array to its equivalent string representation. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring6.cs" interactive="try-dotnet-method" id="Snippet28"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring6.cs" id="Snippet28"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring6.fs" id="Snippet28"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring6.vb" id="Snippet28"::: @@ -16566,7 +16566,7 @@ ## Examples The following example converts each element in a signed byte array to its equivalent string representation. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring1.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring1.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring1.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring1.vb" id="Snippet4"::: @@ -16633,7 +16633,7 @@ ## Examples The following example converts each element in an array of values to its equivalent string representation. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring1.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring1.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring1.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring1.vb" id="Snippet5"::: @@ -16700,7 +16700,7 @@ ## Examples The following example passes a string to the method and calls the method to confirm that the method returns the original string. The example also calls the method to ensure that the two strings are not identical because the original string is interned. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring_string1.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring_string1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring_string1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring_string1.vb" id="Snippet2"::: @@ -16773,7 +16773,7 @@ ## Examples The following example converts each element in an array of unsigned 16-bit integer values to its equivalent string representation. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring1.cs" interactive="try-dotnet-method" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring1.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring1.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring1.vb" id="Snippet6"::: @@ -16846,7 +16846,7 @@ ## Examples The following example converts each element in an unsigned integer array to its equivalent string representation. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring1.cs" interactive="try-dotnet-method" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring1.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring1.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring1.vb" id="Snippet7"::: @@ -16919,7 +16919,7 @@ ## Examples The following example converts each element in an unsigned long integer array to its equivalent string representation. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring1.cs" interactive="try-dotnet-method" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring1.cs" id="Snippet8"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring1.fs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring1.vb" id="Snippet8"::: @@ -17073,7 +17073,7 @@ ## Examples The following example converts each element in an unsigned byte array to its equivalent string representation using the formatting conventions of the en-US and fr-FR cultures. Because the "G" specifier by default outputs only decimal digits in a byte value's string representation, the `provider` parameter does not affect the formatting of the returned string. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring3.cs" interactive="try-dotnet-method" id="Snippet16"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring3.cs" id="Snippet16"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring3.fs" id="Snippet16"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring3.vb" id="Snippet16"::: @@ -17148,7 +17148,7 @@ ## Examples The following example converts each element in a byte array to its equivalent binary, hexadecimal, decimal, and hexadecimal string representations. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring2.cs" interactive="try-dotnet-method" id="Snippet9"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring2.cs" id="Snippet9"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring2.fs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring2.vb" id="Snippet9"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.convert.tostring2/fs/tostring2.fs" id="Snippet9"::: @@ -17382,7 +17382,7 @@ ## Examples The following example converts each element in an array of values to its equivalent string representation in four different cultures. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring3.cs" interactive="try-dotnet-method" id="Snippet14"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring3.cs" id="Snippet14"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring3.fs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring3.vb" id="Snippet14"::: @@ -17459,7 +17459,7 @@ ## Examples The following example converts each element in an array of values to its equivalent string representation in four different cultures. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring3.cs" interactive="try-dotnet-method" id="Snippet15"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring3.cs" id="Snippet15"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring3.fs" id="Snippet15"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring3.vb" id="Snippet15"::: @@ -17536,7 +17536,7 @@ ## Examples The following example defines a custom class that defines its negative sign as the string "~" and its positive sign as the string "!". It then calls the method to convert each element in an array of 16-bit integers to its equivalent string representation. The conversion uses the invariant culture as well as the custom object. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring3.cs" interactive="try-dotnet-method" id="Snippet19"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring3.cs" id="Snippet19"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring3.fs" id="Snippet19"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring3.vb" id="Snippet19"::: @@ -17611,7 +17611,7 @@ ## Examples The following example converts each element in an array of 16-bit signed integers to its equivalent binary, octal, decimal, and hexadecimal string representations. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring2.cs" interactive="try-dotnet-method" id="Snippet10"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring2.cs" id="Snippet10"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring2.fs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring2.vb" id="Snippet10"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.convert.tostring2/fs/tostring2.fs" id="Snippet10"::: @@ -17691,7 +17691,7 @@ ## Examples The following example defines a custom class that defines its negative sign as the string "~" and its positive sign as the string "!". It then calls the method to convert each element in an array of integers to its equivalent string representation. The conversion uses the invariant culture as well as the custom object. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring3.cs" interactive="try-dotnet-method" id="Snippet20"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring3.cs" id="Snippet20"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring3.fs" id="Snippet20"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring3.vb" id="Snippet20"::: @@ -17766,7 +17766,7 @@ ## Examples The following example converts each element in an integer array to its equivalent binary, hexadecimal, decimal, and hexadecimal string representations. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring2.cs" interactive="try-dotnet-method" id="Snippet11"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring2.cs" id="Snippet11"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring2.fs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring2.vb" id="Snippet11"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.convert.tostring2/fs/tostring2.fs" id="Snippet11"::: @@ -17846,7 +17846,7 @@ ## Examples The following example defines a custom class that defines its negative sign as the string "~" and its positive sign as the string "!". It then calls the method to convert each element in a long integer array to its equivalent string representation. The conversion uses the invariant culture as well as the custom object. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring3.cs" interactive="try-dotnet-method" id="Snippet21"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring3.cs" id="Snippet21"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring3.fs" id="Snippet21"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring3.vb" id="Snippet21"::: @@ -17921,7 +17921,7 @@ ## Examples The following example converts each element in a long integer array to its equivalent binary, hexadecimal, decimal, and hexadecimal string representations. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring2.cs" interactive="try-dotnet-method" id="Snippet12"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring2.cs" id="Snippet12"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring2.fs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring2.vb" id="Snippet12"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.convert.tostring2/fs/tostring2.fs" id="Snippet12"::: @@ -17996,13 +17996,13 @@ ## Examples The following example defines a `Temperature` class that overrides the method but does not implement the interface. The example illustrates how calls to the method, in turn, call the `Temperature.ToString` method. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring5.cs" interactive="try-dotnet" id="Snippet26"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring5.cs" id="Snippet26"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring5.fs" id="Snippet26"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring5.vb" id="Snippet26"::: The following example defines a `Temperature` class that implements the interface but does not implement the interface. Its implementation represents the `Temperature` value in Celsius, Fahrenheit, or Kelvin, depending on the format string. The example also defines a `TemperatureProvider` class that implements and provides a randomly generated format string that is used by the implementation of the `Temperature` class. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring_obj30.cs" interactive="try-dotnet" id="Snippet30"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring_obj30.cs" id="Snippet30"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring_obj30.fs" id="Snippet30"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring_obj30.vb" id="Snippet30"::: @@ -18085,7 +18085,7 @@ ## Examples The following example defines a custom class that defines its negative sign as the string "~" and its positive sign as the string "!". It then calls the method to convert each element in signed byte array to its equivalent string representation. The conversion uses the invariant culture as well as the custom object. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring3.cs" interactive="try-dotnet-method" id="Snippet17"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring3.cs" id="Snippet17"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring3.fs" id="Snippet17"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring3.vb" id="Snippet17"::: @@ -18314,7 +18314,7 @@ ## Examples The following example defines a custom class that defines its negative sign as the string "~" and its positive sign as the string "!". It then calls the method to convert a 16-bit unsigned integer value to its equivalent string representation. The conversion uses both the invariant culture and the custom object. The output indicates that this formatting information is not used, because by default the "G" format specifier does not include a positive sign with positive values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring3.cs" interactive="try-dotnet-method" id="Snippet22"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring3.cs" id="Snippet22"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring3.fs" id="Snippet22"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring3.vb" id="Snippet22"::: @@ -18397,7 +18397,7 @@ ## Examples The following example defines a custom class that defines its negative sign as the string "~" and its positive sign as the string "!". It then calls the method to convert an unsigned integer value to its equivalent string representation. The conversion uses both the invariant culture and the custom object. The output indicates that this formatting information is not used, because by default the "G" format specifier does not include a positive sign with positive values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring3.cs" interactive="try-dotnet-method" id="Snippet23"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring3.cs" id="Snippet23"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring3.fs" id="Snippet23"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring3.vb" id="Snippet23"::: @@ -18480,7 +18480,7 @@ ## Examples The following example defines a custom class that defines its negative sign as the string "~" and its positive sign as the string "!". It then calls the method to convert an unsigned long integer value to its equivalent string representation. The conversion uses both the invariant culture and the custom object. The output indicates that this formatting information is not used, because by default the "G" format specifier does not include a positive sign with positive values. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring3.cs" interactive="try-dotnet-method" id="Snippet24"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToString/tostring3.cs" id="Snippet24"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToString/tostring3.fs" id="Snippet24"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToString/tostring3.vb" id="Snippet24"::: @@ -19975,7 +19975,7 @@ ## Examples The following example converts the Boolean values `true` and `false` to unsigned integers. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToUInt32/touint32_1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToUInt32/touint32_1.vb" id="Snippet1"::: @@ -20043,7 +20043,7 @@ ## Examples The following example converts each element in a byte array to an unsigned integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToUInt32/touint32_1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToUInt32/touint32_1.vb" id="Snippet2"::: @@ -20111,7 +20111,7 @@ ## Examples The following example converts each element in a character array to an unsigned integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToUInt32/touint32_1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToUInt32/touint32_1.vb" id="Snippet3"::: @@ -20235,7 +20235,7 @@ ## Examples The following example attempts to convert each element in an array of values to an unsigned integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToUInt32/touint32_1.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToUInt32/touint32_1.vb" id="Snippet4"::: @@ -20307,7 +20307,7 @@ ## Examples The following example attempts to convert each element in an array of values to an unsigned integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToUInt32/touint32_1.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToUInt32/touint32_1.vb" id="Snippet5"::: @@ -20379,7 +20379,7 @@ ## Examples The following example attempts to convert each element in a 16-bit integer array to an unsigned integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" interactive="try-dotnet-method" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToUInt32/touint32_1.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToUInt32/touint32_1.vb" id="Snippet6"::: @@ -20449,7 +20449,7 @@ ## Examples The following example attempts to convert each element in an integer array to an unsigned integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" interactive="try-dotnet-method" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToUInt32/touint32_1.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToUInt32/touint32_1.vb" id="Snippet7"::: @@ -20519,7 +20519,7 @@ ## Examples The following example attempts to convert each element in a long integer array to an unsigned integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" interactive="try-dotnet-method" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" id="Snippet8"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToUInt32/touint32_1.fs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToUInt32/touint32_1.vb" id="Snippet8"::: @@ -20673,7 +20673,7 @@ ## Examples The following example attempts to convert each element in a signed byte array to an unsigned integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" interactive="try-dotnet-method" id="Snippet10"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" id="Snippet10"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToUInt32/touint32_1.fs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToUInt32/touint32_1.vb" id="Snippet10"::: @@ -20744,7 +20744,7 @@ ## Examples The following example attempts to convert each element in an array of values to an unsigned integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" interactive="try-dotnet-method" id="Snippet11"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" id="Snippet11"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToUInt32/touint32_1.fs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToUInt32/touint32_1.vb" id="Snippet11"::: @@ -20824,7 +20824,7 @@ ## Examples The following example interprets the elements in a string array as numeric strings and attempts to convert them to unsigned integers. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" interactive="try-dotnet-method" id="Snippet12"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" id="Snippet12"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToUInt32/touint32_1.fs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToUInt32/touint32_1.vb" id="Snippet12"::: @@ -20896,7 +20896,7 @@ ## Examples The following example converts each element in an unsigned 16-bit integer array to an unsigned integer value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" interactive="try-dotnet-method" id="Snippet13"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" id="Snippet13"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToUInt32/touint32_1.fs" id="Snippet13"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToUInt32/touint32_1.vb" id="Snippet13"::: @@ -21022,7 +21022,7 @@ ## Examples The following example attempts to convert each element in an unsigned long integer array to an unsigned integer value. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" interactive="try-dotnet-method" id="Snippet14"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_1.cs" id="Snippet14"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToUInt32/touint32_1.fs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToUInt32/touint32_1.vb" id="Snippet14"::: @@ -21200,7 +21200,7 @@ ## Examples The following example defines a custom object that recognizes the string "pos" as the positive sign and the string "neg" as the negative sign. It then attempts to convert each element of a numeric string array to an integer using both this provider and the provider for the invariant culture. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_2.cs" interactive="try-dotnet" id="Snippet15"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_2.cs" id="Snippet15"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToUInt32/touint32_2.fs" id="Snippet15"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToUInt32/touint32_2.vb" id="Snippet15"::: @@ -21277,13 +21277,13 @@ Because the data type supports unsigned values only, the method assumes that `value` is expressed using unsigned binary representation. In other words, all 32 bits are used to represent the numeric value, and a sign bit is absent. As a result, it is possible to write code in which a signed integer value that is out of the range of the data type is converted to a value without the method throwing an exception. The following example converts to its hexadecimal string representation, and then calls the method. Instead of throwing an exception, the method displays the message, "0x80000000 converts to 2147483648." - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToByte/Conversion.cs" interactive="try-dotnet-method" id="Snippet13"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToByte/Conversion.cs" id="Snippet13"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToByte/Conversion.fs" id="Snippet13"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/Conversion.vb" id="Snippet13"::: When performing binary operations or numeric conversions, it is always the responsibility of the developer to verify that a method or operator is using the appropriate numeric representation to interpret a particular value. The following example illustrates one technique for ensuring that the method does not inappropriately use binary representation to interpret a value that uses two's complement representation when converting a hexadecimal string to a value. The example determines whether a value represents a signed or an unsigned integer while it is converting that value to its string representation. When the example converts the value to a value, it checks whether the original value was a signed integer. If so, and if its high-order bit is set (which indicates that the original value was negative), the method throws an exception. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToByte/Conversion.cs" interactive="try-dotnet-method" id="Snippet14"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToByte/Conversion.cs" id="Snippet14"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToByte/Conversion.fs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToByte/Conversion.vb" id="Snippet14"::: @@ -21292,7 +21292,7 @@ ## Examples The following example attempts to interpret each element in an array of numeric strings as a hexadecimal value and to convert it to an unsigned integer. - :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_3.cs" interactive="try-dotnet-method" id="Snippet16"::: + :::code language="csharp" source="~/snippets/csharp/System/Convert/ToUInt32/touint32_3.cs" id="Snippet16"::: :::code language="fsharp" source="~/snippets/fsharp/System/Convert/ToUInt32/touint32_3.fs" id="Snippet16"::: :::code language="vb" source="~/snippets/visualbasic/System/Convert/ToUInt32/touint32_3.vb" id="Snippet16"::: diff --git a/xml/System/Converter`2.xml b/xml/System/Converter`2.xml index 8727c685388..d3a4783dbe9 100644 --- a/xml/System/Converter`2.xml +++ b/xml/System/Converter`2.xml @@ -96,14 +96,14 @@ The following code example defines a method named `PointFToPoint` that converts a structure to a structure. The example then creates an array 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 language="csharp" source="~/snippets/csharp/System/Array/ConvertAllTInput,TOutput/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Array/ConvertAllTInput,TOutput/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Array/ConvertAllTInput,TOutput/source.vb" id="Snippet1"::: Example 2 The following code 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 language="csharp" source="~/snippets/csharp/System/ConverterTInput,TOutput/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/ConverterTInput,TOutput/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/ConverterTInput,TOutput/Overview/source.vb" id="Snippet1"::: ]]> diff --git a/xml/System/DateTime.xml b/xml/System/DateTime.xml index 85297faba40..d026ebd0c50 100644 --- a/xml/System/DateTime.xml +++ b/xml/System/DateTime.xml @@ -211,7 +211,7 @@ The following example demonstrates one of the constructors. :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/datetime.ctor_Int64/FS/ticks.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/DateTime/.ctor/ticks.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/.ctor/ticks.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/.ctor/ticks.vb" id="Snippet1"::: ]]> @@ -401,7 +401,7 @@ ## Examples The following example uses the constructor to instantiate a value. The example also illustrates that this overload creates a value whose time component equals midnight (or 0:00). - :::code language="csharp" source="~/snippets/csharp/System/DateTime/.ctor/ctorexample1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/.ctor/ctorexample1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.datetime.constructor/fs/ctorexample1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/.ctor/ctorexample1.vb" id="Snippet1"::: @@ -569,7 +569,7 @@ ## Examples The following example uses the constructor to instantiate a value. - :::code language="csharp" source="~/snippets/csharp/System/DateTime/.ctor/ctorexample1.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/.ctor/ctorexample1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.datetime.constructor/fs/ctorexample1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/.ctor/ctorexample1.vb" id="Snippet3"::: @@ -665,7 +665,7 @@ ## Examples The following example uses the constructor to instantiate a value. - :::code language="csharp" source="~/snippets/csharp/System/DateTime/.ctor/ctorexample1.cs" interactive="try-dotnet-method" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/.ctor/ctorexample1.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.datetime.constructor/fs/ctorexample1.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/.ctor/ctorexample1.vb" id="Snippet7"::: @@ -867,7 +867,7 @@ ## Examples The following example uses the constructor to instantiate a value. - :::code language="csharp" source="~/snippets/csharp/System/DateTime/.ctor/ctorexample1.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/.ctor/ctorexample1.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.datetime.constructor/fs/ctorexample1.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/.ctor/ctorexample1.vb" id="Snippet5"::: @@ -970,7 +970,7 @@ ## Examples The following example uses the constructor to instantiate a value. - :::code language="csharp" source="~/snippets/csharp/System/DateTime/.ctor/ctorexample1.cs" interactive="try-dotnet-method" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/.ctor/ctorexample1.cs" id="Snippet8"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.datetime.constructor/fs/ctorexample1.fs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/.ctor/ctorexample1.vb" id="Snippet8"::: @@ -1724,7 +1724,7 @@ For applications in which portability of date and time data or a limited degree The following example uses the method to determine the day of the week 36 days after the current date. :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/DateTime.AddDays/FS/class1.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/DateTime/AddDays/class1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/AddDays/class1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/AddDays/class1.vb" id="Snippet1"::: ]]> @@ -1915,7 +1915,7 @@ The value parameter is rounded to the nearest integer. ## Examples The following example uses the method to add one millisecond and 1.5 milliseconds to a value. It then displays each new value and displays the difference between it and the original value. The difference is displayed both as a time span and as a number of ticks. The example makes it clear that one millisecond equals 10,000 ticks. It also shows that fractional milliseconds are rounded before performing the addition; the value that results from adding 1.5 milliseconds to the original date is 2 milliseconds greater than the original date. - :::code language="csharp" source="~/snippets/csharp/System/DateTime/AddMilliseconds/addmilliseconds2.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/AddMilliseconds/addmilliseconds2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.datetime.addmilliseconds/fs/addmilliseconds2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/AddMilliseconds/addmilliseconds2.vb" id="Snippet1"::: @@ -2129,7 +2129,7 @@ The value parameter is rounded to the nearest integer. ## Examples The following example uses the method to add 30 seconds and the number of seconds in one day to a value. It then displays each new value and displays the difference between it and the original value. The difference is displayed both as a time span and as a number of ticks. - :::code language="csharp" source="~/snippets/csharp/System/DateTime/AddSeconds/addseconds1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/AddSeconds/addseconds1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.datetime.addseconds/fs/addseconds1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/AddSeconds/addseconds1.vb" id="Snippet1"::: @@ -2262,7 +2262,7 @@ The value parameter is rounded to the nearest integer. The following example illustrates using the method with a value that represents a leap year day. It displays the date for the fifteen years prior to and the fifteen years that follow February 29, 2000. - :::code language="csharp" source="~/snippets/csharp/System/DateTime/AddYears/addyears1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/AddYears/addyears1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.datetime.addyears/fs/addyears1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/AddYears/addyears1.vb" id="Snippet1"::: @@ -2350,7 +2350,7 @@ The value parameter is rounded to the nearest integer. The following example demonstrates the method. - :::code language="csharp" source="~/snippets/csharp/System/DateTime/Compare/compare1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/Compare/compare1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.datetime.compare/fs/compare1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/Compare/compare1.vb" id="Snippet1"::: @@ -2464,7 +2464,7 @@ The value parameter is rounded to the nearest integer. The following example instantiates three objects, one that represents today's date, another that represents the date one year previously, and a third that represents the date one year in the future. It then calls the method and displays the result of the comparison. :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/DateTime.CompareTo.2/FS/CompareTo_CS1_24564.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/DateTime/CompareTo/CompareTo_CS1_24564.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/CompareTo/CompareTo_CS1_24564.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/CompareTo/CompareTo_VB1_24564.vb" id="Snippet1"::: ]]> @@ -2554,7 +2554,7 @@ The value parameter is rounded to the nearest integer. The following example demonstrates the method. :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/DateTime.CompareTo/FS/class1.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/DateTime/CompareTo/class1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/CompareTo/class1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/CompareTo/class1.vb" id="Snippet1"::: ]]> @@ -2682,7 +2682,7 @@ The value parameter is rounded to the nearest integer. ## Remarks The property always returns the day of the month in the Gregorian calendar, even if the current value was instantiated using some other calendar or if the current culture's default calendar is not the Gregorian calendar. To retrieve the day of the month of a particular date using some other calendar, call that calendar's method. The following example uses both the property and the method to retrieve the day of the month for a value that is instantiated using the Hijri calendar. - :::code language="csharp" source="~/snippets/csharp/System/DateTime/Day/Day1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/Day/Day1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.DateTime.Day/fs/Day1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/Day/Day1.vb" id="Snippet1"::: @@ -2765,7 +2765,7 @@ The value parameter is rounded to the nearest integer. The following example demonstrates the property and the enumeration. :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/DateTime.DayOfWeek/FS/dow.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/DateTime/DayOfWeek/dow.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/DayOfWeek/dow.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/DayOfWeek/dow.vb" id="Snippet1"::: ]]> @@ -2825,7 +2825,7 @@ The value parameter is rounded to the nearest integer. ## Examples 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. - :::code language="csharp" source="~/snippets/csharp/System/DateTime/DayOfYear/dayofyear2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/DayOfYear/dayofyear2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.datetime.dayofyear/fs/dayofyear2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/DayOfYear/dayofyear2.vb" id="Snippet1"::: @@ -2896,7 +2896,7 @@ The value parameter is rounded to the nearest integer. The following example demonstrates how to use the method to determine the number of days in July 2001, February 1998 (a non-leap year), and February 1996 (a leap year). :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/DateTime.DaysInMonth/FS/class1.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/DateTime/DaysInMonth/class1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/DaysInMonth/class1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/DaysInMonth/class1.vb" id="Snippet1"::: The following example displays the number of days in each month of a year specified in an integer array. @@ -4049,7 +4049,7 @@ juillet 2009 The following example demonstrates the method. It displays the string representations of a date using the short date format specifier ("d") for the fr-FR culture. :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/DateTime.GetDateTimeFormats/FS/class1.fs" id="Snippet4"::: - :::code language="csharp" source="~/snippets/csharp/System/DateTime/GetDateTimeFormats/class1.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/GetDateTimeFormats/class1.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/GetDateTimeFormats/class1.vb" id="Snippet4"::: ]]> @@ -4219,7 +4219,7 @@ juillet 2009 ## Remarks The value of the property is always expressed using a 24-hour clock. To retrieve a string that represents the hour of a date and time using a 12-hour clock, call the or method with the "h" custom format specifier. For example: - :::code language="csharp" source="~/snippets/csharp/System/DateTime/Hour/Hour1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/Hour/Hour1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.DateTime.Hour/fs/Hour1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/Hour/Hour1.vb" id="Snippet1"::: @@ -4487,7 +4487,7 @@ juillet 2009 ## Examples The following example instantiates a object by passing its constructor an 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 . - :::code language="csharp" source="~/snippets/csharp/System/DateTime/MaxValue/MinValue.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/MaxValue/MinValue.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.DateTime.MinValue/fs/MinValue.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/MaxValue/MinValue.vb" id="Snippet2"::: @@ -4580,19 +4580,19 @@ juillet 2009 ## Remarks You can display the string representation of the property by using the "fff" format specifier. For example, the following code displays a string that contains the number of milliseconds in a date and time to the console. - :::code language="csharp" source="~/snippets/csharp/System/DateTime/Millisecond/Millisecond.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/Millisecond/Millisecond.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.DateTime.Millisecond/fs/Millisecond.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/Millisecond/Millisecond.vb" id="Snippet1"::: You can also display the millisecond component together with the other components of a date and time value by using the "o" standard format specifier. For example: - :::code language="csharp" source="~/snippets/csharp/System/DateTime/Millisecond/Millisecond.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/Millisecond/Millisecond.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.DateTime.Millisecond/fs/Millisecond.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/Millisecond/Millisecond.vb" id="Snippet2"::: However, the "o" format specifier is intended less for displaying than for round-tripping or storing a value. You can also display milliseconds together with other date and time components by using a custom format string, as the following example shows. - :::code language="csharp" source="~/snippets/csharp/System/DateTime/Millisecond/Millisecond.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/Millisecond/Millisecond.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.DateTime.Millisecond/fs/Millisecond.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/Millisecond/Millisecond.vb" id="Snippet3"::: @@ -4731,7 +4731,7 @@ juillet 2009 ## Examples The following example instantiates a object by passing its constructor an 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 . - :::code language="csharp" source="~/snippets/csharp/System/DateTime/MaxValue/MinValue.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/MaxValue/MinValue.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.DateTime.MinValue/fs/MinValue.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/MaxValue/MinValue.vb" id="Snippet2"::: @@ -5702,8 +5702,6 @@ The `DateTime.Parse` overloads return a value whose @@ -7998,7 +7996,7 @@ In general, the ticks represent the time according to the time zone specified by The following example uses the property to display the number of ticks that have elapsed since the beginning of the twenty-first century and to instantiate a object. The object is then used to display the elapsed time using several other time intervals. - :::code language="csharp" source="~/snippets/csharp/System/DateTime/Ticks/Ticks.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/Ticks/Ticks.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.DateTime.Ticks/fs/Ticks.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/Ticks/Ticks.vb" id="Snippet1"::: @@ -8698,7 +8696,7 @@ The value of the current object is formatted using the pa ## Examples The following example demonstrates the method. It also shows that the result of calling the method is identical to calling the method with "d" as the format parameter. - :::code language="csharp" source="~/snippets/csharp/System/DateTime/ToShortDateString/ToShortDateString.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/ToShortDateString/ToShortDateString.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.DateTime.ToShortDateString/fs/ToShortDateString.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/ToShortDateString/ToShortDateString.vb" id="Snippet1"::: @@ -8860,7 +8858,7 @@ The value of the current object is formatted using the pa The following example illustrates how the string representation of a value returned by the method depends on the thread current culture. It changes the current culture to en-US, fr-FR, and ja-JP, and in each case calls the method to return the string representation of a date and time value using that culture. - :::code language="csharp" source="~/snippets/csharp/System/DateTime/ToString/ToString1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/ToString/ToString1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.DateTime.ToString/fs/ToString1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/ToString/ToString1.vb" id="Snippet1"::: @@ -8970,7 +8968,7 @@ The following example illustrates how the string representation of a objects that represent five different cultures. - :::code language="csharp" source="~/snippets/csharp/System/DateTime/ToString/ToString4.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/ToString/ToString4.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.DateTime.ToString/fs/ToString4.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/ToString/ToString4.vb" id="Snippet3"::: @@ -8980,7 +8978,7 @@ The following example illustrates how the string representation of a The method returns the string representation of the date and time in the calendar used by the culture represented by the parameter. Its calendar is defined by the property. If the value of the current instance is earlier than or later than , the method throws an . The following example provides an illustration. It attempts to format a date that is outside the range of the class. - :::code language="csharp" source="~/snippets/csharp/System/DateTime/ToString/datetime.tostring.argumentoutofrangeexception1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/ToString/datetime.tostring.argumentoutofrangeexception1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.datetime.tostring.argumentoutofrangeexception/fs/datetime.tostring.argumentoutofrangeexception1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/ToString/datetime.tostring.argumentoutofrangeexception1.vb" id="Snippet1"::: @@ -9074,14 +9072,14 @@ The following example illustrates how the string representation of a value. The thread current culture for the example is en-US. - :::code language="csharp" source="~/snippets/csharp/System/DateTime/ToString/ToString2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/ToString/ToString2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.DateTime.ToString/fs/ToString2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/ToString/ToString2.vb" id="Snippet2"::: @@ -9096,7 +9094,7 @@ The following example illustrates how the string representation of a The method returns the string representation of the date and time in the calendar used by the current culture. If the value of the current instance is earlier than or later than , the method throws an . The following example provides an illustration. It attempts to format a date that is outside the range of the class when the current culture is Hebrew (Israel). - :::code language="csharp" source="~/snippets/csharp/System/DateTime/ToString/datetime.tostring.argumentoutofrangeexception3.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/ToString/datetime.tostring.argumentoutofrangeexception3.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.datetime.tostring.argumentoutofrangeexception/fs/datetime.tostring.argumentoutofrangeexception3.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/ToString/datetime.tostring.argumentoutofrangeexception3.vb" id="Snippet3"::: @@ -9195,14 +9193,14 @@ The following example illustrates how the string representation of a value using the invariant . :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic DateTime.ToString2 Example/FS/source.fs" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/DateTime/ToString/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/ToString/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/ToString/source.vb" id="Snippet1"::: ]]> @@ -9216,7 +9214,7 @@ The following example illustrates how the string representation of a The method returns the string representation of the date and time in the calendar used by the parameter. Its calendar is defined by the property. If the value of the current instance is earlier than or later than , the method throws an . The following example provides an illustration. It attempts to format a date that is outside the range of the class. - :::code language="csharp" source="~/snippets/csharp/System/DateTime/ToString/datetime.tostring.argumentoutofrangeexception4.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/ToString/datetime.tostring.argumentoutofrangeexception4.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.datetime.tostring.argumentoutofrangeexception/fs/datetime.tostring.argumentoutofrangeexception4.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/ToString/datetime.tostring.argumentoutofrangeexception4.vb" id="Snippet4"::: @@ -10470,7 +10468,7 @@ The following example illustrates the property returns the year of the current instance in the Gregorian calendar. It does not return the year using the default calendar of the current culture. To retrieve the year using a particular calendar, you can call that calendar's `GetYear` method, as the following code shows. - :::code language="csharp" source="~/snippets/csharp/System/DateTime/Year/Year.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/Year/Year.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.DateTime.Year/fs/Year.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/Year/Year.vb" id="Snippet1"::: diff --git a/xml/System/DateTimeOffset.xml b/xml/System/DateTimeOffset.xml index 70d4f99c499..4a4c27b7c03 100644 --- a/xml/System/DateTimeOffset.xml +++ b/xml/System/DateTimeOffset.xml @@ -1115,7 +1115,7 @@ In .NET 6 and earlier versions, the `days` parameter is rounded to the nearest m ## Examples The following example uses the method to list the dates that fall on Monday, the start of the work week, in March 2008. - :::code language="csharp" source="~/snippets/csharp/System/DateTimeOffset/Add/Methods.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTimeOffset/Add/Methods.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.DateTimeOffset.Methods/fs/Methods.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTimeOffset/Add/Methods.vb" id="Snippet2"::: @@ -6181,7 +6181,7 @@ Me.ToUtcDateTime().ToFileTime() ## Examples The following example displays a object using objects that represent the invariant culture, as well as four other cultures. - :::code language="csharp" source="~/snippets/csharp/System/DateTimeOffset/ToString/ToString.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTimeOffset/ToString/ToString.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.DateTimeOffset.ToString/fs/ToString.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTimeOffset/ToString/ToString.vb" id="Snippet2"::: @@ -6191,7 +6191,7 @@ Me.ToUtcDateTime().ToFileTime() The method returns the string representation of the date and time in the calendar used by the culture represented by the parameter. Its calendar is defined by the property. If the value of the current instance is earlier than or later than , the method throws an . The following example provides an illustration. It attempts to format a date that is outside the range of the class. - :::code language="csharp" source="~/snippets/csharp/System/DateTimeOffset/ToString/datetimeoffset.tostring.argumentoutofrangeexception1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTimeOffset/ToString/datetimeoffset.tostring.argumentoutofrangeexception1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.datetimeoffset.tostring.argumentoutofrangeexception/fs/datetimeoffset.tostring.argumentoutofrangeexception1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTimeOffset/ToString/datetimeoffset.tostring.argumentoutofrangeexception1.vb" id="Snippet1"::: @@ -6299,7 +6299,7 @@ Me.ToUtcDateTime().ToFileTime() The method returns the string representation of the date and time in the calendar used by the current culture. If the value of the current instance is earlier than or later than , the method throws an . The following example provides an illustration. It attempts to format a date that is outside the range of the class when the current culture is Hebrew (Israel). - :::code language="csharp" source="~/snippets/csharp/System/DateTimeOffset/ToString/datetimeoffset.tostring.argumentoutofrangeexception3.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTimeOffset/ToString/datetimeoffset.tostring.argumentoutofrangeexception3.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.datetimeoffset.tostring.argumentoutofrangeexception/fs/datetimeoffset.tostring.argumentoutofrangeexception3.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTimeOffset/ToString/datetimeoffset.tostring.argumentoutofrangeexception3.vb" id="Snippet3"::: @@ -6401,7 +6401,7 @@ Me.ToUtcDateTime().ToFileTime() ## Examples The following example uses the method to display a object using a custom format string for several different cultures. - :::code language="csharp" source="~/snippets/csharp/System/DateTimeOffset/ToString/ToString.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTimeOffset/ToString/ToString.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.DateTimeOffset.ToString/fs/ToString.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTimeOffset/ToString/ToString.vb" id="Snippet4"::: diff --git a/xml/System/DayOfWeek.xml b/xml/System/DayOfWeek.xml index 2ebe4dcad25..eace9e6ece8 100644 --- a/xml/System/DayOfWeek.xml +++ b/xml/System/DayOfWeek.xml @@ -71,7 +71,7 @@ ## Examples The following example demonstrates the property and the enumeration. - :::code language="csharp" source="~/snippets/csharp/System/DateTime/DayOfWeek/dow.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DateTime/DayOfWeek/dow.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/DateTime.DayOfWeek/FS/dow.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DateTime/DayOfWeek/dow.vb" id="Snippet1"::: diff --git a/xml/System/Decimal.xml b/xml/System/Decimal.xml index 3244beea398..a222c5df988 100644 --- a/xml/System/Decimal.xml +++ b/xml/System/Decimal.xml @@ -350,7 +350,7 @@ ## Examples The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with a value. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctordo.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctordo.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/.ctor/ctordo.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/.ctor/ctordo.vb" id="Snippet2"::: @@ -412,7 +412,7 @@ ## Examples The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with an value. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctori.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctori.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/.ctor/ctori.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/.ctor/ctori.vb" id="Snippet1"::: @@ -489,7 +489,7 @@ ## Examples The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with an array of four values. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctoriarr.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctoriarr.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/.ctor/ctoriarr.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/.ctor/ctoriarr.vb" id="Snippet1"::: @@ -553,7 +553,7 @@ ## Examples The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with an value. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctorl.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctorl.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/.ctor/ctorl.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/.ctor/ctorl.vb" id="Snippet3"::: @@ -653,7 +653,7 @@ ## Examples The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with a value. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctors.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctors.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/.ctor/ctors.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/.ctor/ctors.vb" id="Snippet1"::: @@ -721,7 +721,7 @@ ## Examples The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with a value. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctorui.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctorui.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/.ctor/ctorui.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/.ctor/ctorui.vb" id="Snippet2"::: @@ -783,7 +783,7 @@ ## Examples The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with a value. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctorul.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctorul.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/.ctor/ctorul.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/.ctor/ctorul.vb" id="Snippet4"::: @@ -853,13 +853,13 @@ ## Examples The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with three value words, a sign, and a scale factor. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctoriiibby.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctoriiibby.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/.ctor/ctoriiibby.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/.ctor/ctoriiibby.vb" id="Snippet2"::: The following example uses the method to retrieve the component parts of an array. It then uses this array in the call to the constructor to instantiate a new value. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctor2a.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctor2a.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/.ctor/ctor2a.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/.ctor/ctor2a.vb" id="Snippet1"::: @@ -1039,7 +1039,7 @@ ## Examples The following example illustrates the method and contrasts it with the method. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/Ceiling/ceiling1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/Ceiling/ceiling1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Ceiling/ceiling1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Ceiling/Ceiling1.vb" id="Snippet1"::: @@ -1173,7 +1173,7 @@ ## Examples The following example compares several values. Note that the first comparison indicates that the two values are equal despite the subtraction operation performed on the `value2` variable. This is because the type has 29 digits of precision, whereas a difference between these two values can be detected only with 30 digits of precision. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/Compare/Compare1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/Compare/Compare1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Compare/Compare1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Compare/Compare1.vb" id="Snippet1"::: @@ -1377,7 +1377,7 @@ ## Examples The following code example compares several `Decimal` and other objects to a reference `Decimal` value using the `CompareTo` method. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/CompareTo/cto_eq_obj.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/CompareTo/cto_eq_obj.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/CompareTo/cto_eq_obj.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/CompareTo/cto_eq_obj.vb" id="Snippet1"::: @@ -1745,7 +1745,7 @@ ## Examples The following example calls the method to divide a range of values by 22.1. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/Divide/Divide1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/Divide/Divide1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Divide/Divide1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Divide/Divide1.vb" id="Snippet1"::: @@ -1844,7 +1844,7 @@ Compiler overload resolution may account for an apparent difference in the behavior of the two method overloads. If an implicit conversion between the argument and a is defined and the argument is not typed as an , compilers may perform an implicit conversion and call the method. Otherwise, they call the method, which always returns if its argument is not a value. The following example illustrates the difference in behavior between the two method overloads. In the case of all primitive integral types, including both signed and unsigned types, the first comparison returns because the compiler automatically performs a widening conversion and calls the method, whereas the second comparison returns because the compiler calls the method. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/Equals/equalsoverl.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/Equals/equalsoverl.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Equals/equalsoverl.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Equals/equalsoverl.vb" id="Snippet2"::: @@ -1920,7 +1920,7 @@ ## Examples The following code example compares several `Decimal` and other objects to a reference `Decimal` value using the `Equals` method. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/CompareTo/cto_eq_obj.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/CompareTo/cto_eq_obj.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/CompareTo/cto_eq_obj.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/CompareTo/cto_eq_obj.vb" id="Snippet1"::: @@ -1929,7 +1929,7 @@ Compiler overload resolution may account for an apparent difference in the behavior of the two method overloads. If an implicit conversion between the argument and a is defined and the argument is not typed as an , compilers may perform an implicit conversion and call the method. Otherwise, they call the method, which always returns if its argument is not a value. The following example illustrates the difference in behavior between the two method overloads. In the case of all primitive integral types, including both signed and unsigned types, the first comparison returns because the compiler automatically performs a widening conversion and calls the method, whereas the second comparison returns because the compiler calls the method. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/Equals/equalsoverl.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/Equals/equalsoverl.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Equals/equalsoverl.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Equals/equalsoverl.vb" id="Snippet2"::: @@ -1998,7 +1998,7 @@ ## Examples The following code example compares several `Decimal` values to a reference `Decimal` value using the static `Equals` method. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/CompareTo/comp_equal.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/CompareTo/comp_equal.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/CompareTo/comp_equal.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/CompareTo/comp_equal.vb" id="Snippet2"::: @@ -2079,7 +2079,7 @@ ## Examples The following example illustrates the method and contrasts it with the method. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/Ceiling/ceiling1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/Ceiling/ceiling1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Ceiling/ceiling1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Ceiling/Ceiling1.vb" id="Snippet1"::: @@ -2139,7 +2139,7 @@ ## Examples The following code example uses the `FromOACurrency` method to convert fields that contain OLE Automation Currency values to the equivalent `Decimal` numbers. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/FromOACurrency/fromoacurrency.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/FromOACurrency/fromoacurrency.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/FromOACurrency/fromoacurrency.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/FromOACurrency/fromoacurrency.vb" id="Snippet2"::: @@ -2221,13 +2221,13 @@ ## Examples The following example uses the `GetBits` method to convert several `Decimal` values to their equivalent binary representations. It then displays the decimal values and the hexadecimal value of the elements in the array returned by the method. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/GetBits/getbits.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/GetBits/getbits.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/GetBits/getbits.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/GetBits/getbits.vb" id="Snippet2"::: The following example uses the method to retrieve the component parts of an array. It then uses this array in the call to the constructor to instantiate a new value. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctor2a.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctor2a.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/.ctor/ctor2a.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/.ctor/ctor2a.vb" id="Snippet1"::: @@ -2376,7 +2376,7 @@ ## Examples The following code example uses the `GetTypeCode` method to return the type code for `Decimal` value type. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/GetBits/gettypecode.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/GetBits/gettypecode.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/GetBits/gettypecode.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/GetBits/gettypecode.vb" id="Snippet3"::: @@ -2969,7 +2969,7 @@ For , this method matches the IE ## Examples The following code example illustrates the use of the `MinusOne` field. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/MinusOne/fields.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/MinusOne/fields.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/MinusOne/fields.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/MinusOne/fields.vb" id="Snippet1"::: @@ -3033,7 +3033,7 @@ For , this method matches the IE ## Examples The following code example illustrates the use of the `MinValue` field. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/MinusOne/fields.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/MinusOne/fields.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/MinusOne/fields.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/MinusOne/fields.vb" id="Snippet1"::: @@ -3105,7 +3105,7 @@ For , this method matches the IE ## Examples The following code example creates several pairs of `Decimal` values and calculates their products with the `Multiply` method. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/Multiply/mul_div_rem.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/Multiply/mul_div_rem.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Multiply/mul_div_rem.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Multiply/mul_div_rem.vb" id="Snippet1"::: @@ -3173,7 +3173,7 @@ For , this method matches the IE ## Examples The following code example uses the `Negate` method to change the sign of several `Decimal` values. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/Negate/floor_neg_trunc.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/Negate/floor_neg_trunc.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Negate/floor_neg_trunc.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Negate/floor_neg_trunc.vb" id="Snippet1"::: @@ -3228,7 +3228,7 @@ For , this method matches the IE ## Examples The following code example illustrates the use of the `One` field. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/MinusOne/fields.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/MinusOne/fields.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/MinusOne/fields.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/MinusOne/fields.vb" id="Snippet1"::: @@ -3304,7 +3304,7 @@ For , this method matches the IE ## Remarks The method defines the operation of the addition operator for values. It enables code such as the following: - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/addition1.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/addition1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Addition/addition1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Addition/addition1.vb" id="Snippet3"::: @@ -3372,7 +3372,7 @@ For , this method matches the IE ## Remarks The method defines the operation of the decrement operator for values. It enables code such as the following: - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/decrement1.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/decrement1.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Addition/decrement1.fs" id="Snippet4"::: Some languages (such as Visual Basic) that lack an increment operator can call the method directly, as the following example shows. @@ -3381,7 +3381,7 @@ For , this method matches the IE If your language does not support custom operators, call the method instead, as the following example shows. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/decrement2.cs" interactive="try-dotnet" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/decrement2.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Addition/decrement2.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Addition/decrement2.vb" id="Snippet6"::: @@ -3456,7 +3456,7 @@ For , this method matches the IE ## Remarks The method defines the operation of the division operator for values. It enables code such as the following: - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/division1.cs" interactive="try-dotnet" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/division1.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Addition/division1.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Addition/division1.vb" id="Snippet7"::: @@ -3536,7 +3536,7 @@ For , this method matches the IE ## Remarks The method defines the operation of the equality operator for values. It enables code such as the following: - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/equality1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/equality1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Addition/equality1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Addition/equality1.vb" id="Snippet1"::: @@ -3617,7 +3617,7 @@ For , this method matches the IE ## Examples The following example converts numbers to values by using the explicit to conversion operator. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/ctos_byte.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/ctos_byte.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Explicit/ctos_byte.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Explicit/ctos_byte.vb" id="Snippet4"::: @@ -3683,7 +3683,7 @@ For , this method matches the IE ## Examples The following example converts numbers to values (Unicode characters) by using the explicit to conversion operator. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/ctochar.cs" interactive="try-dotnet" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/ctochar.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Explicit/ctochar.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Explicit/ctochar.vb" id="Snippet6"::: @@ -3751,7 +3751,7 @@ For , this method matches the IE ## Examples The following example converts numbers to values by using the explicit to conversion operator. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/ctosgl_dbl.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/ctosgl_dbl.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Explicit/ctosgl_dbl.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Explicit/ctosgl_dbl.vb" id="Snippet5"::: @@ -3816,7 +3816,7 @@ For , this method matches the IE ## Examples The following example converts numbers to values by using the explicit to conversion operator. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/ctou_int16.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/ctou_int16.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Explicit/ctou_int16.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Explicit/ctou_int16.vb" id="Snippet3"::: @@ -3882,7 +3882,7 @@ For , this method matches the IE ## Examples The following example converts numbers to values by using the explicit to conversion operator. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/ctou_int32.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/ctou_int32.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Explicit/ctou_int32.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Explicit/ctou_int32.vb" id="Snippet2"::: @@ -3948,7 +3948,7 @@ For , this method matches the IE ## Examples The following example converts numbers to values by using the explicit to conversion operator. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/ctou_int64.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/ctou_int64.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Explicit/ctou_int64.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Explicit/ctou_int64.vb" id="Snippet1"::: @@ -4023,7 +4023,7 @@ For , this method matches the IE ## Examples The following example converts numbers to values by using the explicit to conversion operator. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/tosbyte.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/tosbyte.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Explicit/tosbyte.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Explicit/tosbyte.vb" id="Snippet1"::: @@ -4093,7 +4093,7 @@ For , this method matches the IE ## Examples The following example converts numbers to values by using the explicit to conversion operator. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/tosingle1.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/tosingle1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Explicit/tosingle1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Explicit/tosingle1.vb" id="Snippet2"::: @@ -4166,7 +4166,7 @@ For , this method matches the IE ## Examples The following example converts numbers to values by using the explicit to conversion operator. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/ctou_int16.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/ctou_int16.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Explicit/ctou_int16.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Explicit/ctou_int16.vb" id="Snippet3"::: @@ -4241,7 +4241,7 @@ For , this method matches the IE ## Examples The following example converts numbers to values by using the explicit to conversion operator. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/ctou_int32.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/ctou_int32.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Explicit/ctou_int32.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Explicit/ctou_int32.vb" id="Snippet2"::: @@ -4317,7 +4317,7 @@ For , this method matches the IE ## Examples The following example converts numbers to values by using the explicit to conversion operator. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/ctou_int64.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/ctou_int64.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Explicit/ctou_int64.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Explicit/ctou_int64.vb" id="Snippet1"::: @@ -4381,7 +4381,7 @@ For , this method matches the IE The following example converts values to numbers by using the to conversion operator. This conversion requires the op_Explicit operator in Visual Basic. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/cfromdouble.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/cfromdouble.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Explicit/cfromdouble.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Explicit/cfromdouble.vb" id="Snippet2"::: @@ -4448,7 +4448,7 @@ For , this method matches the IE ## Examples The following example converts values to numbers by using the to conversion operator. This conversion requires the op_Explicit operator in Visual Basic. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/cfromsingle.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/cfromsingle.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Explicit/cfromsingle.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Explicit/cfromsingle.vb" id="Snippet3"::: @@ -4528,7 +4528,7 @@ For , this method matches the IE ## Remarks The method defines the operation of the greater than operator for values. It enables code such as the following: - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/greaterthan1.cs" interactive="try-dotnet" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/greaterthan1.cs" id="Snippet8"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Addition/greaterthan1.fs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Addition/greaterthan1.vb" id="Snippet8"::: @@ -4607,7 +4607,7 @@ For , this method matches the IE ## Remarks The method defines the operation of the greater than or equal operator for values. It enables code such as the following: - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/greaterthanorequal1.cs" interactive="try-dotnet" id="Snippet10"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/greaterthanorequal1.cs" id="Snippet10"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Addition/greaterthanorequal1.fs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Addition/greaterthanorequal1.vb" id="Snippet10"::: @@ -4696,7 +4696,7 @@ For , this method matches the IE ## Examples The following example converts values to numbers. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Implicit/cfrombyte.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Implicit/cfrombyte.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Implicit/cfrombyte.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Implicit/cfrombyte.vb" id="Snippet4"::: @@ -4760,7 +4760,7 @@ For , this method matches the IE ## Examples The following example converts values (Unicode characters) to numbers. This conversion requires the op_Implicit operator in Visual Basic, but not in C#. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/cfromchar.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/cfromchar.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Explicit/cfromchar.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Explicit/cfromchar.vb" id="Snippet1"::: @@ -4824,7 +4824,7 @@ For , this method matches the IE ## Examples The following example converts values to numbers. This conversion requires the op_Implicit operator in Visual Basic, but not in C#. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Implicit/cfromint16.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Implicit/cfromint16.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Implicit/cfromint16.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Implicit/cfromint16.vb" id="Snippet3"::: @@ -4888,7 +4888,7 @@ For , this method matches the IE ## Examples The following example converts values to numbers. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Implicit/cfromint32.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Implicit/cfromint32.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Implicit/cfromint32.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Implicit/cfromint32.vb" id="Snippet2"::: @@ -4952,7 +4952,7 @@ For , this method matches the IE ## Examples The following example converts values to numbers. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Implicit/cfromint64.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Implicit/cfromint64.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Implicit/cfromint64.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Implicit/cfromint64.vb" id="Snippet1"::: @@ -5024,7 +5024,7 @@ For , this method matches the IE ## Examples The following example converts values to numbers. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Implicit/cfromsbyte.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Implicit/cfromsbyte.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Implicit/cfromsbyte.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Implicit/cfromsbyte.vb" id="Snippet4"::: @@ -5096,7 +5096,7 @@ For , this method matches the IE ## Examples The following example converts values to numbers. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Implicit/cfromuint16.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Implicit/cfromuint16.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Implicit/cfromuint16.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Implicit/cfromuint16.vb" id="Snippet3"::: @@ -5168,7 +5168,7 @@ For , this method matches the IE ## Examples The following example converts values to numbers. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Implicit/cfromuint32.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Implicit/cfromuint32.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Implicit/cfromuint32.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Implicit/cfromuint32.vb" id="Snippet2"::: @@ -5240,7 +5240,7 @@ For , this method matches the IE ## Examples The following example converts values to numbers by using the to conversion operator. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Implicit/cfromuint64.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Implicit/cfromuint64.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Implicit/cfromuint64.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Implicit/cfromuint64.vb" id="Snippet1"::: @@ -5305,7 +5305,7 @@ For , this method matches the IE ## Remarks The method defines the operation of the increment operator for values. It enables code such as the following: - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/increment1.cs" interactive="try-dotnet" id="Snippet12"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/increment1.cs" id="Snippet12"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Addition/increment1.fs" id="Snippet12"::: Some languages (such as Visual Basic) that lack an increment operator can call the method directly, as the following example shows. @@ -5314,7 +5314,7 @@ For , this method matches the IE If your language does not support custom operators, call the method instead, as the following example shows. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/increment2.cs" interactive="try-dotnet" id="Snippet14"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/increment2.cs" id="Snippet14"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Addition/increment2.fs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Addition/increment2.vb" id="Snippet14"::: @@ -5390,7 +5390,7 @@ For , this method matches the IE ## Remarks The method defines the operation of the inequality operator for values. It enables code such as the following: - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/inequality1.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/inequality1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Addition/inequality1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Addition/inequality1.vb" id="Snippet2"::: @@ -5471,7 +5471,7 @@ For , this method matches the IE ## Remarks The method defines the operation of the less than operator for values. It enables code such as the following: - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/lessthan1.cs" interactive="try-dotnet" id="Snippet15"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/lessthan1.cs" id="Snippet15"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Addition/lessthan1.fs" id="Snippet15"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Addition/lessthan1.vb" id="Snippet15"::: @@ -5550,7 +5550,7 @@ For , this method matches the IE ## Remarks The method defines the operation of the less than or equal operator for values. It enables code such as the following: - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/lessthanorequal1.cs" interactive="try-dotnet" id="Snippet17"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/lessthanorequal1.cs" id="Snippet17"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Addition/lessthanorequal1.fs" id="Snippet17"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Addition/lessthanorequal1.vb" id="Snippet17"::: @@ -5622,7 +5622,7 @@ For , this method matches the IE ## Remarks The operator defines the remainder operation that returns the remainder resulting from dividing two specified values. It enables code such as the following: - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/modulus1.cs" interactive="try-dotnet" id="Snippet19"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/modulus1.cs" id="Snippet19"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Addition/modulus1.fs" id="Snippet19"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Addition/modulus1.vb" id="Snippet19"::: @@ -5702,7 +5702,7 @@ For , this method matches the IE ## Remarks The method defines the operation of the multiplication operator for values. It enables code such as the following: - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/multiply1.cs" interactive="try-dotnet" id="Snippet20"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/multiply1.cs" id="Snippet20"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Addition/multiply1.fs" id="Snippet20"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Addition/multiply1.vb" id="Snippet20"::: @@ -5779,7 +5779,7 @@ For , this method matches the IE ## Remarks The method defines the operation of the subtraction operator for values. It enables code such as the following: - :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/subtraction1.cs" interactive="try-dotnet" id="Snippet21"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/subtraction1.cs" id="Snippet21"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Addition/subtraction1.fs" id="Snippet21"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/op_Addition/subtraction1.vb" id="Snippet21"::: @@ -6004,7 +6004,7 @@ For , this method matches the IE ## Examples The following code example uses the method to parse string representations of values. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/Parse/parse.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/Parse/parse.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Parse/parse.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Parse/parse.vb" id="Snippet1"::: @@ -6222,7 +6222,7 @@ For , this method matches the IE ## Examples The following code example uses the method to parse the string representations of values using the en-US culture. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/Parse/parse.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/Parse/parse.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Parse/parse.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Parse/parse.vb" id="Snippet2"::: @@ -6577,7 +6577,7 @@ For , this method matches the IE ## Examples The following example uses a variety of `style` and `provider` parameters to parse the string representations of values. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/Parse/parse.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/Parse/parse.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Parse/parse.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Parse/parse.vb" id="Snippet3"::: @@ -6654,7 +6654,7 @@ For , this method matches the IE ## Examples The following example uses the method to calculate the remainder in a series of division operations. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/Remainder/remainder.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/Remainder/remainder.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Remainder/remainder.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Remainder/remainder.vb" id="Snippet1"::: @@ -6729,7 +6729,7 @@ For , this method matches the IE ## Examples The following example rounds a range of values between 100 and 102 to the nearest integer. Because the method uses banker's rounding, 100.5 rounds to 100 and 101.5 rounds to 102. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/Round1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/Round1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Round/Round1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Round/Round1.vb" id="Snippet1"::: @@ -6803,7 +6803,7 @@ This method is equivalent to calling the or method with different `mode` arguments. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/midpoint1.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/midpoint1.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Round/midpoint1.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Round/midpoint1.vb" id="Snippet5"::: @@ -6959,7 +6959,7 @@ If you specify or method with the enumeration. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/mpr.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/mpr.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Round/mpr.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Round/mpr.vb" id="Snippet1"::: @@ -9849,7 +9849,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example uses the method to convert decimal numbers to values. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToByte/tobyte_1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToByte/tobyte_1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/ToByte/tobyte_1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/ToByte/tobyte_1.vb" id="Snippet1"::: @@ -9925,7 +9925,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following code example converts `Decimal` numbers to values using `ToDouble` method. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToDouble/tosgl_dbl.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToDouble/tosgl_dbl.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/ToDouble/tosgl_dbl.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/ToDouble/tosgl_dbl.vb" id="Snippet5"::: @@ -9991,7 +9991,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example uses the method to convert decimal numbers to values. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToInt16/toint16_1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToInt16/toint16_1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/ToInt16/toint16_1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/ToInt16/toint16_1.vb" id="Snippet1"::: @@ -10067,7 +10067,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example uses the method to convert decimal numbers to values. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToInt32/toint32_1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToInt32/toint32_1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/ToInt32/toint32_1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/ToInt32/toint32_1.vb" id="Snippet1"::: @@ -10143,7 +10143,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example uses the method to convert decimal numbers to values. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToInt64/toint64_1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToInt64/toint64_1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/ToInt64/toint64_1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/ToInt64/toint64_1.vb" id="Snippet1"::: @@ -10202,7 +10202,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following code example uses the `ToOACurrency` method to convert `Decimal` numbers to the equivalent OLE Automation Currency values that are contained in fields. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/FromOACurrency/tooacurrency.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/FromOACurrency/tooacurrency.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/FromOACurrency/tooacurrency.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/FromOACurrency/tooacurrency.vb" id="Snippet1"::: @@ -10274,7 +10274,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example uses the method to convert decimal numbers to values. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToSByte/tosbyte1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToSByte/tosbyte1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/ToSByte/tosbyte1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/ToSByte/tosbyte1.vb" id="Snippet1"::: @@ -10351,7 +10351,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following code example converts `Decimal` numbers to values using the `ToSingle` method. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToDouble/tosgl_dbl.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToDouble/tosgl_dbl.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/ToDouble/tosgl_dbl.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/ToDouble/tosgl_dbl.vb" id="Snippet5"::: @@ -10554,7 +10554,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example displays the string representation of a value using objects that represent several different cultures. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToString/ToString2.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToString/ToString2.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/ToString/ToString2.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/ToString/ToString2.vb" id="Snippet3"::: @@ -10763,7 +10763,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example displays a value using each of the supported standard numeric format specifiers for several different cultures. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToString/ToString2.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToString/ToString2.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/ToString/ToString2.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/ToString/ToString2.vb" id="Snippet5"::: @@ -10843,7 +10843,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example uses the method to convert decimal numbers to values. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToUInt16/touint16_1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToUInt16/touint16_1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/ToUInt16/touint16_1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/ToUInt16/touint16_1.vb" id="Snippet1"::: @@ -10924,7 +10924,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example uses the method to convert decimal numbers to values. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToUInt32/touint32_1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToUInt32/touint32_1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/ToUInt32/touint32_1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/ToUInt32/touint32_1.vb" id="Snippet1"::: @@ -11005,7 +11005,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example uses the method to convert decimal numbers to values. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToUInt64/touint64_1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/ToUInt64/touint64_1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/ToUInt64/touint64_1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/ToUInt64/touint64_1.vb" id="Snippet1"::: @@ -11083,7 +11083,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following code example uses the `Truncate` method to discard the fractional digits of several `Decimal` values. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/Negate/floor_neg_trunc.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/Negate/floor_neg_trunc.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Negate/floor_neg_trunc.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Negate/floor_neg_trunc.vb" id="Snippet1"::: @@ -11449,7 +11449,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example uses the method to convert the string representations of numeric values to values. It assumes that en-US is the current culture. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/TryParse/TryParse.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/TryParse/TryParse.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/TryParse/TryParse.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/TryParse/TryParse.vb" id="Snippet1"::: @@ -11808,7 +11808,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example demonstrates the use of the method to parse the string representation of a number that has a particular style and is formatted using the conventions of a particular culture. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/TryParse/TryParse.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/TryParse/TryParse.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/TryParse/TryParse.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/TryParse/TryParse.vb" id="Snippet2"::: @@ -11872,7 +11872,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following code example illustrates the use of the `Zero` field. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/MinusOne/fields.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/MinusOne/fields.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/MinusOne/fields.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/MinusOne/fields.vb" id="Snippet1"::: diff --git a/xml/System/DivideByZeroException.xml b/xml/System/DivideByZeroException.xml index a9d3abd20e2..d5520139e68 100644 --- a/xml/System/DivideByZeroException.xml +++ b/xml/System/DivideByZeroException.xml @@ -71,7 +71,7 @@ Dividing a floating-point value by zero doesn't throw an exception; it results in positive infinity, negative infinity, or not a number (NaN), according to the rules of IEEE 754 arithmetic. Because the following example uses floating-point division rather than integer division, the operation does not throw a exception. - :::code language="csharp" source="~/snippets/csharp/System/DivideByZeroException/Overview/exception2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/DivideByZeroException/Overview/exception2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.dividebyzeroexception.class/fs/exception2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/DivideByZeroException/Overview/exception2.vb" id="Snippet2"::: @@ -96,7 +96,7 @@ ## Examples The following example handles a exception in integer division. - :::code language="csharp" source="~/snippets/csharp/System/DivideByZeroException/Overview/exception1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/DivideByZeroException/Overview/exception1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.dividebyzeroexception.class/fs/exception1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/DivideByZeroException/Overview/exception1.vb" id="Snippet1"::: diff --git a/xml/System/Double.xml b/xml/System/Double.xml index 81760ab3f3f..e2bd010481a 100644 --- a/xml/System/Double.xml +++ b/xml/System/Double.xml @@ -1156,7 +1156,7 @@ This computes `arctan(x) / π` in the interval `[-0.5, +0.5]`. method for several value and reference types. -:::code language="csharp" source="~/snippets/csharp/System/Boolean/CompareTo/cat.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/Boolean/CompareTo/cat.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Boolean/CompareTo/cat.vb" id="Snippet1"::: ]]> @@ -1852,7 +1852,7 @@ Euler's number is approximately 2.7182818284590452354. Compiler overload resolution may account for an apparent difference in the behavior of the two method overloads. If an implicit conversion between the argument and a is defined and the argument is not typed as an , compilers may perform an implicit conversion and call the method. Otherwise, they call the method, which always returns if its argument is not a value. The following example illustrates the difference in behavior between the two method overloads. In the case of all primitive numeric types except for and in C#, the first comparison returns because the compiler automatically performs a widening conversion and calls the method, whereas the second comparison returns because the compiler calls the method. - :::code language="csharp" source="~/snippets/csharp/System/Double/Equals/equalsoverl.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Double/Equals/equalsoverl.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/Equals/equalsoverl.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/Equals/equalsoverl.vb" id="Snippet2"::: @@ -1921,7 +1921,7 @@ Euler's number is approximately 2.7182818284590452354. ## Remarks The method should be used with caution, because two apparently equivalent values can be unequal due to the differing precision of the two values. The following example reports that the value .3333 and the returned by dividing 1 by 3 are unequal. - :::code language="csharp" source="~/snippets/csharp/System/Double/Epsilon/Equals_25051.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Double/Epsilon/Equals_25051.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/Epsilon/Equals_25051.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/Equals/Equals_25051.vb" id="Snippet3"::: @@ -1939,7 +1939,7 @@ Euler's number is approximately 2.7182818284590452354. Compiler overload resolution may account for an apparent difference in the behavior of the two method overloads. If an implicit conversion between the argument and a is defined and the argument is not typed as an , compilers may perform an implicit conversion and call the method. Otherwise, they call the method, which always returns if its argument is not a value. The following example illustrates the difference in behavior between the two method overloads. In the case of all primitive numeric types except for and in C#, the first comparison returns because the compiler automatically performs a widening conversion and calls the method, whereas the second comparison returns because the compiler calls the method. - :::code language="csharp" source="~/snippets/csharp/System/Double/Equals/equalsoverl.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Double/Equals/equalsoverl.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/Equals/equalsoverl.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/Equals/equalsoverl.vb" id="Snippet2"::: @@ -2642,7 +2642,7 @@ A return value of `false` does not imply that : - :::code language="csharp" source="~/snippets/csharp/System/Double/CompareTo/doublesample.cs" interactive="try-dotnet-method" id="Snippet11"::: + :::code language="csharp" source="~/snippets/csharp/System/Double/CompareTo/doublesample.cs" id="Snippet11"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/CompareTo/doublesample.fs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/IsInfinity/doublesample.vb" id="Snippet11"::: @@ -3853,7 +3853,7 @@ For this method matches the IEEE 754:2 The result of an operation that exceeds is . In the following example, results from addition, multiplication, and exponentiation operations when the result exceeds . - :::code language="csharp" source="~/snippets/csharp/System/Double/MaxValue/maxvalueex.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Double/MaxValue/maxvalueex.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/MaxValue/maxvalueex.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/MaxValue/maxvalueex.vb" id="Snippet1"::: @@ -4153,7 +4153,7 @@ For this method matches the IEEE 754:2 The result of an operation that is less than is . In the following example, results from subtraction and multiplication operations when the result is less than . - :::code language="csharp" source="~/snippets/csharp/System/Double/MinValue/minvalueex.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Double/MinValue/minvalueex.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/MinValue/minvalueex.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/MinValue/minvalueex.vb" id="Snippet1"::: @@ -4256,19 +4256,19 @@ For this method matches the IEEE 754:2 A method or operator returns when the result of an operation is undefined. For example, the result of dividing zero by zero is , as the following example shows. (However, dividing a non-zero number by zero returns either or , depending on the sign of the divisor.) -:::code language="csharp" source="~/snippets/csharp/System/Double/NaN/nan1.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/Double/NaN/nan1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/NaN/nan1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/NaN/nan1.vb" id="Snippet1"::: In addition, a method call with a value or an operation on a value returns , as the following example shows. -:::code language="csharp" source="~/snippets/csharp/System/Double/NaN/nan1.cs" interactive="try-dotnet-method" id="Snippet2"::: +:::code language="csharp" source="~/snippets/csharp/System/Double/NaN/nan1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/NaN/nan1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/NaN/nan1.vb" id="Snippet2"::: Use the method to determine whether a value is not a number. The operator considers two values to be unequal to one another. In general, operators cannot be used to compare with other values, although comparison methods (such as and ) can. The following example illustrates the difference in behavior between comparison operators and methods. -:::code language="csharp" source="~/snippets/csharp/System/Double/NaN/double.nan4.cs" interactive="try-dotnet" id="Snippet4"::: +:::code language="csharp" source="~/snippets/csharp/System/Double/NaN/double.nan4.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/NaN/double.nan4.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/NaN/double.nan4.vb" id="Snippet4"::: @@ -4276,7 +4276,7 @@ Use the method to determine whether a value is not The following example illustrates the use of . -:::code language="csharp" source="~/snippets/csharp/System/Double/CompareTo/doublesample.cs" interactive="try-dotnet-method" id="Snippet7"::: +:::code language="csharp" source="~/snippets/csharp/System/Double/CompareTo/doublesample.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/CompareTo/doublesample.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/IsInfinity/doublesample.vb" id="Snippet7"::: @@ -4340,7 +4340,7 @@ Use to determine whether a value eval The following code example illustrates the use of : -:::code language="csharp" source="~/snippets/csharp/System/Double/CompareTo/doublesample.cs" interactive="try-dotnet-method" id="Snippet9"::: +:::code language="csharp" source="~/snippets/csharp/System/Double/CompareTo/doublesample.cs" id="Snippet9"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/CompareTo/doublesample.fs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/IsInfinity/doublesample.vb" id="Snippet9"::: @@ -4845,7 +4845,7 @@ The following code example illustrates the use of method a string that is created by calling the method, the original value is returned. However, on .NET Framework and on .NET Core 2.2 and earlier versions, the values may not be equal because of a loss of precision. In addition, attempting to parse the string representation of either or fails to round-trip. On .NET Framework and .NET Core 2.2 and previous versions, it throws an . The following example provides an illustration. - :::code language="csharp" source="~/snippets/csharp/System/Double/Parse/parse2.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Double/Parse/parse2.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/Parse/parse2.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/Parse/parse2.vb" id="Snippet3"::: @@ -5072,7 +5072,7 @@ If a separator is encountered in the `s` parameter during a parse operation, and Ordinarily, if you pass the method a string that is created by calling the method, the original value is returned. However, because of a loss of precision, the values may not be equal. In addition, attempting to parse the string representation of either or fails to round-trip. On .NET Framework and .NET Core 2.2 and previous versions, it throws an . On .NET Core 3.0 and later versions, it returns if you attempt to parse or if you attempt to parse . The following example provides an illustration. - :::code language="csharp" source="~/snippets/csharp/System/Double/Parse/parse2.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Double/Parse/parse2.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/Parse/parse2.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/Parse/parse2.vb" id="Snippet3"::: @@ -5198,7 +5198,7 @@ If a separator is encountered in the `s` parameter during a parse operation, and Ordinarily, if you pass the method a string that is created by calling the method, the original value is returned. However, because of a loss of precision, the values may not be equal. In addition, attempting to parse the string representation of either or fails to round-trip. On .NET Framework and .NET Core 2.2 and previous versions, it throws an . On .NET Core 3.0 and later versions, it returns if you attempt to parse or if you attempt to parse . The following example provides an illustration. - :::code language="csharp" source="~/snippets/csharp/System/Double/Parse/parse2.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Double/Parse/parse2.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/Parse/parse2.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/Parse/parse2.vb" id="Snippet3"::: @@ -5461,7 +5461,7 @@ If `s` is out of range of the data type, the method returns Ordinarily, if you pass the method a string that is created by calling the method, the original value is returned. However, because of a loss of precision, the values may not be equal. In addition, attempting to parse the string representation of either or fails to round-trip. On .NET Framework and .NET Core 2.2 and previous versions, it throws an . On .NET Core 3.0 and later versions, it returns if you attempt to parse or if you attempt to parse . The following example provides an illustration. - :::code language="csharp" source="~/snippets/csharp/System/Double/Parse/parse2.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Double/Parse/parse2.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/Parse/parse2.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/Parse/parse2.vb" id="Snippet3"::: @@ -5474,7 +5474,7 @@ If a separator is encountered in the `s` parameter during a parse operation, and ## Examples The following example illustrates the use of the method to assign several string representations of temperature values to a `Temperature` object. - :::code language="csharp" source="~/snippets/csharp/System/Double/Parse/Parse3.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Double/Parse/Parse3.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/Parse/Parse3.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/Parse/Parse3.vb" id="Snippet2"::: @@ -5589,7 +5589,7 @@ Use to determine whether a value eval The following code example illustrates the use of : -:::code language="csharp" source="~/snippets/csharp/System/Double/CompareTo/doublesample.cs" interactive="try-dotnet-method" id="Snippet10"::: +:::code language="csharp" source="~/snippets/csharp/System/Double/CompareTo/doublesample.cs" id="Snippet10"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/CompareTo/doublesample.fs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/IsInfinity/doublesample.vb" id="Snippet10"::: @@ -9354,7 +9354,7 @@ Tau is approximately 6.2831853071795864769. ## Examples The following example uses the default method to display the string representations of a number of values. - :::code language="csharp" source="~/snippets/csharp/System/Double/ToString/ToString1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Double/ToString/ToString1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/ToString/ToString1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/ToString/ToString1.vb" id="Snippet1"::: @@ -9480,7 +9480,7 @@ Tau is approximately 6.2831853071795864769. ## Examples The following example displays the string representation of two values using objects that represent several different cultures. - :::code language="csharp" source="~/snippets/csharp/System/Double/ToString/ToString1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Double/ToString/ToString1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/ToString/ToString1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/ToString/ToString1.vb" id="Snippet2"::: @@ -9607,7 +9607,7 @@ Tau is approximately 6.2831853071795864769. In some cases, values formatted with the "R" standard numeric format string do not successfully round-trip if compiled using the or switches and run on 64-bit systems. To work around this problem, you can format values by using the "G17" standard numeric format string. The following example uses the "R" format string with a value that does not round-trip successfully, and also uses the "G17" format string to successfully round-trip the original value. - :::code language="csharp" source="~/snippets/csharp/System/Double/ToString/roundtripex2.cs" interactive="try-dotnet" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/Double/ToString/roundtripex2.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/ToString/roundtripex2.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/ToString/roundtripex2.vb" id="Snippet6"::: @@ -9714,7 +9714,7 @@ Tau is approximately 6.2831853071795864769. ## Examples The following example displays a value using each of the supported standard numeric format specifiers for several different cultures. - :::code language="csharp" source="~/snippets/csharp/System/Double/ToString/ToString1.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Double/ToString/ToString1.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/ToString/ToString1.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/ToString/ToString1.vb" id="Snippet4"::: @@ -9729,7 +9729,7 @@ Tau is approximately 6.2831853071795864769. In some cases, values formatted with the "R" standard numeric format string do not successfully round-trip if compiled using the or switches and run on 64-bit systems. To work around this problem, you can format values by using the "G17" standard numeric format string. The following example uses the "R" format string with a value that does not round-trip successfully, and also uses the "G17" format string to successfully round-trip the original value. - :::code language="csharp" source="~/snippets/csharp/System/Double/ToString/roundtripex1.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Double/ToString/roundtripex1.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/ToString/roundtripex1.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/ToString/roundtripex1.vb" id="Snippet5"::: @@ -10093,7 +10093,7 @@ Tau is approximately 6.2831853071795864769. Ordinarily, if you pass the method a string that is created by calling the method, the original value is returned. However, because of a loss of precision, the values may not be equal. In addition, attempting to parse the string representation of either or fails to round-trip. On .NET Framework and .NET Core 2.2 and previous versions, it throws an . On .NET Core 3.0 and later versions, it returns if you attempt to parse or if you attempt to parse . The following example provides an illustration. - :::code language="csharp" source="~/snippets/csharp/System/Double/TryParse/tryparse2.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Double/TryParse/tryparse2.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/TryParse/tryparse2.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/TryParse/tryparse2.vb" id="Snippet3"::: @@ -10106,7 +10106,7 @@ If a separator is encountered in the `s` parameter during a parse operation, and ## Examples The following example uses the method to convert the string representations of numeric values to values. It assumes that en-US is the current culture. - :::code language="csharp" source="~/snippets/csharp/System/Double/TryParse/tryparse1a.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Double/TryParse/tryparse1a.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/TryParse/tryparse1a.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/TryParse/tryparse1a.vb" id="Snippet1"::: @@ -10490,7 +10490,7 @@ If a separator is encountered in the `s` parameter during a parse operation, and Ordinarily, if you pass the method a string that is created by calling the method, the original value is returned. However, because of a loss of precision, the values may not be equal. In addition, attempting to parse the string representation of either or fails to round-trip. On .NET Framework and .NET Core 2.2 and previous versions, it throws an . On .NET Core 3.0 and later versions, it returns if you attempt to parse or if you attempt to parse . The following example provides an illustration. - :::code language="csharp" source="~/snippets/csharp/System/Double/TryParse/tryparse2.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Double/TryParse/tryparse2.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/TryParse/tryparse2.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/TryParse/tryparse2.vb" id="Snippet3"::: @@ -10503,7 +10503,7 @@ On .NET Core 3.0 and later versions, no exception is thrown when `s` is out of r ## Examples The following example demonstrates the use of the method to parse the string representation of numbers that have a particular style and are formatted using the conventions of a particular culture. - :::code language="csharp" source="~/snippets/csharp/System/Double/TryParse/TryParse1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Double/TryParse/TryParse1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Double/TryParse/TryParse1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Double/TryParse/TryParse1.vb" id="Snippet2"::: diff --git a/xml/System/Enum.xml b/xml/System/Enum.xml index 4808a7bc8d0..7ede4edbd79 100644 --- a/xml/System/Enum.xml +++ b/xml/System/Enum.xml @@ -213,7 +213,7 @@ ## Examples The following example illustrates the use of `CompareTo` in the context of `Enum`. - :::code language="csharp" source="~/snippets/csharp/System/Enum/CompareTo/EnumCompareTo.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Enum/CompareTo/EnumCompareTo.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Enum/CompareTo/EnumCompareTo.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Enum/CompareTo/EnumCompareTo.vb" id="Snippet1"::: @@ -299,13 +299,13 @@ ## Examples The following example illustrates the use of the method. - :::code language="csharp" source="~/snippets/csharp/System/Enum/Equals/EnumEquals.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Enum/Equals/EnumEquals.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Enum/Equals/EnumEquals.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Enum/Equals/EnumEquals.vb" id="Snippet1"::: The following example defines two enumeration types, `SledDog` and `WorkDog`. The `SledDog` enumeration has two members, `SledDog.AlaskanMalamute` and `SledDog.Malamute`, that have the same underlying value. The call to the method indicates that these values are equal because their underlying values are the same. The `SledDog.Malamute` and `WorkDog.Newfoundland` members have the same underlying value, although they represent different enumeration types. A call to the method indicates that these values are not equal. - :::code language="csharp" source="~/snippets/csharp/System/Enum/Equals/enumequals1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Enum/Equals/enumequals1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Enum/Equals/enumequals1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Enum/Equals/enumequals1.vb" id="Snippet1"::: @@ -394,7 +394,7 @@ ## Examples The following example illustrates the use of `Format` in the context of `Enum`. - :::code language="csharp" source="~/snippets/csharp/System/Enum/Format/EnumFormat.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Enum/Format/EnumFormat.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Enum/Format/EnumFormat.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Enum/Format/EnumFormat.vb" id="Snippet1"::: @@ -539,7 +539,7 @@ ## Examples The following example illustrates the use of `GetName`. - :::code language="csharp" source="~/snippets/csharp/System/Enum/GetName/EnumGetName.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Enum/GetName/EnumGetName.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Enum/GetName/EnumGetName.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Enum/GetName/EnumGetName.vb" id="Snippet1"::: @@ -668,7 +668,7 @@ ## Remarks The elements of the return value array are sorted by the binary values of the enumerated constants (that is, by their unsigned magnitude). The following example provides displays information about the array returned by the method for an enumeration that includes a negative, zero, and a positive value. - :::code language="csharp" source="~/snippets/csharp/System/Enum/GetNames/getnames1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Enum/GetNames/getnames1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Enum/GetNames/getnames1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Enum/GetNames/getnames1.vb" id="Snippet1"::: @@ -677,7 +677,7 @@ ## Examples The following example illustrates the use of the method. - :::code language="csharp" source="~/snippets/csharp/System/Enum/GetNames/EnumGetNames.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Enum/GetNames/EnumGetNames.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Enum/GetNames/EnumGetNames.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Enum/GetNames/EnumGetNames.vb" id="Snippet1"::: @@ -858,7 +858,7 @@ ## Examples The following example calls the method to display the underlying type of some enumeration members. - :::code language="csharp" source="~/snippets/csharp/System/Enum/GetUnderlyingType/getunderlyingtype1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Enum/GetUnderlyingType/getunderlyingtype1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Enum/GetUnderlyingType/getunderlyingtype1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Enum/GetUnderlyingType/getunderlyingtype1.vb" id="Snippet1"::: @@ -933,7 +933,7 @@ ## Remarks The elements of the array are sorted by the binary values of the enumeration constants (that is, by their unsigned magnitude). The following example displays information about the array returned by the method for an enumeration that includes a negative value, zero, and a positive value. - :::code language="csharp" source="~/snippets/csharp/System/Enum/GetValues/getvalues1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Enum/GetValues/getvalues1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Enum/GetValues/getvalues1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Enum/GetValues/getvalues1.vb" id="Snippet1"::: @@ -954,7 +954,7 @@ ## Examples The following example illustrates the use of . - :::code language="csharp" source="~/snippets/csharp/System/Enum/GetValues/EnumGetValues.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Enum/GetValues/EnumGetValues.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Enum/GetValues/EnumGetValues.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Enum/GetValues/EnumGetValues.vb" id="Snippet1"::: @@ -1178,7 +1178,7 @@ If the underlying value of `flag` is zero, the method returns `true`. If this behavior is not desirable, you can use the method to test for equality with zero and call only if the underlying value of `flag` is non-zero, as the following example illustrates. - :::code language="csharp" source="~/snippets/csharp/System/Enum/HasFlag/hasflag0.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Enum/HasFlag/hasflag0.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Enum/HasFlag/hasflag0.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Enum/HasFlag/hasflag0.vb" id="Snippet1"::: @@ -1189,7 +1189,7 @@ ## Examples The following example defines an `DinnerItems` enumeration that reflects categories of items that a customer can order in a restaurant. The example tests whether the customer has ordered both an entrée and a beverage. - :::code language="csharp" source="~/snippets/csharp/System/Enum/HasFlag/hasflag1.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Enum/HasFlag/hasflag1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Enum/HasFlag/hasflag1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Enum/HasFlag/hasflag1.vb" id="Snippet2"::: @@ -1277,7 +1277,7 @@ ## Examples The following example defines an enumeration named `PetType` that consists of individual bit fields. It then calls the method with possible underlying enumeration values, string names, and composite values that result from setting multiple bit fields. - :::code language="csharp" source="~/snippets/csharp/System/Enum/IsDefined/isdefined1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Enum/IsDefined/isdefined1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Enum/IsDefined/isdefined1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Enum/IsDefined/IsDefined1.vb" id="Snippet1"::: @@ -1300,7 +1300,7 @@ If is an enumeration that is defined by using the attribute, the method returns if multiple bit fields in are set but does not correspond to a composite enumeration value, or if is a string concatenation of the names of multiple bit flags. In the following example, a Pets enumeration is defined with the attribute. The method returns when you pass it an enumeration value that has two bit fields (Pets.Dog and Pets.Cat) set, and when you pass it the string representation of that enumeration value ("Dog, Cat"). - :::code language="csharp" source="~/snippets/csharp/System/Enum/IsDefined/isdefined2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Enum/IsDefined/isdefined2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Enum/IsDefined/isdefined2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Enum/IsDefined/isdefined2.vb" id="Snippet2"::: @@ -1491,7 +1491,7 @@ If `value` is a name that does not correspond to a named constant of `enumType`, the method throws an . If `value` is the string representation of an integer that does not represent an underlying value of the `enumType` enumeration, the method returns an enumeration member whose underlying value is `value` converted to an integral type. If this behavior is undesirable, call the method to ensure that a particular string representation of an integer is actually a member of `enumType`. The following example defines a `Colors` enumeration, calls the method to convert strings to their corresponding enumeration values, and calls the method to ensure that particular integral values are underlying values in the `Colors` enumeration. - :::code language="csharp" source="~/snippets/csharp/System/Enum/Parse/ParseExample1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Enum/Parse/ParseExample1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Enum/Parse/ParseExample1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Enum/Parse/ParseExample1.vb" id="Snippet1"::: @@ -1500,7 +1500,7 @@ ## Examples The following example uses the method to parse an array of strings that are created by calling the method. It also uses the method to parse an enumeration value that consists of a bit field. - :::code language="csharp" source="~/snippets/csharp/System/Enum/Parse/EnumParse.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Enum/Parse/EnumParse.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Enum/Parse/EnumParse.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Enum/Parse/EnumParse.vb" id="Snippet1"::: @@ -1652,7 +1652,7 @@ ## Examples The following example uses the method to parse an array of strings that are created by calling the method. It also uses the method to parse an enumeration value that consists of a bit field. - :::code language="csharp" source="~/snippets/csharp/System/Enum/Parse/ParseExample2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Enum/Parse/ParseExample2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Enum/Parse/ParseExample2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Enum/Parse/ParseExample2.vb" id="Snippet2"::: @@ -3712,7 +3712,7 @@ ## Examples The following example demonstrates converting an enumerated value to a string. - :::code language="csharp" source="~/snippets/csharp/System/Enum/ToString/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Enum/ToString/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Enum/ToString/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Enum/ToString/source.vb" id="Snippet1"::: @@ -3876,7 +3876,7 @@ ## Examples The following example demonstrates how to convert an enumerated value to a string. - :::code language="csharp" source="~/snippets/csharp/System/Enum/ToString/tostr.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Enum/ToString/tostr.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Enum/ToString/tostr.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Enum/ToString/tostr.vb" id="Snippet1"::: @@ -4451,7 +4451,7 @@ If the parse operation fails, the `result` parameter contains the default value ## Examples The following example defines a `Colors` enumeration, calls the method to convert strings to their corresponding enumeration values, and calls the method to ensure that particular integral values are underlying values in the `Colors` enumeration. - :::code language="csharp" source="~/snippets/csharp/System/Enum/TryParseTEnum/tryparse1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Enum/TryParseTEnum/tryparse1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Enum/TryParseTEnum/tryparse1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Enum/TryParseTEnum/tryparse1.vb" id="Snippet1"::: @@ -4611,7 +4611,7 @@ If the parse operation fails, the `result` parameter contains the default value ## Examples The following example defines a `Colors` enumeration, calls the method to convert strings to their corresponding enumeration values, and calls the method to ensure that particular integral values are underlying values in the `Colors` enumeration. The method uses case-insensitive comparison when trying to convert the string representations of named constants to their equivalent enumeration values. - :::code language="csharp" source="~/snippets/csharp/System/Enum/TryParseTEnum/tryparse2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Enum/TryParseTEnum/tryparse2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Enum/TryParseTEnum/tryparse2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Enum/TryParseTEnum/tryparse2.vb" id="Snippet2"::: diff --git a/xml/System/Environment.xml b/xml/System/Environment.xml index 3b502c82f58..055db9d8016 100644 --- a/xml/System/Environment.xml +++ b/xml/System/Environment.xml @@ -1763,7 +1763,7 @@ The following example creates environment variables for the property. The property cycles between , which is a negative number, and once every 49.8 days. This code sample removes the sign bit to yield a nonnegative number that cycles between zero and once every 24.9 days. - :::code language="csharp" source="~/snippets/csharp/System/Environment/TickCount/tickcount.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Environment/TickCount/tickcount.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Environment/TickCount/tickcount.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Environment/TickCount/tickcount.vb" id="Snippet1"::: @@ -2764,7 +2764,7 @@ The following example creates environment variables for the property. -:::code language="csharp" source="~/snippets/csharp/System/Exception/Data/data.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/Exception/Data/data.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Exception/Data/data.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Exception/Data/data.vb" id="Snippet1"::: ]]> @@ -519,7 +519,7 @@ The following example demonstrates how to add and retrieve information using the ## Examples The following code example defines two derived `Exception` classes. It forces an exception and then throws it again with each of the derived classes. The code shows the use of the `GetBaseException` method to retrieve the original exception. - :::code language="csharp" source="~/snippets/csharp/System/Exception/GetBaseException/getbaseexc.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Exception/GetBaseException/getbaseexc.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Exception/GetBaseException/getbaseexc.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Exception/GetBaseException/getbaseexc.vb" id="Snippet1"::: @@ -727,7 +727,7 @@ The following example demonstrates how to add and retrieve information using the ## Examples The following code example throws an `Exception` that sets the `HelpLink` property in its constructor and then catches the exception and displays `HelpLink`. - :::code language="csharp" source="~/snippets/csharp/System/Exception/HelpLink/properties.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Exception/HelpLink/properties.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Exception/HelpLink/properties.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Exception/HelpLink/properties.vb" id="Snippet1"::: @@ -795,7 +795,7 @@ The following example demonstrates how to add and retrieve information using the ## Examples The following code example defines a derived `Exception` class that sets the `HResult` property to a custom value in its constructor. - :::code language="csharp" source="~/snippets/csharp/System/Exception/HResult/hresult.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Exception/HResult/hresult.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Exception/HResult/hresult.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Exception/HResult/hresult.vb" id="Snippet1"::: @@ -870,7 +870,7 @@ The following example demonstrates how to add and retrieve information using the ## Examples The following example demonstrates throwing and catching an exception that references an inner exception. - :::code language="csharp" source="~/snippets/csharp/System/Exception/InnerException/innerex.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Exception/InnerException/innerex.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Exception/InnerException/innerex.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Exception/InnerException/innerex.vb" id="Snippet1"::: @@ -946,7 +946,7 @@ The value of the property is included in the inf The following code example throws and then catches an exception and displays the exception's text message using the property. -:::code language="csharp" source="~/snippets/csharp/System/Exception/HelpLink/properties.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/Exception/HelpLink/properties.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Exception/HelpLink/properties.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Exception/HelpLink/properties.vb" id="Snippet1"::: ]]> @@ -1091,7 +1091,7 @@ The following code example throws and then catches an ex ## Examples The following example throws an `Exception` that sets the `Source` property in its constructor and then catches the exception and displays `Source`. - :::code language="csharp" source="~/snippets/csharp/System/Exception/HelpLink/properties.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Exception/HelpLink/properties.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Exception/HelpLink/properties.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Exception/HelpLink/properties.vb" id="Snippet1"::: @@ -1169,7 +1169,7 @@ The following code example throws and then catches an ex ## Examples The following code example throws an `Exception` and then catches it and displays a stack trace using the `StackTrace` property. - :::code language="csharp" source="~/snippets/csharp/System/Exception/HelpLink/properties.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Exception/HelpLink/properties.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Exception/HelpLink/properties.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Exception/HelpLink/properties.vb" id="Snippet1"::: @@ -1249,7 +1249,7 @@ The following code example throws and then catches an ex ## Examples The following code example throws an `Exception` and then catches it and displays the originating method using the `TargetSite` property. - :::code language="csharp" source="~/snippets/csharp/System/Exception/HelpLink/properties.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Exception/HelpLink/properties.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Exception/HelpLink/properties.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Exception/HelpLink/properties.vb" id="Snippet1"::: diff --git a/xml/System/FlagsAttribute.xml b/xml/System/FlagsAttribute.xml index 878da1fc235..d1eb56c3e6e 100644 --- a/xml/System/FlagsAttribute.xml +++ b/xml/System/FlagsAttribute.xml @@ -110,13 +110,13 @@ ## Examples The following example defines a `PhoneService` enumeration that represents forms of communication provided by a telephone company. It initializes three variables representing the service provided to three different households, and then indicates which households have no service, which households have only cell phone service, and which households have both cell phone and land line service. Finally, it implicitly calls the method to display the types of service provided to each household. - :::code language="csharp" source="~/snippets/csharp/System/FlagsAttribute/Overview/flags1.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/FlagsAttribute/Overview/flags1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/FlagsAttribute/Overview/flags1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/FlagsAttribute/.ctor/flags1.vb" id="Snippet2"::: The following example illustrates the use of the `FlagsAttribute` attribute and shows the effect on the method of using `FlagsAttribute` on an declaration. - :::code language="csharp" source="~/snippets/csharp/System/FlagsAttribute/Overview/flags.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/FlagsAttribute/Overview/flags.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/FlagsAttribute/Overview/flags.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/FlagsAttribute/.ctor/flags.vb" id="Snippet1"::: diff --git a/xml/System/FormatException.xml b/xml/System/FormatException.xml index ab67f238190..f7bacce1911 100644 --- a/xml/System/FormatException.xml +++ b/xml/System/FormatException.xml @@ -117,7 +117,7 @@ This exception also results from a coding error. To correct it, call a parsing method that doesn't require a precise format, such as or , or substitute a valid format string. The following example corrects the error by calling the method. - :::code language="csharp" source="~/snippets/csharp/System/FormatException/Overview/iformattable4.cs" interactive="try-dotnet" id="Snippet10"::: + :::code language="csharp" source="~/snippets/csharp/System/FormatException/Overview/iformattable4.cs" id="Snippet10"::: :::code language="fsharp" source="~/snippets/fsharp/System/FormatException/Overview/iformattable4.fs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System/FormatException/Overview/iformattable4.vb" id="Snippet10"::: @@ -143,7 +143,7 @@ The recommended technique for including literal braces in a composite format string is to include them in the object list and use format items to insert them into the result string. For example, you can modify the previous composite format string as shown here. - :::code language="csharp" source="~/snippets/csharp/System/FormatException/Overview/qa3.cs" interactive="try-dotnet-method" id="Snippet24"::: + :::code language="csharp" source="~/snippets/csharp/System/FormatException/Overview/qa3.cs" id="Snippet24"::: :::code language="fsharp" source="~/snippets/fsharp/System/FormatException/Overview/qa3.fs" id="Snippet24"::: :::code language="vb" source="~/snippets/visualbasic/System/FormatException/Overview/qa3.vb" id="Snippet24"::: @@ -167,7 +167,7 @@ Instead of handling this exception, you should eliminate its cause. Because neither Visual Basic nor C# can convert an integer array to an object array, you have to perform the conversion yourself before calling the composite formatting method. The following example provides one implementation. - :::code language="csharp" source="~/snippets/csharp/System/FormatException/Overview/qa2.cs" interactive="try-dotnet" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/FormatException/Overview/qa2.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/FormatException/Overview/qa2.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/FormatException/Overview/qa2.vb" id="Snippet6"::: diff --git a/xml/System/Func`1.xml b/xml/System/Func`1.xml index 1aff812da49..720bf8cb7fb 100644 --- a/xml/System/Func`1.xml +++ b/xml/System/Func`1.xml @@ -91,23 +91,23 @@ When you use the delegate, you do not have to explicitly define a delegate that encapsulates a parameterless method. For example, the following code explicitly declares a delegate named `WriteMethod` and assigns a reference to the `OutputTarget.SendToFile` instance method to its delegate instance. - :::code language="csharp" source="~/snippets/csharp/System/FuncTResult/Overview/Delegate.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/FuncTResult/Overview/Delegate.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Func~1/fs/Delegate.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/FuncTResult/Overview/Delegate.vb" id="Snippet1"::: The following example simplifies this code by instantiating the delegate instead of explicitly defining a new delegate and assigning a named method to it. - :::code language="csharp" source="~/snippets/csharp/System/FuncTResult/Overview/Func1.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/FuncTResult/Overview/Func1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Func~1/fs/Func1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/FuncTResult/Overview/Func1.vb" id="Snippet2"::: You can use the 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).) - :::code language="csharp" source="~/snippets/csharp/System/FuncTResult/Overview/Anon.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/FuncTResult/Overview/Anon.cs" id="Snippet3"::: You can also assign a lambda expression to a delegate, as the following example illustrates. (For an introduction to lambda expressions, see [Lambda Expressions (VB)](/dotnet/visual-basic/programming-guide/language-features/procedures/lambda-expressions), [Lambda Expressions (C#)](/dotnet/csharp/programming-guide/statements-expressions-operators/lambda-expressions), and [Lambda Expressions (F#)](/dotnet/fsharp/language-reference/functions/lambda-expressions-the-fun-keyword/).) - :::code language="csharp" source="~/snippets/csharp/System/FuncTResult/Overview/Lambda.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/FuncTResult/Overview/Lambda.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Func~1/fs/Lambda.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/FuncTResult/Overview/Lambda.vb" id="Snippet4"::: @@ -122,7 +122,7 @@ The example creates two methods and instantiates two `LazyValue` objects with lambda expressions that call these methods. The lambda expressions do not take parameters because they just need to call a method. As the output shows, the two methods are executed only when the value of each `LazyValue` object is retrieved. - :::code language="csharp" source="~/snippets/csharp/System/FuncTResult/Overview/Example.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/FuncTResult/Overview/Example.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Func~1/fs/Example.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/FuncTResult/Overview/Example.vb" id="Snippet5"::: diff --git a/xml/System/Func`2.xml b/xml/System/Func`2.xml index d8a645f7562..223b8dbfd6b 100644 --- a/xml/System/Func`2.xml +++ b/xml/System/Func`2.xml @@ -106,23 +106,23 @@ When you use the delegate, you do not have to explicitly define a delegate that encapsulates a method with a single parameter. For example, the following code explicitly declares a delegate named `ConvertMethod` and assigns a reference to the `UppercaseString` method to its delegate instance. - :::code language="csharp" source="~/snippets/csharp/System/FuncT,TResult/Overview/Delegate.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/FuncT,TResult/Overview/Delegate.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Func~2/fs/Delegate.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/FuncT,TResult/Overview/Delegate.vb" id="Snippet1"::: The following example simplifies this code by instantiating the delegate instead of explicitly defining a new delegate and assigning a named method to it. - :::code language="csharp" source="~/snippets/csharp/System/FuncT,TResult/Overview/Func2_1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/FuncT,TResult/Overview/Func2_1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Func~2/fs/Func2_1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/FuncT,TResult/Overview/Func2_1.vb" id="Snippet2"::: You can also use the 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).) - :::code language="csharp" source="~/snippets/csharp/System/FuncT,TResult/Overview/Anon.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/FuncT,TResult/Overview/Anon.cs" id="Snippet3"::: You can also assign a lambda expression to a delegate, as the following example illustrates. (For an introduction to lambda expressions, see [Lambda Expressions (VB)](/dotnet/visual-basic/programming-guide/language-features/procedures/lambda-expressions), [Lambda Expressions (C#)](/dotnet/csharp/programming-guide/statements-expressions-operators/lambda-expressions) and [Lambda Expressions (F#)](/dotnet/fsharp/language-reference/functions/lambda-expressions-the-fun-keyword).) - :::code language="csharp" source="~/snippets/csharp/System/FuncT,TResult/Overview/Lambda.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/FuncT,TResult/Overview/Lambda.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Func~2/fs/Lambda.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/FuncT,TResult/Overview/Lambda.vb" id="Snippet4"::: @@ -133,7 +133,7 @@ ## Examples The following example demonstrates how to declare and use a delegate. This example declares a variable and assigns it a lambda expression that converts the characters in a string to uppercase. The delegate that encapsulates this method is subsequently passed to the method to change the strings in an array of strings to uppercase. - :::code language="csharp" source="~/snippets/csharp/System/FuncT,TResult/Overview/Example.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/FuncT,TResult/Overview/Example.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Func~2/fs/Example.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/FuncT,TResult/Overview/Example.vb" id="Snippet5"::: diff --git a/xml/System/Func`3.xml b/xml/System/Func`3.xml index c1c9e251632..62d18f6f886 100644 --- a/xml/System/Func`3.xml +++ b/xml/System/Func`3.xml @@ -120,23 +120,23 @@ When you use the delegate you do not have to explicitly define a delegate that encapsulates a method with two parameters. For example, the following code explicitly declares a delegate named `ExtractMethod` and assigns a reference to the `ExtractWords` method to its delegate instance. - :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,TResult/Overview/Delegate.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,TResult/Overview/Delegate.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Func~3/fs/Delegate.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/FuncT1,T2,TResult/Overview/Delegate.vb" id="Snippet1"::: The following example simplifies this code by instantiating a delegate instead of explicitly defining a new delegate and assigning a named method to it. - :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,TResult/Overview/Func3.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,TResult/Overview/Func3.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Func~3/fs/Func3.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/FuncT1,T2,TResult/Overview/Func3.vb" id="Snippet2"::: You can use the 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).) - :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,TResult/Overview/Anon.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,TResult/Overview/Anon.cs" id="Snippet3"::: You can also assign a lambda expression to a delegate, as the following example illustrates. (For an introduction to lambda expressions, see [Lambda Expressions (VB)](/dotnet/visual-basic/programming-guide/language-features/procedures/lambda-expressions), [Lambda Expressions (C#)](/dotnet/csharp/programming-guide/statements-expressions-operators/lambda-expressions) and [Lambda Expressions (F#)](/dotnet/fsharp/language-reference/functions/lambda-expressions-the-fun-keyword).) - :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,TResult/Overview/Lambda.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,TResult/Overview/Lambda.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Func~3/fs/Lambda.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/FuncT1,T2,TResult/Overview/lambda.vb" id="Snippet4"::: @@ -147,7 +147,7 @@ ## Examples The following example demonstrates how to declare and use a delegate. This example declares a variable and assigns it a lambda expression that takes a value and an value as parameters. The lambda expression returns `true` if the length of the parameter is equal to the value of the parameter. The delegate that encapsulates this method is subsequently used in a query to filter strings in an array of strings. - :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,TResult/Overview/Example.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,TResult/Overview/Example.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Func~3/fs/Example.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/FuncT1,T2,TResult/Overview/Example.vb" id="Snippet5"::: diff --git a/xml/System/Func`4.xml b/xml/System/Func`4.xml index 2a1aebbd258..d4ffa060bec 100644 --- a/xml/System/Func`4.xml +++ b/xml/System/Func`4.xml @@ -134,23 +134,23 @@ When you use the 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 method to its delegate instance. - :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,T3,TResult/Overview/Delegate.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,T3,TResult/Overview/Delegate.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/FuncT1,T2,T3,TResult/Overview/Delegate.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/FuncT1,T2,T3,TResult/Overview/Delegate.vb" id="Snippet1"::: The following example simplifies this code by instantiating the delegate instead of explicitly defining a new delegate and assigning a named method to it. - :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,T3,TResult/Overview/Func4.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,T3,TResult/Overview/Func4.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/FuncT1,T2,T3,TResult/Overview/Func4.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/FuncT1,T2,T3,TResult/Overview/Func4.vb" id="Snippet2"::: You can use the 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).) - :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,T3,TResult/Overview/Anon.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,T3,TResult/Overview/Anon.cs" id="Snippet3"::: You can also assign a lambda expression to a delegate, as the following example illustrates. (For an introduction to lambda expressions, see [Lambda Expressions (VB)](/dotnet/visual-basic/programming-guide/language-features/procedures/lambda-expressions), [Lambda Expressions (C#)](/dotnet/csharp/programming-guide/statements-expressions-operators/lambda-expressions) and [Lambda Expressions (F#)](/dotnet/fsharp/language-reference/functions/lambda-expressions-the-fun-keyword).) - :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,T3,TResult/Overview/Lambda.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,T3,TResult/Overview/Lambda.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/FuncT1,T2,T3,TResult/Overview/Lambda.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/FuncT1,T2,T3,TResult/Overview/Lambda.vb" id="Snippet4"::: @@ -161,7 +161,7 @@ ## Examples The following example demonstrates how to declare and use a delegate. This example declares a variable and assigns it a lambda expression that takes a value and an value as parameters. The lambda expression returns `true` if the length of the parameter is equal to the value of the parameter. The delegate that encapsulates this method is subsequently used in a query to filter strings in an array of strings. - :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,TResult/Overview/Example.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,TResult/Overview/Example.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Func~3/fs/Example.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/FuncT1,T2,TResult/Overview/Example.vb" id="Snippet5"::: diff --git a/xml/System/Func`5.xml b/xml/System/Func`5.xml index 9bdbd214ab3..6a9deba3cc3 100644 --- a/xml/System/Func`5.xml +++ b/xml/System/Func`5.xml @@ -149,7 +149,7 @@ ## Examples The following example demonstrates how to declare and use a delegate. This example declares a variable and assigns it a lambda expression that takes a value and an value as parameters. The lambda expression returns `true` if the length of the parameter is equal to the value of the parameter. The delegate that encapsulates this method is subsequently used in a query to filter strings in an array of strings. - :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,TResult/Overview/Example.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/FuncT1,T2,TResult/Overview/Example.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Func~3/fs/Example.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/FuncT1,T2,TResult/Overview/Example.vb" id="Snippet5"::: diff --git a/xml/System/Guid.xml b/xml/System/Guid.xml index dd86343b607..478ab795ac1 100644 --- a/xml/System/Guid.xml +++ b/xml/System/Guid.xml @@ -317,7 +317,7 @@ ## Examples The following example passes each string listed in the Remarks section to the constructor. - :::code language="csharp" source="~/snippets/csharp/System/Guid/.ctor/ctor1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Guid/.ctor/ctor1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Guid/.ctor/ctor1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Guid/.ctor/ctor1.vb" id="Snippet1"::: @@ -495,7 +495,7 @@ ## Examples The following example creates a GUID whose string representation is "0000000a-000b-000c-0001-020304050607". - :::code language="csharp" source="~/snippets/csharp/System/Guid/.ctor/ctor2.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Guid/.ctor/ctor2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Guid/.ctor/ctor2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Guid/.ctor/ctor2.vb" id="Snippet2"::: @@ -711,7 +711,7 @@ ## Examples The following example calls the method to compare a GUID value with two similar GUID values. - :::code language="csharp" source="~/snippets/csharp/System/Guid/CompareTo/compareto2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Guid/CompareTo/compareto2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Guid/CompareTo/compareto2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Guid/CompareTo/compareto2.vb" id="Snippet1"::: @@ -808,7 +808,7 @@ ## Examples The following example uses the attribute to assign a GUID to a class. It retrieves the value of this GUID by calling the method and passing the property of the returned object to the method. Then it compares that GUID with an array of values. - :::code language="csharp" source="~/snippets/csharp/System/Guid/CompareTo/compareto1.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Guid/CompareTo/compareto1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Guid/CompareTo/compareto1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Guid/CompareTo/compareto1.vb" id="Snippet2"::: @@ -933,7 +933,7 @@ ## Remarks You can compare a GUID with the value of the field to determine whether a GUID is non-zero. The following example uses the operator to compare two GUID values with to determine whether they consist exclusively of zeros. - :::code language="csharp" source="~/snippets/csharp/System/Guid/Empty/empty.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Guid/Empty/empty.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Guid/Empty/empty.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Guid/Empty/empty.vb" id="Snippet1"::: @@ -1194,7 +1194,7 @@ ## Examples The following code example creates and displays the values of two objects. - :::code language="csharp" source="~/snippets/csharp/System/Guid/NewGuid/ng.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Guid/NewGuid/ng.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Guid/NewGuid/ng.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Guid/NewGuid/ng.vb" id="Snippet1"::: @@ -1257,7 +1257,7 @@ ## Examples The following example uses the operator to compare two GUID values with to determine whether they consist exclusively of zeros. - :::code language="csharp" source="~/snippets/csharp/System/Guid/Empty/empty.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Guid/Empty/empty.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Guid/Empty/empty.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Guid/Empty/empty.vb" id="Snippet1"::: @@ -1644,7 +1644,7 @@ After trimming, the length of the read-only character span is 0. ## Examples The following example creates a new GUID, converts it to three separate string representations by calling the method with the "B", "D", and "X" format specifiers, and then calls the method to convert the strings back to values. - :::code language="csharp" source="~/snippets/csharp/System/Guid/Parse/parseex1.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Guid/Parse/parseex1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Guid/Parse/parseex1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Guid/Parse/parseex1.vb" id="Snippet3"::: @@ -1930,7 +1930,7 @@ The method requires the read-only character spa ## Examples The following example calls the method with each of the supported format specifiers to generate an array of strings that represent a single GUID. These are then passed to the method, which successfully parses only the string that conforms to the "B" format specifier. - :::code language="csharp" source="~/snippets/csharp/System/Guid/Parse/parseexactex1.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Guid/Parse/parseexactex1.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Guid/Parse/parseexactex1.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Guid/Parse/parseexactex1.vb" id="Snippet4"::: @@ -2222,7 +2222,7 @@ Because the `provider` parameter is ignored, you cannot use it to provide a cust ## Examples The following example calls the method to create a value, and then calls the method to represent the value as a byte array. It then displays both values to the console. Finally, it instantiates a new value from the byte array and calls its method to show that the two values are identical. - :::code language="csharp" source="~/snippets/csharp/System/Guid/ToByteArray/tobytearray3.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Guid/ToByteArray/tobytearray3.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Guid/ToByteArray/tobytearray3.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Guid/ToByteArray/tobytearray3.vb" id="Snippet1"::: @@ -2744,7 +2744,7 @@ Because the `provider` parameter is ignored, you cannot use it to provide a cust ## Examples The following example creates a new GUID, converts it to three separate string representations by calling the method with the "B", "D", and "X" format specifiers, and then calls the method to convert the strings back to values. - :::code language="csharp" source="~/snippets/csharp/System/Guid/Parse/tryparseex1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Guid/Parse/tryparseex1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Guid/Parse/tryparseex1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Guid/Parse/tryparseex1.vb" id="Snippet2"::: @@ -3028,7 +3028,7 @@ Because the `provider` parameter is ignored, you cannot use it to provide a cust ## Examples The following example calls the method with each of the supported format specifiers to generate an array of strings that represent a single GUID. These are then passed to the method, which successfully parses the string that conforms to the "B" format specifier. - :::code language="csharp" source="~/snippets/csharp/System/Guid/Parse/tryparseexactex1.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Guid/Parse/tryparseexactex1.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Guid/Parse/tryparseexactex1.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Guid/Parse/tryparseexactex1.vb" id="Snippet5"::: diff --git a/xml/System/IComparable.xml b/xml/System/IComparable.xml index b63a6ce5750..99a4c062009 100644 --- a/xml/System/IComparable.xml +++ b/xml/System/IComparable.xml @@ -73,7 +73,7 @@ ## Examples The following example illustrates the implementation of and the requisite method. - :::code language="csharp" source="~/snippets/csharp/System/IComparable/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/IComparable/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/IComparable/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/IComparable/Overview/source.vb" id="Snippet1"::: @@ -163,7 +163,7 @@ ## Examples The following example illustrates the use of to compare a `Temperature` object implementing with another object. The `Temperature` object implements by simply wrapping a call to the method. - :::code language="csharp" source="~/snippets/csharp/System/IComparable/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/IComparable/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/IComparable/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/IComparable/Overview/source.vb" id="Snippet1"::: diff --git a/xml/System/IComparable`1.xml b/xml/System/IComparable`1.xml index 458c4162534..bddaf217c45 100644 --- a/xml/System/IComparable`1.xml +++ b/xml/System/IComparable`1.xml @@ -80,7 +80,7 @@ ## Examples The following example illustrates the implementation of for a simple `Temperature` object. The example creates a collection of strings with `Temperature` object keys, and adds several pairs of temperatures and strings to the list out of sequence. In the call to the method, the collection uses the implementation to sort the list entries, which are then displayed in order of increasing temperature. - :::code language="csharp" source="~/snippets/csharp/System/IComparableT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/IComparableT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/IComparableT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/IComparableT/Overview/source.vb" id="Snippet1"::: @@ -181,7 +181,7 @@ ## Examples The following code example illustrates the implementation of for a simple `Temperature` object. The example creates a collection of strings with `Temperature` object keys, and adds several pairs of temperatures and strings to the list out of sequence. In the call to the method, the collection uses the implementation to sort the list entries, which are then displayed in order of increasing temperature. - :::code language="csharp" source="~/snippets/csharp/System/IComparableT/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/IComparableT/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/IComparableT/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/IComparableT/Overview/source.vb" id="Snippet1"::: diff --git a/xml/System/IConvertible.xml b/xml/System/IConvertible.xml index deed1f2a9ae..2d1716153d3 100644 --- a/xml/System/IConvertible.xml +++ b/xml/System/IConvertible.xml @@ -71,7 +71,7 @@ ## Examples The following code sample demonstrates an implementation of for a Complex number class, allowing it to be cast first as a and then calling the static members on that . - :::code language="csharp" source="~/snippets/csharp/System/IConvertible/Overview/iconvertible.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/IConvertible/Overview/iconvertible.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/IConvertible/Overview/iconvertible.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/IConvertible/Overview/iconvertible.vb" id="Snippet1"::: diff --git a/xml/System/IFormatProvider.xml b/xml/System/IFormatProvider.xml index 63a38562429..12a8781a152 100644 --- a/xml/System/IFormatProvider.xml +++ b/xml/System/IFormatProvider.xml @@ -77,7 +77,7 @@ ## Examples The following example illustrates how an implementation can change the representation of a date and time value. In this case, a single date is displayed by using objects that represent four different cultures. - :::code language="csharp" source="~/snippets/csharp/System/IFormatProvider/Overview/provider2.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/IFormatProvider/Overview/provider2.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/IFormatProvider/Overview/provider2.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/IFormatProvider/Overview/provider2.vb" id="Snippet3"::: diff --git a/xml/System/IndexOutOfRangeException.xml b/xml/System/IndexOutOfRangeException.xml index 95de4bfbdef..877f502df15 100644 --- a/xml/System/IndexOutOfRangeException.xml +++ b/xml/System/IndexOutOfRangeException.xml @@ -85,7 +85,7 @@ To correct the error, you can use code like the following. - :::code language="csharp" source="~/snippets/csharp/System/IndexOutOfRangeException/Overview/length2.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/IndexOutOfRangeException/Overview/length2.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/IndexOutOfRangeException/Overview/length2.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/IndexOutOfRangeException/Overview/length2.vb" id="Snippet4"::: @@ -140,7 +140,7 @@ To correct the error, as the following example does, you can call the method instead of making assumptions about the starting index of an array. - :::code language="csharp" source="~/snippets/csharp/System/IndexOutOfRangeException/Overview/nonzero2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/IndexOutOfRangeException/Overview/nonzero2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/IndexOutOfRangeException/Overview/nonzero2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/IndexOutOfRangeException/Overview/nonzero2.vb" id="Snippet2"::: @@ -154,7 +154,7 @@ The iteration construct returns each value in an array or collection, not its index. To eliminate the exception, use this code. - :::code language="csharp" source="~/snippets/csharp/System/IndexOutOfRangeException/Overview/foreach2.cs" interactive="try-dotnet" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System/IndexOutOfRangeException/Overview/foreach2.cs" id="Snippet8"::: :::code language="fsharp" source="~/snippets/fsharp/System/IndexOutOfRangeException/Overview/foreach2.fs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System/IndexOutOfRangeException/Overview/foreach2.vb" id="Snippet8"::: diff --git a/xml/System/Int16.xml b/xml/System/Int16.xml index 7f7c73cfeb5..639f66422b1 100644 --- a/xml/System/Int16.xml +++ b/xml/System/Int16.xml @@ -855,7 +855,7 @@ Compiler overload resolution may account for an apparent difference in the behavior of the two method overloads. If an implicit conversion between the argument and an is defined and the argument is not typed as an , compilers perform an implicit conversion and call the method. Otherwise, they call the method, which always returns if its argument is not an value. The following example illustrates the difference in behavior between the two method overloads. In the case of the and values, the first comparison returns because the compiler automatically performs a widening conversion and calls the method, whereas the second comparison returns because the compiler calls the method. - :::code language="csharp" source="~/snippets/csharp/System/Int16/Equals/equalsoverl.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Int16/Equals/equalsoverl.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.int16.equals/fs/equalsoverl.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Int16/Equals/equalsoverl.vb" id="Snippet1"::: @@ -924,7 +924,7 @@ ## Examples The following code example illustrates the use of `Equals` in the context of `Int16`, comparing two short values and returning `true` if they represent the same number, or `false` if they do not. - :::code language="csharp" source="~/snippets/csharp/System/Int16/Equals/int16_equals.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Int16/Equals/int16_equals.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Int16_Equals/FS/int16_equals.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Int16/Equals/int16_equals.vb" id="Snippet1"::: @@ -933,7 +933,7 @@ Compiler overload resolution may account for an apparent difference in the behavior of the two method overloads. If an implicit conversion between the argument and an is defined and the argument is not typed as an , compilers perform an implicit conversion and call the method. Otherwise, they call the method, which always returns if its argument is not an value. The following example illustrates the difference in behavior between the two method overloads. In the case of the and values, the first comparison returns because the compiler automatically performs a widening conversion and calls the method, whereas the second comparison returns because the compiler calls the method. - :::code language="csharp" source="~/snippets/csharp/System/Int16/Equals/equalsoverl.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Int16/Equals/equalsoverl.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.int16.equals/fs/equalsoverl.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Int16/Equals/equalsoverl.vb" id="Snippet1"::: @@ -1491,7 +1491,7 @@ For this method matches the IEE ## Examples The following example uses the property to prevent an when converting to an value. - :::code language="csharp" source="~/snippets/csharp/System/Int16/MaxValue/MaxValue.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Int16/MaxValue/MaxValue.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int16.MaxValue/fs/MaxValue.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Int16/MaxValue/MaxValue.vb" id="Snippet1"::: @@ -1653,7 +1653,7 @@ For this method matches the IEE ## Examples The following example uses the property to prevent an when converting to an value. - :::code language="csharp" source="~/snippets/csharp/System/Int16/MaxValue/MaxValue.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Int16/MaxValue/MaxValue.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int16.MaxValue/fs/MaxValue.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Int16/MaxValue/MaxValue.vb" id="Snippet1"::: @@ -1747,7 +1747,7 @@ For this method matches the IEE ## Examples The following example demonstrates how to convert a string value into a 16-bit signed integer value using the method. The resulting integer value is then displayed to the console. - :::code language="csharp" source="~/snippets/csharp/System/Int16/Parse/Parse.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Int16/Parse/Parse.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int16.Parse/fs/Parse.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Int16/Parse/Parse.vb" id="Snippet1"::: @@ -1957,7 +1957,7 @@ For this method matches the IEE ## Examples The following example uses the method to parse the string representations of values using the en-US culture. - :::code language="csharp" source="~/snippets/csharp/System/Int16/Parse/Parse2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Int16/Parse/Parse2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int16.Parse/fs/Parse2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Int16/Parse/Parse2.vb" id="Snippet2"::: @@ -2070,7 +2070,7 @@ For this method matches the IEE ## Examples The following example parses string representations of values with the method. - :::code language="csharp" source="~/snippets/csharp/System/Int16/Parse/Parse.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Int16/Parse/Parse.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int16.Parse/fs/Parse.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Int16/Parse/Parse.vb" id="Snippet4"::: @@ -2302,7 +2302,7 @@ For this method matches the IEE ## Examples The following example uses a variety of `style` and `provider` parameters to parse the string representations of values. - :::code language="csharp" source="~/snippets/csharp/System/Int16/Parse/Parse.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Int16/Parse/Parse.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int16.Parse/fs/Parse.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Int16/Parse/Parse.vb" id="Snippet3"::: @@ -6140,7 +6140,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example uses the method to display an array of values to the console. - :::code language="csharp" source="~/snippets/csharp/System/Int16/ToString/ToString1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Int16/ToString/ToString1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int16.ToString/fs/ToString1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Int16/ToString/ToString1.vb" id="Snippet1"::: @@ -6241,7 +6241,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example iterates an array of values and displays each of them to the console by calling the method with different format providers. Because of the simple formatting defined by the default "G" format specifier, the formatted strings produced for each value are identical regardless of the value of the `provider` parameter. - :::code language="csharp" source="~/snippets/csharp/System/Int16/ToString/ToString1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Int16/ToString/ToString1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int16.ToString/fs/ToString1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Int16/ToString/ToString1.vb" id="Snippet2"::: @@ -6445,7 +6445,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example displays an value using each of the supported standard format strings in four different cultures. - :::code language="csharp" source="~/snippets/csharp/System/Int16/ToString/ToString1.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Int16/ToString/ToString1.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int16.ToString/fs/ToString1.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Int16/ToString/ToString1.vb" id="Snippet4"::: @@ -6800,7 +6800,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example calls the method with a number of different string values. - :::code language="csharp" source="~/snippets/csharp/System/Int16/TryParse/TryParse1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Int16/TryParse/TryParse1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int16.TryParse/fs/TryParse1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Int16/TryParse/TryParse1.vb" id="Snippet1"::: @@ -7186,7 +7186,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example calls the method with a number of different string values. - :::code language="csharp" source="~/snippets/csharp/System/Int16/TryParse/TryParse2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Int16/TryParse/TryParse2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int16.TryParse/fs/TryParse2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Int16/TryParse/TryParse2.vb" id="Snippet2"::: diff --git a/xml/System/Int32.xml b/xml/System/Int32.xml index 22728e98184..8120ac90730 100644 --- a/xml/System/Int32.xml +++ b/xml/System/Int32.xml @@ -479,7 +479,7 @@ ## Examples The following example demonstrates the method. In addition to displaying the value returned by the method for four different comparisons, it converts the return value to a member of the custom `Comparison` enumeration, whose value it also displays. - :::code language="csharp" source="~/snippets/csharp/System/Int32/CompareTo/CompareTo1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Int32/CompareTo/CompareTo1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int32.CompareTo/fs/CompareTo1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Int32/CompareTo/CompareTo1.vb" id="Snippet1"::: @@ -890,7 +890,7 @@ Compiler overload resolution may account for an apparent difference in the behavior of the two method overloads. If an implicit conversion between the argument and an is defined and the argument is not typed as an , compilers perform an implicit conversion and call the method. Otherwise, they call the method, which always returns if its argument is not an value. The following example illustrates the difference in behavior between the two method overloads. In the case of the , , , and values, the first comparison returns because the compiler automatically performs a widening conversion and calls the method, whereas the second comparison returns because the compiler calls the method. - :::code language="csharp" source="~/snippets/csharp/System/Int32/Equals/equalsoverloads2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Int32/Equals/equalsoverloads2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.int32.equals/fs/equalsoverloads2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Int32/Equals/equalsoverloads2.vb" id="Snippet1"::: @@ -965,7 +965,7 @@ ## Examples The following example illustrates the use of `Equals` in the context of `Int32`, comparing two `int` values and returning `true` if they represent the same number, or `false` if they do not. - :::code language="csharp" source="~/snippets/csharp/System/Int32/Equals/int32_equals.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Int32/Equals/int32_equals.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Int32_Equals/FS/int32_equals.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Int32/Equals/int32_equals.vb" id="Snippet1"::: @@ -974,7 +974,7 @@ Compiler overload resolution may account for an apparent difference in the behavior of the two method overloads. If an implicit conversion between the argument and an is defined and the argument is not typed as an , compilers perform an implicit conversion and call the method. Otherwise, they call the method, which always returns if its argument is not an value. The following example illustrates the difference in behavior between the two method overloads. In the case of the , , , and values, the first comparison returns because the compiler automatically performs a widening conversion and calls the method, whereas the second comparison returns because the compiler calls the method. - :::code language="csharp" source="~/snippets/csharp/System/Int32/Equals/equalsoverloads2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Int32/Equals/equalsoverloads2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.int32.equals/fs/equalsoverloads2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Int32/Equals/equalsoverloads2.vb" id="Snippet1"::: @@ -1545,7 +1545,7 @@ For this method matches the IEE ## Examples The following example uses the property to prevent an when converting to an value. - :::code language="csharp" source="~/snippets/csharp/System/Int32/MaxValue/maxvalue1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Int32/MaxValue/maxvalue1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.int32.maxvalue/fs/maxvalue1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Int32/MaxValue/maxvalue1.vb" id="Snippet1"::: @@ -1705,7 +1705,7 @@ For this method matches the IEE ## Examples The following example uses the property to prevent an when converting to an value. - :::code language="csharp" source="~/snippets/csharp/System/Int32/MaxValue/maxvalue1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Int32/MaxValue/maxvalue1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.int32.maxvalue/fs/maxvalue1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Int32/MaxValue/maxvalue1.vb" id="Snippet1"::: @@ -1799,7 +1799,7 @@ For this method matches the IEE ## Examples The following example demonstrates how to convert a string value into a 32-bit signed integer value using the method. The resulting integer value is then displayed to the console. - :::code language="csharp" source="~/snippets/csharp/System/Int32/Parse/Parse1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Int32/Parse/Parse1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int32.Parse/fs/Parse1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Int32/Parse/Parse1.vb" id="Snippet1"::: @@ -2012,7 +2012,7 @@ For this method matches the IEE ## Examples The following example uses the method to parse the string representations of several values. The current culture for the example is en-US. - :::code language="csharp" source="~/snippets/csharp/System/Int32/Parse/Parse2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Int32/Parse/Parse2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int32.Parse/fs/Parse2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Int32/Parse/Parse2.vb" id="Snippet2"::: @@ -2368,7 +2368,7 @@ For this method matches the IEE ## Examples The following example uses a variety of `style` and `provider` parameters to parse the string representations of values. It also illustrates some of the different ways the same string can be interpreted depending on the culture whose formatting information is used for the parsing operation. - :::code language="csharp" source="~/snippets/csharp/System/Int32/Parse/Parse3.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Int32/Parse/Parse3.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int32.Parse/fs/Parse3.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Int32/Parse/Parse3.vb" id="Snippet3"::: @@ -6334,7 +6334,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example displays the string representation of an value using objects that represent several different cultures. - :::code language="csharp" source="~/snippets/csharp/System/Int32/ToString/ToString.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Int32/ToString/ToString.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int32.ToString/fs/ToString.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Int32/ToString/ToString.vb" id="Snippet2"::: @@ -6440,7 +6440,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example displays an value using each of the supported standard numeric format specifiers, together with two custom numeric format strings. In converting the numeric values to strings, the example uses the formatting conventions of the en-US culture. - :::code language="csharp" source="~/snippets/csharp/System/Int32/ToString/ToString.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Int32/ToString/ToString.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int32.ToString/fs/ToString.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Int32/ToString/ToString.vb" id="Snippet3"::: @@ -6556,7 +6556,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example displays a positive and a negative value using each of the supported standard numeric format specifiers for three different cultures. - :::code language="csharp" source="~/snippets/csharp/System/Int32/ToString/ToString.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Int32/ToString/ToString.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int32.ToString/fs/ToString.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Int32/ToString/ToString.vb" id="Snippet4"::: @@ -6913,7 +6913,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example calls the method with a number of different string values. - :::code language="csharp" source="~/snippets/csharp/System/Int32/TryParse/TryParse1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Int32/TryParse/TryParse1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int32.TryParse/fs/TryParse1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Int32/TryParse/TryParse1.vb" id="Snippet1"::: @@ -7305,7 +7305,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example calls the method with a number of different string and values. - :::code language="csharp" source="~/snippets/csharp/System/Int32/TryParse/TryParse2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Int32/TryParse/TryParse2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int32.TryParse/fs/TryParse2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Int32/TryParse/TryParse2.vb" id="Snippet2"::: diff --git a/xml/System/Int64.xml b/xml/System/Int64.xml index 1c12da98049..ddbdf9624c3 100644 --- a/xml/System/Int64.xml +++ b/xml/System/Int64.xml @@ -877,7 +877,7 @@ Compiler overload resolution may account for an apparent difference in the behavior of the two method overloads. If an implicit conversion between the argument and an is defined and the argument is not typed as an , compilers perform an implicit conversion and call the method. Otherwise, they call the method, which always returns if its argument is not an value. The following example illustrates the difference in behavior between the two method overloads. In the case of the , , , , , and values, the first comparison returns because the compiler automatically performs a widening conversion and calls the method, whereas the second comparison returns because the compiler calls the method. - :::code language="csharp" source="~/snippets/csharp/System/Int64/Equals/equalsoverl.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Int64/Equals/equalsoverl.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.int64.equals/fs/equalsoverl.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Int64/Equals/equalsoverl.vb" id="Snippet1"::: @@ -944,7 +944,7 @@ ## Examples The following code example illustrates the use of `Equals` in the context of `Int64`, comparing two long values and returning `true` if they represent the same number, or `false` if they do not. - :::code language="csharp" source="~/snippets/csharp/System/Int64/Equals/int64_equals.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Int64/Equals/int64_equals.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/Int64_Equals/FS/int64_equals.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Int64/Equals/int64_equals.vb" id="Snippet1"::: @@ -953,7 +953,7 @@ Compiler overload resolution may account for an apparent difference in the behavior of the two method overloads. If an implicit conversion between the argument and an is defined and the argument is not typed as an , compilers perform an implicit conversion and call the method. Otherwise, they call the method, which always returns if its argument is not an value. The following example illustrates the difference in behavior between the two method overloads. In the case of the , , , , , and values, the first comparison returns because the compiler automatically performs a widening conversion and calls the method, whereas the second comparison returns because the compiler calls the method. - :::code language="csharp" source="~/snippets/csharp/System/Int64/Equals/equalsoverl.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Int64/Equals/equalsoverl.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.int64.equals/fs/equalsoverl.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Int64/Equals/equalsoverl.vb" id="Snippet1"::: @@ -1746,7 +1746,7 @@ For this method matches the IEE ## Examples The following example demonstrates how to convert a string value into a 64-bit signed integer value using the method. It then displays the resulting long integer value. - :::code language="csharp" source="~/snippets/csharp/System/Int64/Parse/Parse1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Int64/Parse/Parse1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.int64.parse/fs/Parse1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Int64/Parse/Parse1.vb" id="Snippet1"::: @@ -1959,7 +1959,7 @@ For this method matches the IEE ## Examples The following example uses the method to parse the string representations of several values. The current culture for the example is en-US. - :::code language="csharp" source="~/snippets/csharp/System/Int64/Parse/Parse2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Int64/Parse/Parse2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.int64.parse/fs/Parse2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Int64/Parse/Parse2.vb" id="Snippet2"::: @@ -2306,7 +2306,7 @@ For this method matches the IEE ## Examples The following example uses a variety of `style` and `provider` parameters to parse the string representations of values. It also illustrates some of the different ways the same string can be interpreted depending on the culture whose formatting information is used for the parsing operation. - :::code language="csharp" source="~/snippets/csharp/System/Int64/Parse/Parse3.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Int64/Parse/Parse3.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.int64.parse/fs/Parse3.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Int64/Parse/Parse3.vb" id="Snippet3"::: @@ -6253,7 +6253,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example displays the string representation of an value using objects that represent several different cultures. - :::code language="csharp" source="~/snippets/csharp/System/Int64/ToString/ToString.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Int64/ToString/ToString.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int64.ToString/fs/ToString.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Int64/ToString/ToString.vb" id="Snippet2"::: @@ -6471,7 +6471,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example displays a positive and a negative value using each of the supported standard numeric format specifiers for three different cultures. - :::code language="csharp" source="~/snippets/csharp/System/Int64/ToString/ToString.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Int64/ToString/ToString.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int64.ToString/fs/ToString.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Int64/ToString/ToString.vb" id="Snippet4"::: @@ -6834,7 +6834,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example calls the method with a number of different string values. - :::code language="csharp" source="~/snippets/csharp/System/Int64/TryParse/TryParse1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Int64/TryParse/TryParse1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int64.TryParse/fs/TryParse1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Int64/TryParse/TryParse1.vb" id="Snippet1"::: @@ -7225,7 +7225,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example calls the method with a number of different string and values. - :::code language="csharp" source="~/snippets/csharp/System/Int64/TryParse/TryParse2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Int64/TryParse/TryParse2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Int64.TryParse/fs/TryParse2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Int64/TryParse/TryParse2.vb" id="Snippet2"::: diff --git a/xml/System/Math.xml b/xml/System/Math.xml index dace882728a..df4d3d77fcc 100644 --- a/xml/System/Math.xml +++ b/xml/System/Math.xml @@ -66,7 +66,7 @@ ## Examples The following example uses several mathematical and trigonometric functions from the class to calculate the inner angles of a trapezoid. - :::code language="csharp" source="~/snippets/csharp/System/Math/Overview/mathsample.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Overview/mathsample.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Overview/mathsample.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Overview/mathsample.vb" id="Snippet1"::: @@ -151,7 +151,7 @@ ## Examples The following example uses the method to get the absolute value of a number of values. - :::code language="csharp" source="~/snippets/csharp/System/Math/Abs/Abs1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Abs/Abs1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Abs/Abs1.fs" id="Snippet1"::: ]]> @@ -225,7 +225,7 @@ ## Examples The following example uses the method to get the absolute value of a number of values. - :::code language="csharp" source="~/snippets/csharp/System/Math/Abs/abs2.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Abs/abs2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Abs/abs2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Abs/abs2.vb" id="Snippet2"::: @@ -298,7 +298,7 @@ ## Examples The following example uses the method to get the absolute value of a number of values. - :::code language="csharp" source="~/snippets/csharp/System/Math/Abs/abs3.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Abs/abs3.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Abs/abs3.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Abs/abs3.vb" id="Snippet3"::: @@ -373,7 +373,7 @@ ## Examples The following example uses the method to get the absolute value of a number of values. - :::code language="csharp" source="~/snippets/csharp/System/Math/Abs/abs4.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Abs/abs4.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Abs/abs4.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Abs/abs4.vb" id="Snippet4"::: @@ -448,7 +448,7 @@ ## Examples The following example uses the method to get the absolute value of a number of values. - :::code language="csharp" source="~/snippets/csharp/System/Math/Abs/abs5.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Abs/abs5.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Abs/abs5.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Abs/abs5.vb" id="Snippet5"::: @@ -573,7 +573,7 @@ ## Examples The following example uses the method to get the absolute value of a number of values. - :::code language="csharp" source="~/snippets/csharp/System/Math/Abs/abs6.cs" interactive="try-dotnet-method" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Abs/abs6.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Abs/abs6.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Abs/abs6.vb" id="Snippet6"::: @@ -650,7 +650,7 @@ ## Examples The following example uses the method to get the absolute value of a number of values. - :::code language="csharp" source="~/snippets/csharp/System/Math/Abs/abs7.cs" interactive="try-dotnet-method" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Abs/abs7.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Abs/abs7.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Abs/abs7.vb" id="Snippet7"::: @@ -727,7 +727,7 @@ ## Examples The following example uses the method to assist in the computation of the inner angles of a given trapezoid. - :::code language="csharp" source="~/snippets/csharp/System/Math/Overview/mathsample.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Overview/mathsample.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Overview/mathsample.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Overview/mathsample.vb" id="Snippet1"::: @@ -863,7 +863,7 @@ ## Examples The following example uses to assist in the computation of the inner angles of a given trapezoid. - :::code language="csharp" source="~/snippets/csharp/System/Math/Overview/mathsample.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Overview/mathsample.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Overview/mathsample.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Overview/mathsample.vb" id="Snippet1"::: @@ -999,7 +999,7 @@ ## Examples The following example demonstrates how to calculate the arctangent of a value and display it to the console. - :::code language="csharp" source="~/snippets/csharp/System/Math/Atan/atan.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Atan/atan.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Atan/atan.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Atan/atan.vb" id="Snippet1"::: @@ -1098,7 +1098,7 @@ ## Examples The following example demonstrates how to calculate the arctangent of an angle and a vector. The resulting value is displayed in the console. - :::code language="csharp" source="~/snippets/csharp/System/Math/Atan/atan.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Atan/atan.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Atan/atan.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Atan/atan.vb" id="Snippet1"::: @@ -1220,7 +1220,7 @@ ## Examples The following example demonstrates the use of the method to calculate the product of two integer values. - :::code language="csharp" source="~/snippets/csharp/System/Math/BigMul/bigmul.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/BigMul/bigmul.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/BigMul/bigmul.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/BigMul/bigmul.vb" id="Snippet1"::: @@ -1670,7 +1670,7 @@ ## Examples The following example illustrates the method and contrasts it with the method. - :::code language="csharp" source="~/snippets/csharp/System/Math/Ceiling/Ceiling1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Ceiling/Ceiling1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Ceiling/Ceiling1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Ceiling/Ceiling1.vb" id="Snippet1"::: @@ -1753,7 +1753,7 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 ## Examples The following example illustrates the method and contrasts it with the method. - :::code language="csharp" source="~/snippets/csharp/System/Math/Ceiling/Ceiling1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Ceiling/Ceiling1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Ceiling/Ceiling1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Ceiling/Ceiling1.vb" id="Snippet2"::: @@ -2699,7 +2699,7 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 ## Examples The following example uses to evaluate certain trigonometric identities for selected angles. - :::code language="csharp" source="~/snippets/csharp/System/Math/Cos/sincos.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Cos/sincos.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Cos/sincos.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Cos/sincos.vb" id="Snippet1"::: @@ -2774,7 +2774,7 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 ## Examples The following example uses to evaluate certain hyperbolic identities for selected values. - :::code language="csharp" source="~/snippets/csharp/System/Math/Cosh/sinhcosh.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Cosh/sinhcosh.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Cosh/sinhcosh.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Cosh/sinhcosh.vb" id="Snippet1"::: @@ -3376,7 +3376,7 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 ## Examples The following example demonstrates the method. - :::code language="csharp" source="~/snippets/csharp/System/Math/DivRem/divrem1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/DivRem/divrem1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/DivRem/divrem1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/DivRem/divrem1.vb" id="Snippet1"::: @@ -3451,7 +3451,7 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 ## Examples The following example demonstrates the method. - :::code language="csharp" source="~/snippets/csharp/System/Math/DivRem/divrem2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/DivRem/divrem2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/DivRem/divrem2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/DivRem/divrem2.vb" id="Snippet2"::: @@ -3517,7 +3517,7 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 ## Examples The following example compares with the value calculated from a power series. - :::code language="csharp" source="~/snippets/csharp/System/Math/E/efield.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/E/efield.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/E/efield.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/E/efield.vb" id="Snippet1"::: @@ -3596,7 +3596,7 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 ## Examples The following example uses to evaluate certain exponential and logarithmic identities for selected values. - :::code language="csharp" source="~/snippets/csharp/System/Math/Exp/exp.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Exp/exp.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Exp/exp.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Exp/exp.vb" id="Snippet1"::: @@ -3682,7 +3682,7 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 ## Examples The following example illustrates the method and contrasts it with the method. - :::code language="csharp" source="~/snippets/csharp/System/Math/Ceiling/Ceiling1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Ceiling/Ceiling1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Ceiling/Ceiling1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Ceiling/Ceiling1.vb" id="Snippet1"::: @@ -3766,7 +3766,7 @@ Dim i2 As Integer = CInt(Math.Floor(d2)) ' Result: 7968 ## Examples The following example illustrates the method and contrasts it with the method. - :::code language="csharp" source="~/snippets/csharp/System/Math/Ceiling/Ceiling1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Ceiling/Ceiling1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Ceiling/Ceiling1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Ceiling/Ceiling1.vb" id="Snippet2"::: @@ -3915,7 +3915,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * ## Examples The following example contrasts the remainder returned by the method with the remainder returned by the [remainder operator](/dotnet/csharp/language-reference/operators/remainder-operator). - :::code language="csharp" source="~/snippets/csharp/System/Math/IEEERemainder/ieeeremainder1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/IEEERemainder/ieeeremainder1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/IEEERemainder/ieeeremainder1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/IEEERemainder/ieeeremainder1.vb" id="Snippet1"::: @@ -4074,7 +4074,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * ## Examples The following example illustrates the method. - :::code language="csharp" source="~/snippets/csharp/System/Math/LogMethod/log1.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/LogMethod/log1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/LogMethod/log1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/LogMethod/log1.vb" id="Snippet2"::: @@ -4231,7 +4231,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * ## Examples The following example uses to evaluate certain logarithmic identities for selected values. - :::code language="csharp" source="~/snippets/csharp/System/Math/LogMethod/loggen.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/LogMethod/loggen.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/LogMethod/loggen.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/LogMethod/loggen.vb" id="Snippet1"::: @@ -4320,7 +4320,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * ## Examples The following example uses the method to return the base 10 logarithm for selected values. - :::code language="csharp" source="~/snippets/csharp/System/Math/Log10/log10.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Log10/log10.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Log10/log10.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Log10/log10.vb" id="Snippet1"::: @@ -4409,7 +4409,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The following example demonstrates how to use the method to return and display the greater of two variables: -:::code language="csharp" source="~/snippets/csharp/System/Math/Max/max.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/Math/Max/max.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Max/max.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Max/max.vb" id="Snippet1"::: @@ -5302,7 +5302,7 @@ The following example demonstrates how to use the meth The following example demonstrates how to use the method to return and display the smaller of two variables: -:::code language="csharp" source="~/snippets/csharp/System/Math/Min/min.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/Math/Min/min.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Min/min.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Min/min.vb" id="Snippet1"::: @@ -6233,7 +6233,7 @@ The following example demonstrates how to use the meth ## Examples The following example uses to assist in the computation of the inner angles of a given trapezoid. - :::code language="csharp" source="~/snippets/csharp/System/Math/Overview/mathsample.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Overview/mathsample.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Overview/mathsample.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Overview/mathsample.vb" id="Snippet1"::: @@ -6337,7 +6337,7 @@ This method calls into the underlying C runtime, and the exact result or valid i The following example uses the method to calculate the value that results from raising 2 to a power ranging from 0 to 32. -:::code language="csharp" source="~/snippets/csharp/System/Math/Pow/pow1.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/Math/Pow/pow1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Pow/pow1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Pow/pow1.vb" id="Snippet1"::: @@ -6507,7 +6507,7 @@ Rounding away from zero is the most widely known form of rounding, while roundin The following example illustrates the bias that can result from consistently rounding midpoint values in a single direction. The example computes the true mean of an array of values, and then computes the mean when the values in the array are rounded by using the two conventions. In this example, the true mean and the mean that results when rounding to nearest are the same. However, the mean that results when rounding away from zero differs by .05 (or by 3.6%) from the true mean. -:::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/mean1.cs" interactive="try-dotnet-method" id="Snippet2"::: +:::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/mean1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Round/mean1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Round/mean1.vb" id="Snippet2"::: @@ -6531,7 +6531,7 @@ In order to determine whether a rounding operation involves a midpoint value, th The following example illustrates the problem. It repeatedly adds .1 to 11.0 and rounds the result to the nearest integer. 11.5 should round to 12 using either of the midpoint-rounding conventions (`ToEven` or `AwayFromZero`). However, as the output from the example shows, it does not. The example uses the "R" [standard numeric format string](/dotnet/standard/base-types/standard-numeric-format-strings) to display the floating point value's full precision, and shows that the value to be rounded has lost precision during repeated additions, and its value is actually 11.499999999999998. Because .499999999999998 is less than .5, the midpoint-rounding conventions don't come into play and the value is rounded down. As the example also shows, this problem does not occur if you assign the constant value 11.5 to a variable. -:::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/precision1.cs" interactive="try-dotnet" id="Snippet7"::: +:::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/precision1.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Round/precision1.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Round/precision1.vb" id="Snippet7"::: @@ -6549,7 +6549,7 @@ Problems of precision in rounding midpoint values are most likely to arise in th - Define a custom rounding algorithm that performs a "nearly equal" test to determine whether the value to be rounded is acceptably close to a midpoint value. The following example defines a `RoundApproximate` method that examines whether a fractional value is sufficiently near to a midpoint value to be subject to midpoint rounding. As the output from the example shows, it corrects the rounding problem shown in the previous example. - :::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/precision2.cs" interactive="try-dotnet" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/precision2.cs" id="Snippet8"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Round/precision2.fs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Round/precision2.vb" id="Snippet8"::: @@ -6557,7 +6557,7 @@ Problems of precision in rounding midpoint values are most likely to arise in th The method includes overloads that accept arguments of type and . There are no methods that round values of type . If you pass a value to one of the overloads of the method, it is cast (in C#) or converted (in Visual Basic) to a , and the corresponding overload with a parameter is called. Although this is a widening conversion, it often involves a loss of precision, as the following example illustrates. When a value of 16.325 is passed to the method and rounded to two decimal places using the rounding to nearest convention, the result is 16.33 and not the expected result of 16.32. -:::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/single1.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/single1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Round/single1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Round/single1.vb" id="Snippet1"::: @@ -6649,7 +6649,7 @@ This method uses the default rounding convention of method. The value of 4.5 rounds to 4 rather than 5, because this overload uses the default convention. -:::code language="csharp" source="~/snippets/csharp/System/Math/Round/rounddecimal1.cs" interactive="try-dotnet-method" id="Snippet6"::: +:::code language="csharp" source="~/snippets/csharp/System/Math/Round/rounddecimal1.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Round/rounddecimal1.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Round/rounddecimal1.vb" id="Snippet6"::: @@ -6741,7 +6741,7 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7968 The following example demonstrates rounding to the nearest integer value. -:::code language="csharp" source="~/snippets/csharp/System/Math/Round/source.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/Math/Round/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Round/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Round/source.vb" id="Snippet1"::: @@ -6750,7 +6750,7 @@ The following example demonstrates rounding to the nearest integer value. Because of the loss of precision that can result from representing decimal values as floating-point numbers or performing arithmetic operations on floating-point values, in some cases the method may not appear to round midpoint values to the nearest even integer. In the following example, because the floating-point value .1 has no finite binary representation, the first call to the method with a value of 11.5 returns 11 instead of 12. - :::code language="csharp" source="~/snippets/csharp/System/Math/Round/round2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Round/round2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Round/round2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Round/round2.vb" id="Snippet1"::: @@ -6827,7 +6827,7 @@ This method uses the default rounding convention of method with different `mode` values. -:::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/midpoint1.cs" interactive="try-dotnet" id="Snippet5"::: +:::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/midpoint1.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Round/midpoint1.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Round/midpoint1.vb" id="Snippet5"::: @@ -7003,7 +7003,7 @@ The following example rounds double values with two fractional digits to doubles Because of the loss of precision that can result from representing decimal values as floating-point numbers or performing arithmetic operations on floating-point values, in some cases the method may not appear to round midpoint values to the nearest even value in the decimal position. This is illustrated in the following example, where 2.135 is rounded to 2.13 instead of 2.14. This occurs because internally the method multiplies by 10digits, and the multiplication operation in this case suffers from a loss of precision. - :::code language="csharp" source="~/snippets/csharp/System/Math/Round/round3.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Round/round3.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Round/round3.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Round/round3.vb" id="Snippet2"::: @@ -7079,7 +7079,7 @@ If the value of the `value` argument is method with different `mode` values. -:::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/midpoint2.cs" interactive="try-dotnet" id="Snippet6"::: +:::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/midpoint2.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Round/midpoint2.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Round/midpoint2.vb" id="Snippet6"::: @@ -7090,7 +7090,7 @@ The following example displays values returned by the Because of the loss of precision that can result from representing decimal values as floating-point numbers or performing arithmetic operations on floating-point values, in some cases the method may not appear to round midpoint values to the nearest even integer. In the following example, because the floating-point value .1 has no finite binary representation, the first call to the method with a value of 11.5 returns 11 instead of 12. - :::code language="csharp" source="~/snippets/csharp/System/Math/Round/round5.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Round/round5.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Round/round5.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Round/round5.vb" id="Snippet4"::: @@ -7174,7 +7174,7 @@ The value of the `decimals` argument can range from 0 to 28. The following example demonstrates how to use the method with the enumeration. -:::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/mpr.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/mpr.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Round/mpr.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Round/mpr.vb" id="Snippet1"::: @@ -7259,7 +7259,7 @@ If the value of the `value` argument is method with the enumeration. -:::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/mpr.cs" interactive="try-dotnet-method" id="Snippet4"::: +:::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/mpr.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Round/mpr.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Round/mpr.vb" id="Snippet4"::: @@ -7272,7 +7272,7 @@ The following example demonstrates how to use the Because of the loss of precision that can result from representing decimal values as floating-point numbers or performing arithmetic operations on floating-point values, in some cases the method may not appear to round midpoint values as specified by the parameter. This is illustrated in the following example, where 2.135 is rounded to 2.13 instead of 2.14. This occurs because internally the method multiplies by 10digits, and the multiplication operation in this case suffers from a loss of precision. - :::code language="csharp" source="~/snippets/csharp/System/Math/Round/round4.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Round/round4.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Round/round4.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Round/round4.vb" id="Snippet3"::: @@ -7423,7 +7423,7 @@ The following example demonstrates how to use the method to determine the sign of a value and display it to the console. - :::code language="csharp" source="~/snippets/csharp/System/Math/Sign/sign.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Sign/sign.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Sign/sign.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Sign/sign.vb" id="Snippet1"::: @@ -7509,7 +7509,7 @@ The following example demonstrates how to use the method to determine the sign of a value and display it to the console. - :::code language="csharp" source="~/snippets/csharp/System/Math/Sign/sign.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Sign/sign.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Sign/sign.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Sign/sign.vb" id="Snippet1"::: @@ -7597,7 +7597,7 @@ The following example demonstrates how to use the method to determine the sign of an value and display it to the console. - :::code language="csharp" source="~/snippets/csharp/System/Math/Sign/sign.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Sign/sign.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Sign/sign.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Sign/sign.vb" id="Snippet1"::: @@ -7683,7 +7683,7 @@ The following example demonstrates how to use the method to determine the sign of an value and display it to the console. - :::code language="csharp" source="~/snippets/csharp/System/Math/Sign/sign.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Sign/sign.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Sign/sign.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Sign/sign.vb" id="Snippet1"::: @@ -7769,7 +7769,7 @@ The following example demonstrates how to use the method to determine the sign of an value and display it to the console. - :::code language="csharp" source="~/snippets/csharp/System/Math/Sign/sign.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Sign/sign.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Sign/sign.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Sign/sign.vb" id="Snippet1"::: @@ -7844,7 +7844,7 @@ The following example demonstrates how to use the method to determine the sign of an value and display it to the console. - :::code language="csharp" source="~/snippets/csharp/System/Math/Sign/sign.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Sign/sign.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Sign/sign.fs" id="Snippet1"::: ]]> @@ -7933,7 +7933,7 @@ The following example demonstrates how to use the method to determine the sign of an value and display it to the console. - :::code language="csharp" source="~/snippets/csharp/System/Math/Sign/sign.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Sign/sign.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Sign/sign.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Sign/sign.vb" id="Snippet1"::: @@ -8019,7 +8019,7 @@ The following example demonstrates how to use the method to determine the sign of a value and display it to the console. - :::code language="csharp" source="~/snippets/csharp/System/Math/Sign/sign.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Sign/sign.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Sign/sign.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Sign/sign.vb" id="Snippet1"::: @@ -8096,7 +8096,7 @@ The following example demonstrates how to use the to evaluate certain trigonometric identities for selected angles. - :::code language="csharp" source="~/snippets/csharp/System/Math/Cos/sincos.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Cos/sincos.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Cos/sincos.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Cos/sincos.vb" id="Snippet1"::: @@ -8158,7 +8158,7 @@ The following example demonstrates how to use the to evaluate certain trigonometric identities for selected angles. - :::code language="csharp" source="~/snippets/csharp/System/Math/Cos/sincos.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Cos/sincos.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Cos/sincos.fs" id="Snippet1"::: ]]> @@ -8232,7 +8232,7 @@ The following example demonstrates how to use the to evaluate certain hyperbolic identities for selected values. - :::code language="csharp" source="~/snippets/csharp/System/Math/Cosh/sinhcosh.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Cosh/sinhcosh.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Cosh/sinhcosh.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Cosh/sinhcosh.vb" id="Snippet1"::: @@ -8317,7 +8317,7 @@ The following example demonstrates how to use the to evaluate certain hyperbolic tangent identities for selected values. - :::code language="csharp" source="~/snippets/csharp/System/Math/Tanh/tanh.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Tanh/tanh.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Tanh/tanh.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Tanh/tanh.vb" id="Snippet1"::: @@ -8588,7 +8588,7 @@ The following example demonstrates how to use the method to truncate both a positive and a negative value. - :::code language="csharp" source="~/snippets/csharp/System/Math/Truncate/Truncate1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Truncate/Truncate1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Truncate/Truncate1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Truncate/Truncate1.vb" id="Snippet2"::: @@ -8667,7 +8667,7 @@ Dim i As Integer = CInt(Math.Truncate(d)) ' Result: 164 ## Examples The following example calls the method to truncate both a positive and a negative value. - :::code language="csharp" source="~/snippets/csharp/System/Math/Truncate/Truncate1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Math/Truncate/Truncate1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Math/Truncate/Truncate1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Math/Truncate/Truncate1.vb" id="Snippet1"::: diff --git a/xml/System/MidpointRounding.xml b/xml/System/MidpointRounding.xml index d1a4fc10bf2..4aaf453f28b 100644 --- a/xml/System/MidpointRounding.xml +++ b/xml/System/MidpointRounding.xml @@ -68,7 +68,7 @@ method in conjunction with the `MidpointRounding` enumeration: - :::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/mpr.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Decimal/Round/mpr.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Decimal/Round/mpr.vb" id="Snippet1"::: ]]> diff --git a/xml/System/MissingFieldException.xml b/xml/System/MissingFieldException.xml index a62c74f25b2..55283734af2 100644 --- a/xml/System/MissingFieldException.xml +++ b/xml/System/MissingFieldException.xml @@ -82,7 +82,7 @@ ## Examples This example shows what happens if you attempt to use reflection to call a method that does not exist and access a field that does not exist. The application recovers by catching the , , and . - :::code language="csharp" source="~/snippets/csharp/System/MissingFieldException/Overview/MissingMethodException.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/MissingFieldException/Overview/MissingMethodException.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/MissingFieldException/Overview/MissingMethodException.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/MissingFieldException/Overview/missingmethodexception.vb" id="Snippet1"::: diff --git a/xml/System/MissingMemberException.xml b/xml/System/MissingMemberException.xml index b7aa24a36ef..0fc2886b250 100644 --- a/xml/System/MissingMemberException.xml +++ b/xml/System/MissingMemberException.xml @@ -86,7 +86,7 @@ ## Examples This example shows what happens if you attempt to use reflection to call a method that does not exist and access a field that does not exist. The application recovers by catching the , , and . - :::code language="csharp" source="~/snippets/csharp/System/MissingFieldException/Overview/MissingMethodException.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/MissingFieldException/Overview/MissingMethodException.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/MissingFieldException/Overview/MissingMethodException.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/MissingFieldException/Overview/missingmethodexception.vb" id="Snippet1"::: diff --git a/xml/System/MissingMethodException.xml b/xml/System/MissingMethodException.xml index 24dd59e3e19..e7c7df39659 100644 --- a/xml/System/MissingMethodException.xml +++ b/xml/System/MissingMethodException.xml @@ -87,7 +87,7 @@ The exact timing of when statically referenced methods are loaded is unspecified ## Examples This example shows what happens if you attempt to use reflection to call a method that does not exist and access a field that does not exist. The application recovers by catching the , , and . - :::code language="csharp" source="~/snippets/csharp/System/MissingFieldException/Overview/MissingMethodException.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/MissingFieldException/Overview/MissingMethodException.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/MissingFieldException/Overview/MissingMethodException.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/MissingFieldException/Overview/missingmethodexception.vb" id="Snippet1"::: diff --git a/xml/System/MulticastDelegate.xml b/xml/System/MulticastDelegate.xml index ee2b3acd5f1..1328dac59c9 100644 --- a/xml/System/MulticastDelegate.xml +++ b/xml/System/MulticastDelegate.xml @@ -88,7 +88,7 @@ The `Test.Main` method is the application entry point. It instantiates a `StringContainer` object, populates it with strings, and creates two `CheckAndDisplayDelegate` delegates, `conStart` and `vowelStart`, that invoke a single method. It then calls the method to create the `multipleDelegates` delegate, which initially contains the `ConStart` and `VowelStart` delegates. Note that when the `multipleDelegates` delegate is invoked, it displays all the strings in the collection in their original order. This is because each letter is passed separately to each delegate, and each letter meets the filtering criteria of only one of the two delegates. Finally, after calls to and , `multipleDelegates` contains two `conStart` delegates. When it is invoked, each string in the `StringContainer` object is displayed twice. - :::code language="csharp" source="~/snippets/csharp/System/MulticastDelegate/Overview/delegatestring.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/MulticastDelegate/Overview/delegatestring.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/MulticastDelegate/Overview/delegatestring.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/MulticastDelegate/Overview/delegatestring.vb" id="Snippet1"::: diff --git a/xml/System/Nullable.xml b/xml/System/Nullable.xml index d7367a9e53b..644a90f2414 100644 --- a/xml/System/Nullable.xml +++ b/xml/System/Nullable.xml @@ -281,7 +281,7 @@ ## Examples The following code example defines a method whose return value is of type of . The code example uses the method to display the type argument of the return value. - :::code language="csharp" source="~/snippets/csharp/System/Nullable/GetUnderlyingType/gut.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Nullable/GetUnderlyingType/gut.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Nullable/GetUnderlyingType/gut.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Nullable/GetUnderlyingType/gut.vb" id="Snippet1"::: diff --git a/xml/System/Nullable`1.xml b/xml/System/Nullable`1.xml index 5b6f8e0500e..cccf55f05e4 100644 --- a/xml/System/Nullable`1.xml +++ b/xml/System/Nullable`1.xml @@ -69,7 +69,7 @@ @@ -204,7 +204,7 @@ The following code example defines three rows of a table in the Microsoft Pubs s ## Examples The following code example determines whether an object and a object are equal to the current object. - :::code language="csharp" source="~/snippets/csharp/System/NullableT/Equals/eq.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/NullableT/Equals/eq.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/NullableT/Equals/eq.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/NullableT/Equals/eq.vb" id="Snippet1"::: @@ -274,7 +274,7 @@ The following code example defines three rows of a table in the Microsoft Pubs s ## Examples The following code example retrieves the value of a object if that value is defined; otherwise, it retrieves the default value or a specific default value. - :::code language="csharp" source="~/snippets/csharp/System/NullableT/GetValueOrDefault/gvod.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/NullableT/GetValueOrDefault/gvod.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/NullableT/GetValueOrDefault/gvod.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/NullableT/GetValueOrDefault/gvod.vb" id="Snippet1"::: @@ -468,7 +468,7 @@ The following code example defines three rows of a table in the Microsoft Pubs s ## Examples The following example uses the property of a `Nullable` (`Nullable(Of Integer)` in Visual Basic) object to determine whether it should display the object's property or its property. - :::code language="csharp" source="~/snippets/csharp/System/NullableT/HasValue/hasvalue2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/NullableT/HasValue/hasvalue2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/NullableT/HasValue/hasvalue2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/NullableT/HasValue/hasvalue2.vb" id="Snippet1"::: @@ -727,7 +727,7 @@ The following code example defines three rows of a table in the Microsoft Pubs s ## Examples The following example uses the property of a `Nullable` (`Nullable(Of Integer)` in Visual Basic) object to determine whether it should display the object's property or its property. - :::code language="csharp" source="~/snippets/csharp/System/NullableT/HasValue/hasvalue2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/NullableT/HasValue/hasvalue2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/NullableT/HasValue/hasvalue2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/NullableT/HasValue/hasvalue2.vb" id="Snippet1"::: diff --git a/xml/System/Object.xml b/xml/System/Object.xml index 0b1b6a87025..31f238678c0 100644 --- a/xml/System/Object.xml +++ b/xml/System/Object.xml @@ -65,7 +65,7 @@ class and overrides many of the virtual methods of the class. In addition, the example shows how to call many of the static and instance methods of the class. -:::code language="csharp" source="~/snippets/csharp/System/Object/Overview/ObjectX.cs" interactive="try-dotnet" id="snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/Object/Overview/ObjectX.cs" id="snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Object/Overview/ObjectX.fs" id="snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Object/Overview/objectX.vb" id="snippet1"::: ]]> @@ -277,7 +277,7 @@ The following example defines a Point type derived from the ## Examples The following example illustrates the method and compares it with the method. - :::code language="csharp" source="~/snippets/csharp/System/Object/Equals/equals_static2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Object/Equals/equals_static2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Object/Equals/equals_static2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Object/Equals/equals_static2.vb" id="Snippet1"::: @@ -511,7 +511,7 @@ For an additional example that overrides the me For two objects `x` and `y` that have identical runtime types, `Object.ReferenceEquals(x.GetType(),y.GetType())` returns `true`. The following example uses the method with the method to determine whether one numeric value is the same type as two other numeric values. - :::code language="csharp" source="~/snippets/csharp/System/Object/GetType/gettype1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Object/GetType/gettype1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Object/GetType/gettype1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Object/GetType/gettype1.vb" id="Snippet1"::: @@ -520,7 +520,7 @@ For an additional example that overrides the me The method is inherited by all types that derive from . This means that, in addition to using your own language's comparison keyword, you can use the method to determine the type of a particular object, as the following example shows. - :::code language="csharp" source="~/snippets/csharp/System/Object/GetType/GetTypeEx2.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Object/GetType/GetTypeEx2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Object/GetType/GetTypeEx2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Object/GetType/GetTypeEx2.vb" id="Snippet2"::: @@ -532,7 +532,7 @@ For an additional example that overrides the me The following code example demonstrates that returns the runtime type of the current instance. - :::code language="csharp" source="~/snippets/csharp/System/Object/GetType/gettype.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Object/GetType/gettype.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Object/GetType/gettype.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Object/GetType/gettype.vb" id="Snippet1"::: @@ -608,7 +608,7 @@ To illustrate the difference between a shallow and a deep copy operation, consid ## Examples The following example illustrates the method. It defines a `ShallowCopy` method that calls the method to perform a shallow copy operation on a `Person` object. It also defines a `DeepCopy` method that performs a deep copy operation on a `Person` object. - :::code language="csharp" source="~/snippets/csharp/System/Object/MemberwiseClone/memberwiseclone1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Object/MemberwiseClone/memberwiseclone1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Object/MemberwiseClone/memberwiseclone1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Object/MemberwiseClone/memberwiseclone1.vb" id="Snippet1"::: @@ -688,7 +688,7 @@ To illustrate the difference between a shallow and a deep copy operation, consid - When comparing value types. If `objA` and `objB` are value types, they are boxed before they are passed to the method. This means that if both `objA` and `objB` represent the same instance of a value type, the method nevertheless returns `false`, as the following example shows. - :::code language="csharp" source="~/snippets/csharp/System/Object/ReferenceEquals/referenceequals4.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Object/ReferenceEquals/referenceequals4.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Object/ReferenceEquals/referenceequals4.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Object/ReferenceEquals/referenceequals4.vb" id="Snippet1"::: @@ -696,7 +696,7 @@ To illustrate the difference between a shallow and a deep copy operation, consid - When comparing strings. If `objA` and `objB` are strings, the method returns `true` if the string is interned. It does not perform a test for value equality. In the following example, `s1` and `s2` are equal because they are two instances of a single interned string. However, `s3` and `s4` are not equal, because although they have identical string values, that string is not interned. - :::code language="csharp" source="~/snippets/csharp/System/Object/ReferenceEquals/referenceequalsa.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Object/ReferenceEquals/referenceequalsa.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Object/ReferenceEquals/referenceequalsa.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Object/ReferenceEquals/referenceequalsa.vb" id="Snippet2"::: @@ -708,7 +708,7 @@ To illustrate the difference between a shallow and a deep copy operation, consid The following example uses to determine if two objects are the same instance. - :::code language="csharp" source="~/snippets/csharp/System/Object/ReferenceEquals/referenceequals.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Object/ReferenceEquals/referenceequals.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Object/ReferenceEquals/referenceequals.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Object/ReferenceEquals/referenceequals.vb" id="Snippet1"::: diff --git a/xml/System/ObjectDisposedException.xml b/xml/System/ObjectDisposedException.xml index 6162b1bf132..1f4cb112bd9 100644 --- a/xml/System/ObjectDisposedException.xml +++ b/xml/System/ObjectDisposedException.xml @@ -86,7 +86,7 @@ ## Examples The following example demonstrates an error that causes the `ObjectDisposedException` exception to be thrown. - :::code language="csharp" source="~/snippets/csharp/System/ObjectDisposedException/Overview/objdispexc.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/ObjectDisposedException/Overview/objdispexc.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/ObjectDisposedException/Overview/objdispexc.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/ObjectDisposedException/Overview/objdispexc.vb" id="Snippet1"::: diff --git a/xml/System/OutOfMemoryException.xml b/xml/System/OutOfMemoryException.xml index f417444631f..9e297e272e0 100644 --- a/xml/System/OutOfMemoryException.xml +++ b/xml/System/OutOfMemoryException.xml @@ -99,7 +99,7 @@ An exception has two major causes: You are attempting to increase the length of a object beyond the size specified by its property. The following example illustrates the exception thrown by a call to the method when the example tries to insert a string that would cause the object's property to exceed its maximum capacity. -:::code language="csharp" source="~/snippets/csharp/System/OutOfMemoryException/Overview/sb_example1.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/OutOfMemoryException/Overview/sb_example1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/OutOfMemoryException/Overview/sb_example1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/OutOfMemoryException/Overview/sb_example1.vb" id="Snippet1"::: diff --git a/xml/System/OverflowException.xml b/xml/System/OverflowException.xml index e3704fdc324..f15dca88e31 100644 --- a/xml/System/OverflowException.xml +++ b/xml/System/OverflowException.xml @@ -71,13 +71,13 @@ - An arithmetic operation produces a result that is outside the range of the data type returned by the operation. The following example illustrates the that is thrown by a multiplication operation that overflows the bounds of the type. - :::code language="csharp" source="~/snippets/csharp/System/OverflowException/Overview/arithmetic1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/OverflowException/Overview/arithmetic1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/OverflowException/Overview/arithmetic1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/OverflowException/Overview/arithmetic1.vb" id="Snippet1"::: - A casting or conversion operation attempts to perform a narrowing conversion, and the value of the source data type is outside the range of the target data type. The following example illustrates the that is thrown by the attempt to convert a large unsigned byte value to a signed byte value. - :::code language="csharp" source="~/snippets/csharp/System/OverflowException/Overview/arithmetic1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/OverflowException/Overview/arithmetic1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/OverflowException/Overview/arithmetic1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/OverflowException/Overview/arithmetic1.vb" id="Snippet2"::: @@ -85,7 +85,7 @@ For the arithmetic, casting, or conversion operation to throw an , the operation must occur in a checked context. By default, arithmetic operations and overflows in Visual Basic are checked; in C# and F#, they are not. If the operation occurs in an unchecked context, the result is truncated by discarding any high-order bits that do not fit into the destination type. The following example illustrates such an unchecked conversion in C# or F#. It repeats the previous example in an unchecked context. - :::code language="csharp" source="~/snippets/csharp/System/OverflowException/Overview/arithmetic1.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/OverflowException/Overview/arithmetic1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/OverflowException/Overview/arithmetic1.fs" id="Snippet3"::: The following Microsoft intermediate language (MSIL) instructions throw an : diff --git a/xml/System/Predicate`1.xml b/xml/System/Predicate`1.xml index adcf1c6b29c..926989d669b 100644 --- a/xml/System/Predicate`1.xml +++ b/xml/System/Predicate`1.xml @@ -81,7 +81,7 @@ Typically, the delegate is represented by a lambda expression. Because locally scoped variables are available to the lambda expression, it is easy to test for a condition that is not precisely known at compile time. This is simulated in the following example, which defines a `HockeyTeam` class that contains information about a National Hockey League team and the year in which it was founded. The example defines an array of integer values that represent years, and randomly assigns one element of the array to `foundedBeforeYear`, which is a variable that is locally scoped to the example's `Main` method. Because locally scoped variables are available to a lambda expression, the lambda expression passed to the method is able to return a `HockeyTeam` object for each team founded on or before that year. - :::code language="csharp" source="~/snippets/csharp/System/PredicateT/Overview/predicate1.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/PredicateT/Overview/predicate1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/PredicateT/Overview/predicate1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/PredicateT/Overview/predicate1.vb" id="Snippet3"::: @@ -90,13 +90,13 @@ ## Examples The following code example uses a delegate with the method to search an array of structures. The example explicitly defines a delegate named `predicate` and assigns it a method named `FindPoints` that returns `true` if the product of the and fields is greater than 100,000. Note that it is customary to use a lambda expression rather than to explicitly define a delegate of type , as the second example illustrates. - :::code language="csharp" source="~/snippets/csharp/System/PredicateT/Overview/predicateex2.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/PredicateT/Overview/predicateex2.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/PredicateT/Overview/predicateex2.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/PredicateT/Overview/predicateex2.vb" id="Snippet4"::: The following example is identical to the previous example, except that it uses a lambda expression to represent the delegate. Each element of the `points` array is passed to the lambda expression until the expression finds an element that meets the search criteria. In this case, the lambda expression returns `true` if the product of the X and Y fields is greater than 100,000. - :::code language="csharp" source="~/snippets/csharp/System/PredicateT/Overview/predicateex1.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/PredicateT/Overview/predicateex1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/PredicateT/Overview/predicateex1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/PredicateT/Overview/predicateex1.vb" id="Snippet2"::: diff --git a/xml/System/Random.xml b/xml/System/Random.xml index 12491dac6fb..770609f3e38 100644 --- a/xml/System/Random.xml +++ b/xml/System/Random.xml @@ -76,13 +76,13 @@ , , and methods to generate sequences of random numbers within different ranges. -:::code language="csharp" source="~/snippets/csharp/System/Random/Overview/Random2.cs" interactive="try-dotnet-method" id="Snippet2"::: +:::code language="csharp" source="~/snippets/csharp/System/Random/Overview/Random2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Random/fs/Random2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Random/Overview/Random2.vb" id="Snippet2"::: The following example generates a random integer that it uses as an index to retrieve a string value from an array. -:::code language="csharp" source="~/snippets/csharp/System/Random/Overview/next1.cs" interactive="try-dotnet-method" id="Snippet3"::: +:::code language="csharp" source="~/snippets/csharp/System/Random/Overview/next1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Random.Next/FS/next1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Random/Overview/next1.vb" id="Snippet3"::: ]]> @@ -165,7 +165,7 @@ In .NET Core, the default seed value is produced by the thread-static, pseudo-ra The following example uses the parameterless constructor to instantiate three objects and displays a sequence of five random integers for each. If it is run on .NET Framework, because the first two objects are created in close succession, they are instantiated using identical seed values based on the system clock and, therefore, they produce an identical sequence of random numbers. On the other hand, the parameterless constructor of the third object is called after a two-second delay caused by calling the method. Because this produces a different seed value for the third object, it produces a different sequence of random numbers. - :::code language="csharp" source="~/snippets/csharp/System/Random/.ctor/ctor1.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Random/.ctor/ctor1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Random.Ctor/FS/ctor1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Random/.ctor/ctor1.vb" id="Snippet2"::: @@ -225,7 +225,7 @@ The following example uses the parameterless constructor to instantiate three overload does. However, the system clock might not have sufficient resolution to provide different invocations of this constructor with a different seed value. On the .NET Framework, this results in random number generators that generate identical sequences of pseudo-random numbers, as illustrated by the first two objects in the following example. To prevent this, apply an algorithm to differentiate the seed value in each invocation, or call the method to ensure that you provide each constructor with a different seed value. - :::code language="csharp" source="~/snippets/csharp/System/Random/.ctor/ctor4.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Random/.ctor/ctor4.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Random.Ctor/FS/ctor4.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Random/.ctor/ctor4.vb" id="Snippet4"::: @@ -236,7 +236,7 @@ The following example uses the parameterless constructor to instantiate three objects with the class constructor that takes a seed parameter and generates a sequence of random integers and doubles. The example illustrates that the same sequence is generated when the object is created again with the constructor and seed parameter. - :::code language="csharp" source="~/snippets/csharp/System/Random/.ctor/ctor.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Random/.ctor/ctor.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Random.Ctor/FS/ctor.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Random/.ctor/ctor.vb" id="Snippet1"::: @@ -613,13 +613,13 @@ The following example uses the parameterless constructor to instantiate three method to generate 10 random numbers. - :::code language="csharp" source="~/snippets/csharp/System/Random/Overview/next3.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Random/Overview/next3.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Random.Next/FS/next3.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Random/Overview/next3.vb" id="Snippet5"::: The following example derives a class from to generate a sequence of random numbers whose distribution differs from the uniform distribution generated by the method of the base class. It overrides the method to provide the distribution of random numbers, and overrides the method to use series of random numbers. - :::code language="csharp" source="~/snippets/csharp/System/Random/Next/sample.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Random/Next/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Random/Next/sample.vb" id="Snippet1"::: ]]> @@ -689,13 +689,13 @@ The following example uses the parameterless constructor to instantiate three method. - :::code language="csharp" source="~/snippets/csharp/System/Random/Overview/next.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Random/Overview/next.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Random.Next/FS/next.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Random/Overview/next.vb" id="Snippet1"::: The following example generates a random integer that it uses as an index to retrieve a string value from an array. Because the highest index of the array is one less than its length, the value of the property is supplied as a the `maxValue` parameter. - :::code language="csharp" source="~/snippets/csharp/System/Random/Overview/next1.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Random/Overview/next1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Random.Next/FS/next1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Random/Overview/next1.vb" id="Snippet3"::: @@ -769,13 +769,13 @@ The following example uses the parameterless constructor to instantiate three method to generate random integers with three distinct ranges. Note that the exact output from the example depends on the system-supplied seed value passed to the class constructor. - :::code language="csharp" source="~/snippets/csharp/System/Random/Overview/Next2.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Random/Overview/Next2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Random.Next/FS/Next2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Random/Overview/next2.vb" id="Snippet2"::: The following example generates a random integer that it uses as an index to retrieve a string value from an array. Because the highest index of the array is one less than its length, the value of the property is supplied as a the `maxValue` parameter. - :::code language="csharp" source="~/snippets/csharp/System/Random/Overview/next4.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Random/Overview/next4.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Random.Next/FS/next4.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Random/Overview/next4.vb" id="Snippet4"::: @@ -850,7 +850,7 @@ The following example uses the parameterless constructor to instantiate three method to fill an array of bytes with random byte values. - :::code language="csharp" source="~/snippets/csharp/System/Random/NextBytes/source.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Random/NextBytes/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Random/NextBytes/source.vb" id="Snippet1"::: ]]> @@ -979,13 +979,13 @@ Each element of the span of bytes is set to a random number greater than or equa The following example uses the method to generate sequences of random doubles. - :::code language="csharp" source="~/snippets/csharp/System/Random/.ctor/ctor.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Random/.ctor/ctor.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Random.Ctor/FS/ctor.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Random/.ctor/ctor.vb" id="Snippet1"::: The following example calls the method to generate 100 random numbers and displays their frequency distribution. - :::code language="csharp" source="~/snippets/csharp/System/Random/NextDouble/nextdouble1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Random/NextDouble/nextdouble1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.random.nextdouble/fs/nextdouble1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Random/NextDouble/nextdouble1.vb" id="Snippet2"::: @@ -1210,7 +1210,7 @@ Each element of the span of bytes is set to a random number greater than or equa ## Examples The following example derives a class from and overrides the method to generate a distribution of random numbers. This distribution is different than the uniform distribution generated by the method of the base class. - :::code language="csharp" source="~/snippets/csharp/System/Random/Next/sample.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Random/Next/sample.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Random.Sample/FS/sample.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Random/Next/sample.vb" id="Snippet1"::: diff --git a/xml/System/Single.xml b/xml/System/Single.xml index 2ad657a6a1e..2be311af216 100644 --- a/xml/System/Single.xml +++ b/xml/System/Single.xml @@ -1858,13 +1858,13 @@ This is known as Euler's number and is approximately 2.7182818284590452354. ## Remarks The method should be used with caution, because two apparently equivalent values can be unequal due to the differing precision of the two values. The following example reports that the value .3333 and the returned by dividing 1 by 3 are unequal. - :::code language="csharp" source="~/snippets/csharp/System/Single/Epsilon/SingleEquals_25051.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/Epsilon/SingleEquals_25051.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/Epsilon/SingleEquals_25051.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/Equals/SingleEquals_25051.vb" id="Snippet3"::: Rather than comparing for equality, one recommended technique involves defining an acceptable margin of difference between two values (such as .01% of one of the values). If the absolute value of the difference between the two values is less than or equal to that margin, the difference is likely to be due to differences in precision and, therefore, the values are likely to be equal. The following example uses this technique to compare .33333 and 1/3, the two values that the previous code example found to be unequal. - :::code language="csharp" source="~/snippets/csharp/System/Single/Epsilon/SingleEquals_25051.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/Epsilon/SingleEquals_25051.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/Epsilon/SingleEquals_25051.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/Equals/SingleEquals_25051.vb" id="Snippet4"::: @@ -1889,7 +1889,7 @@ This is known as Euler's number and is approximately 2.7182818284590452354. Compiler overload resolution may account for an apparent difference in the behavior of the two method overloads. If an implicit conversion between the argument and a is defined and the argument is not typed as an , compilers may perform an implicit conversion and call the method. Otherwise, they call the method, which always returns if its argument is not a value. The following example illustrates the difference in behavior between the two method overloads. In the case of all primitive numeric types except for in Visual Basic and except for and in C#, the first comparison returns because the compiler automatically performs a widening conversion and calls the method, whereas the second comparison returns because the compiler calls the method. - :::code language="csharp" source="~/snippets/csharp/System/Single/Equals/equalsoverl.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/Equals/equalsoverl.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/Equals/equalsoverl.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/Equals/equalsoverl.vb" id="Snippet2"::: @@ -1949,7 +1949,7 @@ This is known as Euler's number and is approximately 2.7182818284590452354. Compiler overload resolution may account for an apparent difference in the behavior of the two method overloads. If an implicit conversion between the argument and a is defined and the argument is not typed as an , compilers may perform an implicit conversion and call the method. Otherwise, they call the method, which always returns if its argument is not a value. The following example illustrates the difference in behavior between the two method overloads. In the case of all primitive numeric types except for in Visual Basic and except for and in C#, the first comparison returns because the compiler automatically performs a widening conversion and calls the method, whereas the second comparison returns because the compiler calls the method. - :::code language="csharp" source="~/snippets/csharp/System/Single/Equals/equalsoverl.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/Equals/equalsoverl.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/Equals/equalsoverl.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/Equals/equalsoverl.vb" id="Snippet2"::: @@ -2653,7 +2653,7 @@ A return value of `false` does not imply that method. - :::code language="csharp" source="~/snippets/csharp/System/Single/CompareTo/singlesample.cs" interactive="try-dotnet-method" id="Snippet11"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/CompareTo/singlesample.cs" id="Snippet11"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/CompareTo/singlesample.fs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/Equals/singlesample.vb" id="Snippet11"::: @@ -2908,7 +2908,7 @@ This method correctly handles floating-point values and so `2.0` and `3.0` will ## Examples The following code example demonstrates the method. - :::code language="csharp" source="~/snippets/csharp/System/Single/CompareTo/singlesample.cs" interactive="try-dotnet-method" id="Snippet13"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/CompareTo/singlesample.cs" id="Snippet13"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/CompareTo/singlesample.fs" id="Snippet13"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/Equals/singlesample.vb" id="Snippet13"::: @@ -3128,7 +3128,7 @@ A return value of `false` does not imply that method. - :::code language="csharp" source="~/snippets/csharp/System/Single/CompareTo/singlesample.cs" interactive="try-dotnet-method" id="Snippet12"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/CompareTo/singlesample.cs" id="Snippet12"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/CompareTo/singlesample.fs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/Equals/singlesample.vb" id="Snippet12"::: @@ -3870,7 +3870,7 @@ For this method matches the IEEE 754:2 The result of an operation that exceeds is . In the following example, results from addition, multiplication, and exponentiation operations when the result exceeds . - :::code language="csharp" source="~/snippets/csharp/System/Single/MaxValue/maxvalueex.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/MaxValue/maxvalueex.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/MaxValue/maxvalueex.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/MaxValue/maxvalueex.vb" id="Snippet1"::: @@ -4171,7 +4171,7 @@ For this method matches the IEEE 754:2 The result of an operation that is less than is . In the following example, results from subtraction and multiplication operations when the result is less than . - :::code language="csharp" source="~/snippets/csharp/System/Single/MinValue/minvalueex.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/MinValue/minvalueex.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/MinValue/minvalueex.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/MinValue/minvalueex.vb" id="Snippet1"::: @@ -4277,19 +4277,19 @@ For this method matches the IEEE 754:2 ## Remarks A method or operator returns when the result of an operation is undefined. For example, the result of dividing zero by zero is , as the following example shows. (But note that dividing a non-zero number by zero returns either or , depending on the sign of the divisor.) - :::code language="csharp" source="~/snippets/csharp/System/Single/NaN/nan1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/NaN/nan1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/NaN/nan1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/NaN/nan1.vb" id="Snippet1"::: In addition, a method call with a value or an operation on a value returns , as the following example shows. - :::code language="csharp" source="~/snippets/csharp/System/Single/NaN/nan1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/NaN/nan1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/NaN/nan1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/NaN/nan1.vb" id="Snippet2"::: Use the method to determine whether a value is not a number. In general, operators cannot be used to compare with other values, although comparison methods (such as and ) can. The following example illustrates the difference in behavior between comparison operators and methods. - :::code language="csharp" source="~/snippets/csharp/System/Single/NaN/single.nan4.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/NaN/single.nan4.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/NaN/single.nan4.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/NaN/single.nan4.vb" id="Snippet4"::: @@ -4298,7 +4298,7 @@ For this method matches the IEEE 754:2 ## Examples The following example demonstrates the constant. - :::code language="csharp" source="~/snippets/csharp/System/Single/CompareTo/singlesample.cs" interactive="try-dotnet-method" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/CompareTo/singlesample.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/CompareTo/singlesample.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/Equals/singlesample.vb" id="Snippet7"::: @@ -4364,7 +4364,7 @@ For this method matches the IEEE 754:2 ## Examples The following code example demonstrates the constant. - :::code language="csharp" source="~/snippets/csharp/System/Single/CompareTo/singlesample.cs" interactive="try-dotnet-method" id="Snippet9"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/CompareTo/singlesample.cs" id="Snippet9"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/CompareTo/singlesample.fs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/Equals/singlesample.vb" id="Snippet9"::: @@ -4874,7 +4874,7 @@ If a separator is encountered in the `s` parameter during a parse operation, and ## Examples The following example uses the method to convert an array of strings to equivalent values. - :::code language="csharp" source="~/snippets/csharp/System/Single/Parse/parse1.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/Parse/parse1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/Parse/parse1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/Parse/parse1.vb" id="Snippet2"::: @@ -5111,7 +5111,7 @@ If a separator is encountered in the `s` parameter during a parse operation, and ## Examples The following example uses the method to parse the string representations of values. The example uses formatting information for the en-US culture. - :::code language="csharp" source="~/snippets/csharp/System/Single/Parse/parse2.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/Parse/parse2.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/Parse/parse2.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/Parse/parse2.vb" id="Snippet3"::: @@ -5502,7 +5502,7 @@ If a separator is encountered in the `s` parameter during a parse operation, and ## Examples The following code example uses the method to parse the string representations of values. Each string in an array is parsed using the formatting conventions of the en-US, nl-NL, and a custom culture. The custom culture defines its group separator symbol as the underscore ("_") and its group size as two. - :::code language="csharp" source="~/snippets/csharp/System/Single/Parse/parse3.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/Parse/parse3.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/Parse/parse3.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/Parse/parse3.vb" id="Snippet4"::: @@ -5619,7 +5619,7 @@ Pi is approximately 3.1415926535897932385. ## Examples The following code example demonstrates the constant. - :::code language="csharp" source="~/snippets/csharp/System/Single/CompareTo/singlesample.cs" interactive="try-dotnet-method" id="Snippet10"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/CompareTo/singlesample.cs" id="Snippet10"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/CompareTo/singlesample.fs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/Equals/singlesample.vb" id="Snippet10"::: @@ -9384,7 +9384,7 @@ Tau is approximately 6.2831853071795864769. ## Examples The following example uses the default method to display the string representations of a number of values. - :::code language="csharp" source="~/snippets/csharp/System/Single/ToString/ToString1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/ToString/ToString1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/ToString/ToString1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/ToString/ToString1.vb" id="Snippet1"::: @@ -9510,7 +9510,7 @@ Tau is approximately 6.2831853071795864769. ## Examples The following example displays the string representation of two values using objects that represent several different cultures. - :::code language="csharp" source="~/snippets/csharp/System/Single/ToString/ToString1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/ToString/ToString1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/ToString/ToString1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/ToString/ToString1.vb" id="Snippet2"::: @@ -9730,7 +9730,7 @@ Tau is approximately 6.2831853071795864769. ## Examples The following example displays a value using each of the supported standard numeric format specifiers for several different cultures. - :::code language="csharp" source="~/snippets/csharp/System/Single/ToString/ToString1.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/ToString/ToString1.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/ToString/ToString1.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/ToString/ToString1.vb" id="Snippet4"::: @@ -10100,7 +10100,7 @@ If a separator is encountered in the `s` parameter during a parse operation, and ## Examples The following example uses the method to convert the string representations of numeric values to values. It assumes that en-US is the current culture. - :::code language="csharp" source="~/snippets/csharp/System/Single/TryParse/tryparse1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/TryParse/tryparse1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/TryParse/tryparse1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/TryParse/tryparse1.vb" id="Snippet1"::: @@ -10492,7 +10492,7 @@ If `s` is out of range of the data type, the method throws ## Examples The following example demonstrates the use of the method to parse the string representation of numbers that have a particular style and are formatted using the conventions of a particular culture. - :::code language="csharp" source="~/snippets/csharp/System/Single/TryParse/tryparse1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Single/TryParse/tryparse1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Single/TryParse/tryparse1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Single/TryParse/tryparse1.vb" id="Snippet2"::: diff --git a/xml/System/StackOverflowException.xml b/xml/System/StackOverflowException.xml index c7f0313df24..89b48d8c820 100644 --- a/xml/System/StackOverflowException.xml +++ b/xml/System/StackOverflowException.xml @@ -77,7 +77,7 @@ You can't catch a `StackOverflowException` object with a `try`/`catch` block, an 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. - :::code language="csharp" source="~/snippets/csharp/System/StackOverflowException/Overview/example1a.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/StackOverflowException/Overview/example1a.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/StackOverflowException/Overview/example1a.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/StackOverflowException/Overview/example1a.vb" id="Snippet1"::: diff --git a/xml/System/String.xml b/xml/System/String.xml index dd23651ed0d..1d47d5c2c47 100644 --- a/xml/System/String.xml +++ b/xml/System/String.xml @@ -818,7 +818,7 @@ This property returns the object at the position specified by In C#, the property is an indexer. In Visual Basic, it is the default property of the class. Each object in the string can be accessed by using code such as the following. -:::code language="csharp" source="~/snippets/csharp/System/String/Chars/chars1.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Chars/chars1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Chars/chars1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Chars/chars1.vb" id="Snippet1"::: @@ -1027,13 +1027,13 @@ Compare the path name to "file" using an ordinal comparison. The correct code to ## Examples The following example calls the method to compare three sets of strings. -:::code language="csharp" source="~/snippets/csharp/System/String/Compare/compare02.cs" interactive="try-dotnet-method" id="Snippet18"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Compare/compare02.cs" id="Snippet18"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Compare/compare02.fs" id="Snippet18"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Compare/compare02.vb" id="Snippet18"::: In the following example, the `ReverseStringComparer` class demonstrates how you can evaluate two strings with the method. -:::code language="csharp" source="~/snippets/csharp/System/String/Compare/ArrayListSample.cs" interactive="try-dotnet" id="Snippet7"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Compare/ArrayListSample.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Compare/ArrayListSample.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Compare/ArrayListSample.vb" id="Snippet7"::: @@ -1157,7 +1157,7 @@ Compare the path name to "file" using an ordinal comparison. The correct code to ## Examples The following example demonstrates that the method is equivalent to using or when comparing strings. -:::code language="csharp" source="~/snippets/csharp/System/String/Compare/compare02.cs" interactive="try-dotnet-method" id="Snippet18"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Compare/compare02.cs" id="Snippet18"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Compare/compare02.fs" id="Snippet18"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Compare/compare02.vb" id="Snippet18"::: @@ -1397,7 +1397,7 @@ Compare the path name to "file" using an ordinal comparison. The correct code to ## Examples The following example demonstrates how culture can affect a comparison. In Czech - Czech Republic culture, "ch" is a single character that is greater than "d". However, in English - United States culture, "ch" consists of two characters, and "c" is less than "d". -:::code language="csharp" source="~/snippets/csharp/System/String/Compare/string.comp4.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Compare/string.comp4.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Compare/string.comp4.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Compare/string.comp4.vb" id="Snippet1"::: @@ -1632,7 +1632,7 @@ Compare the path name to "file" using an ordinal comparison. The correct code to ## Examples The following example compares two substrings. -:::code language="csharp" source="~/snippets/csharp/System/String/Compare/comp3.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Compare/comp3.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Compare/comp3.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Compare/comp3.vb" id="Snippet1"::: @@ -1766,7 +1766,7 @@ The path name needs to be compared in an invariant manner. The correct code to d ## Examples The following example performs two comparisons of two substrings that only differ in case. The first comparison ignores case and the second comparison considers case. -:::code language="csharp" source="~/snippets/csharp/System/String/Compare/comp4.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Compare/comp4.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Compare/comp4.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Compare/comp4.vb" id="Snippet1"::: @@ -1903,7 +1903,7 @@ Compare the path name to "file" using an ordinal comparison. The correct code to ## Examples The following example compares two substrings. -:::code language="csharp" source="~/snippets/csharp/System/String/Compare/comp3.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Compare/comp3.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Compare/comp3.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Compare/comp3.vb" id="Snippet1"::: @@ -2160,7 +2160,7 @@ The comparison terminates when an inequality is discovered or both substrings ha ## Examples The following example uses the method to compare the last names of two people. It then lists them in alphabetical order. -:::code language="csharp" source="~/snippets/csharp/System/String/Compare/Example1.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Compare/Example1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Compare/Example1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Compare/Example1.vb" id="Snippet1"::: @@ -2285,7 +2285,7 @@ Because is a ## Examples The following example performs and ordinal comparison of two strings that only differ in case. -:::code language="csharp" source="~/snippets/csharp/System/String/CompareOrdinal/comp0.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/CompareOrdinal/comp0.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/CompareOrdinal/comp0.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/CompareOrdinal/comp0.vb" id="Snippet1"::: @@ -2757,14 +2757,14 @@ If `values` is an empty `IEnumerable(Of String)`, the method returns is a convenience method that lets you concatenate each element in an `IEnumerable(Of String)` collection without first converting the elements to a string array. It is particularly useful with Language-Integrated Query (LINQ) query expressions. The following example passes a `List(Of String)` object that contains either the uppercase or lowercase letters of the alphabet to a lambda expression that selects letters that are equal to or greater than a particular letter (which, in the example, is "M"). The `IEnumerable(Of String)` collection that is returned by the method is passed to the method to display the result as a single string. -:::code language="csharp" source="~/snippets/csharp/System/String/Concat/concat2.cs" interactive="try-dotnet" id="Snippet3"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Concat/concat2.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Concat/concat2.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Concat/concat2.vb" id="Snippet3"::: ## Examples The following example uses the Sieve of Eratosthenes algorithm to calculate the prime numbers that are less than or equal to 100. It assigns the result to a object of type , which it then passes to the method. -:::code language="csharp" source="~/snippets/csharp/System/String/Concat/concat1.cs" interactive="try-dotnet" id="Snippet2"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Concat/concat1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Concat/concat1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Concat/concat1.vb" id="Snippet2"::: @@ -2837,7 +2837,7 @@ The method represents `arg0` as a str ## Examples The following example demonstrates the method. -:::code language="csharp" source="~/snippets/csharp/System/String/Concat/string.concat5.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Concat/string.concat5.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Concat/string.concat5.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Concat/string.concat5.vb" id="Snippet1"::: @@ -2916,7 +2916,7 @@ The method concatenates each object in `args` by calling the parameterless `ToSt ## Examples The following example demonstrates the use of the method with an array. -:::code language="csharp" source="~/snippets/csharp/System/String/Concat/stringconcat1.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Concat/stringconcat1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Concat/stringconcat1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Concat/stringconcat1.vb" id="Snippet1"::: @@ -3101,7 +3101,7 @@ An string is used in pla ## Examples The following example demonstrates the use of the method with a array. -:::code language="csharp" source="~/snippets/csharp/System/String/Concat/stringconcat3.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Concat/stringconcat3.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Concat/stringconcat3.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Concat/stringconcat3.vb" id="Snippet1"::: @@ -3175,7 +3175,7 @@ If either of the arguments is an array reference, the method concatenates a stri ## Examples The following example demonstrates the method. -:::code language="csharp" source="~/snippets/csharp/System/String/Concat/string.concat5.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Concat/string.concat5.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Concat/string.concat5.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Concat/string.concat5.vb" id="Snippet1"::: @@ -3297,7 +3297,7 @@ An string is used in pla ## Examples The following example concatenates a person's first, middle, and last name. -:::code language="csharp" source="~/snippets/csharp/System/String/Concat/stringconcat4.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Concat/stringconcat4.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Concat/stringconcat4.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Concat/stringconcat4.vb" id="Snippet1"::: @@ -3368,7 +3368,7 @@ The method concatenates `arg0`, `arg1`, and `arg2` by calling the parameterless ## Examples The following example demonstrates the method. -:::code language="csharp" source="~/snippets/csharp/System/String/Concat/string.concat5.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Concat/string.concat5.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Concat/string.concat5.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Concat/string.concat5.vb" id="Snippet1"::: @@ -3492,7 +3492,7 @@ The method concatenates `str0`, `str1`, and `str2`; it does not add any delimite ## Examples The following example uses the method to concatenate three strings and displays the result. -:::code language="csharp" source="~/snippets/csharp/System/String/Concat/Concat6.cs" interactive="try-dotnet" id="Snippet6"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Concat/Concat6.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Concat/Concat6.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Concat/Concat6.vb" id="Snippet6"::: @@ -3566,7 +3566,7 @@ The method concatenates each object in the parameter list by calling its paramet ## Examples The following example illustrates the use of the method to concatenate a list of variable parameters. In this case, the method is called with nine parameters. -:::code language="csharp" source="~/snippets/csharp/System/String/Concat/concat4.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Concat/concat4.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Concat/concat4.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Concat/concat4.vb" id="Snippet1"::: @@ -3695,7 +3695,7 @@ The method concatenates `str0`, `str1`, `str2`, and `str3`; it does not add any ## Examples The following example defines an array of four-letter words and stores their individual letters to a string array in order to scramble them. It then calls the method to reassemble the scrambled words. -:::code language="csharp" source="~/snippets/csharp/System/String/Concat/concat4.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Concat/concat4.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Concat/concat4.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Concat/concat4.vb" id="Snippet1"::: @@ -3778,7 +3778,7 @@ An string is used in pla ## Examples The following example defines a very simple `Animal` class that contains the name of an animal and the order to which it belongs. It then defines a object to contain a number of `Animal` objects. The extension method is called to extract the `Animal` objects whose `Order` property equals "Rodent". The result is passed to the method and displayed to the console. -:::code language="csharp" source="~/snippets/csharp/System/String/Concat/concat3.cs" interactive="try-dotnet" id="Snippet4"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Concat/concat3.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Concat/concat3.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Concat/concat3.vb" id="Snippet4"::: @@ -3910,7 +3910,7 @@ If you are interested in the position of the substring `value` in the current in ## Examples The following example determines whether the string "fox" is a substring of a familiar quotation. If "fox" is found in the string, it also displays its starting position. -:::code language="csharp" source="~/snippets/csharp/System/String/Contains/cont.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Contains/cont.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Contains/cont.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Contains/cont.vb" id="Snippet1"::: @@ -4202,7 +4202,7 @@ This method copies `count` characters from the `sourceIndex` position of this in ## Examples The following example demonstrates the method. -:::code language="csharp" source="~/snippets/csharp/System/String/CopyTo/stringcopyto.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/CopyTo/stringcopyto.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/CopyTo/stringcopyto.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/CopyTo/stringcopyto.vb" id="Snippet1"::: @@ -4580,13 +4580,13 @@ This method performs a word (case-sensitive and culture-sensitive) comparison us ## Examples The following example indicates whether each string in an array ends with a period ("."). -:::code language="csharp" source="~/snippets/csharp/System/String/EndsWith/EndsWith1.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/EndsWith/EndsWith1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/EndsWith/EndsWith1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/EndsWith/EndsWith1.vb" id="Snippet1"::: The following example defines a `StripEndTags` method that uses the method to remove HTML end tags from the end of a line. Note that the `StripEndTags` method is called recursively to ensure that multiple HTML end tags at the end of the line are removed. -:::code language="csharp" source="~/snippets/csharp/System/String/EndsWith/stringendswith.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/EndsWith/stringendswith.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/EndsWith/stringendswith.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/EndsWith/stringendswith.vb" id="Snippet1"::: @@ -4668,7 +4668,7 @@ The method compares the `value` parameter to th ## Examples The following example determines whether a string ends with a particular substring. The results are affected by the choice of culture, whether case is ignored, and whether an ordinal comparison is performed. -:::code language="csharp" source="~/snippets/csharp/System/String/EndsWith/ewcmp.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/EndsWith/ewcmp.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/EndsWith/ewcmp.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/EndsWith/ewcmp.vb" id="Snippet1"::: @@ -4747,7 +4747,7 @@ This method performs a word (culture-sensitive) comparison using the specified c ## Examples The following example determines whether a string occurs at the end of another string. The method is called several times using case sensitivity, case insensitivity, and different cultures that influence the results of the search. -:::code language="csharp" source="~/snippets/csharp/System/String/EndsWith/ewci.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/EndsWith/ewci.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/EndsWith/ewci.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/EndsWith/ewci.vb" id="Snippet1"::: @@ -4884,7 +4884,7 @@ This method performs an ordinal (case-sensitive and culture-insensitive) compari ## Examples The following example demonstrates the method. -:::code language="csharp" source="~/snippets/csharp/System/String/Equals/equals.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Equals/equals.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Equals/equals.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Equals/equals.vb" id="Snippet1"::: @@ -5047,7 +5047,7 @@ This method performs an ordinal (case-sensitive and culture-insensitive) compari ## Examples The following example demonstrates the method. -:::code language="csharp" source="~/snippets/csharp/System/String/Equals/equals.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Equals/equals.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Equals/equals.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Equals/equals.vb" id="Snippet1"::: @@ -5204,7 +5204,7 @@ The `comparisonType` parameter indicates whether the comparison should use the c ## Examples The following example compares three sets of strings by using each member of the enumeration. The comparisons use the conventions of the English (United States), Thai (Thailand) and Turkish (Turkey) cultures. Note that the strings "a" and "a-" are considered equivalent in the "th-TH" culture but not in the others, while "i" and "İ" are considered equivalent in the "tr-TR" culture when case is ignored but not in the other cultures. -:::code language="csharp" source="~/snippets/csharp/System/String/Equals/equals_ex3.cs" interactive="try-dotnet" id="Snippet3"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Equals/equals_ex3.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Equals/equals_ex3.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Equals/equals_ex3.vb" id="Snippet3"::: @@ -5313,7 +5313,7 @@ This method uses the [composite formatting feature](/dotnet/standard/base-types/ The following example uses the method to embed an individual's age in the middle of a string. -:::code language="csharp" source="~/snippets/csharp/System/FormatException/Overview/format7.cs" interactive="try-dotnet-method" id="Snippet7"::: +:::code language="csharp" source="~/snippets/csharp/System/FormatException/Overview/format7.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/FormatException/Overview/format7.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/FormatException/Overview/format7.vb" id="Snippet7"::: @@ -5425,7 +5425,7 @@ This example creates a string that contains data on the high and low temperature You can also pass the objects to be formatted as an array rather than as an argument list. -:::code language="csharp" source="~/snippets/csharp/System/FormatException/Overview/format_paramarray1.cs" interactive="try-dotnet" id="Snippet10"::: +:::code language="csharp" source="~/snippets/csharp/System/FormatException/Overview/format_paramarray1.cs" id="Snippet10"::: :::code language="fsharp" source="~/snippets/fsharp/System/FormatException/Overview/format_paramarray1.fs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System/FormatException/Overview/format_paramarray1.vb" id="Snippet10"::: @@ -5696,7 +5696,7 @@ This method uses the [composite formatting feature](/dotnet/standard/base-types/ This example uses the method to display the string representation of some date and time values and numeric values by using several different cultures. -:::code language="csharp" source="~/snippets/csharp/System/String/Format/Example2.cs" interactive="try-dotnet-method" id="Snippet2"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Format/Example2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Format/Example2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Format/Example2.vb" id="Snippet2"::: @@ -6182,7 +6182,7 @@ This method uses the [composite formatting feature](/dotnet/standard/base-types/ This example uses the method to create a string that illustrates the result of a Boolean `And` operation with two integer values. Note that the format string includes six format items, but the method has only three items in its parameter list, because each item is formatted in two different ways. -:::code language="csharp" source="~/snippets/csharp/System/FormatException/Overview/format4.cs" interactive="try-dotnet-method" id="Snippet4"::: +:::code language="csharp" source="~/snippets/csharp/System/FormatException/Overview/format4.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/FormatException/Overview/format4.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/FormatException/Overview/format4.vb" id="Snippet4"::: @@ -6544,7 +6544,7 @@ This method enables you to iterate the individual characters in a string. For ex ## Examples The following example iterates the characters in several strings and displays information about their individual characters. It uses the language iteration construct rather than a call to the method. -:::code language="csharp" source="~/snippets/csharp/System/String/GetEnumerator/getenumerator.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/GetEnumerator/getenumerator.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/GetEnumerator/getenumerator.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/GetEnumerator/getenumerator.vb" id="Snippet1"::: @@ -6907,7 +6907,7 @@ The `GetPinnableReference` method returns a character that can be used for pinni ## Examples The following example displays the enumerated constant for the type. -:::code language="csharp" source="~/snippets/csharp/System/String/GetTypeCode/gtc.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/GetTypeCode/gtc.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/GetTypeCode/gtc.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/GetTypeCode/gtc.vb" id="Snippet1"::: @@ -6991,7 +6991,7 @@ This method performs an ordinal (culture-insensitive) search, where a character ## Examples The following example demonstrates how you can search a for a character using the method. -:::code language="csharp" source="~/snippets/csharp/System/String/IndexOf/indexof_c.cs" interactive="try-dotnet-method" id="Snippet5"::: +:::code language="csharp" source="~/snippets/csharp/System/String/IndexOf/indexof_c.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/IndexOf/indexof_c.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/String/IndexOf/indexof_c.vb" id="Snippet5"::: @@ -7066,7 +7066,7 @@ Character sets include ignorable characters, which are characters that are not c ## Examples The following example searches for the "n" in "animal". Because string indexes begin at zero rather than one, the method indicates that the "n" is at position 1. -:::code language="csharp" source="~/snippets/csharp/System/String/IndexOf/simple1.cs" interactive="try-dotnet-method" id="Snippet12"::: +:::code language="csharp" source="~/snippets/csharp/System/String/IndexOf/simple1.cs" id="Snippet12"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/IndexOf/simple1.fs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System/String/IndexOf/simple1.vb" id="Snippet12"::: @@ -7157,7 +7157,7 @@ This method performs an ordinal (culture-insensitive) search, where a character ## Examples The following example demonstrates the method. -:::code language="csharp" source="~/snippets/csharp/System/String/IndexOf/ixof1.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/IndexOf/ixof1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/IndexOf/ixof1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/IndexOf/ixof1.vb" id="Snippet1"::: @@ -7468,7 +7468,7 @@ This method performs an ordinal (culture-insensitive) search, where a character ## Examples The following example demonstrates the method. -:::code language="csharp" source="~/snippets/csharp/System/String/IndexOf/indexofcii.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/IndexOf/indexofcii.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/IndexOf/indexofcii.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/IndexOf/indexofcii.vb" id="Snippet1"::: @@ -7558,7 +7558,7 @@ Character sets include ignorable characters, which are characters that are not c ## Examples The following example finds the index of all occurrences of the string "he" within a substring of another string. Note that the number of characters to be searched must be recalculated for each search iteration. -:::code language="csharp" source="~/snippets/csharp/System/String/IndexOf/ixof8.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/IndexOf/ixof8.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/IndexOf/ixof8.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/IndexOf/ixof8.vb" id="Snippet1"::: @@ -7856,7 +7856,7 @@ This method performs an ordinal (culture-insensitive) search, where a character The following example finds the first vowel in a string. -:::code language="csharp" source="~/snippets/csharp/System/String/IndexOfAny/IndexOfAny1.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/IndexOfAny/IndexOfAny1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/IndexOfAny/IndexOfAny1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/IndexOfAny/IndexOfAny1.vb" id="Snippet1"::: @@ -7938,7 +7938,7 @@ This method performs an ordinal (culture-insensitive) search, where a character ## Examples The following example finds the index of the occurrence of any character of the string "is" within a substring of another string. -:::code language="csharp" source="~/snippets/csharp/System/String/IndexOfAny/ixany2.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/IndexOfAny/ixany2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/IndexOfAny/ixany2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/IndexOfAny/ixany2.vb" id="Snippet1"::: @@ -8031,7 +8031,7 @@ This method performs an ordinal (culture-insensitive) search, where a character ## Examples The following example finds the index of the occurrence of any character of the string "aid" within a substring of another string. -:::code language="csharp" source="~/snippets/csharp/System/String/IndexOfAny/ixany3.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/IndexOfAny/ixany3.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/IndexOfAny/ixany3.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/IndexOfAny/ixany3.vb" id="Snippet1"::: @@ -8121,7 +8121,7 @@ For example, the return value of `"abc".Insert(2, "XYZ")` is "abXYZc". ## Examples The following example inserts a space character in the fourth character position (the character at index 3) of a string. -:::code language="csharp" source="~/snippets/csharp/System/String/Insert/Insert1.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Insert/Insert1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Insert/Insert1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Insert/Insert1.vb" id="Snippet1"::: @@ -8206,7 +8206,7 @@ The following console application prompts the users to enter one or more adjecti @@ -8285,7 +8285,7 @@ Compare this method to the method. This method does not return a Boolean value. If you call the method because you want a Boolean value that indicates whether a particular string is interned, you can use code such as the following. -:::code language="csharp" source="~/snippets/csharp/System/String/IsInterned/isinternedex1.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/IsInterned/isinternedex1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/IsInterned/isinternedex1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/IsInterned/isinternedex1.vb" id="Snippet1"::: @@ -8295,7 +8295,7 @@ This method does not return a Boolean value. If you call the method because you ## Examples The following example demonstrates that literal strings are interned automatically by the compiler. -:::code language="csharp" source="~/snippets/csharp/System/String/IsInterned/isin.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/IsInterned/isin.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/IsInterned/isin.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/IsInterned/isin.vb" id="Snippet1"::: @@ -8320,7 +8320,7 @@ The following example demonstrates that literal strings are interned automatical ## Examples The following example determines whether a string is successfully normalized to various normalization forms. -:::code language="csharp" source="~/snippets/csharp/System/String/IsNormalized/norm.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/IsNormalized/norm.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/IsNormalized/norm.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/IsNormalized/norm.vb" id="Snippet1"::: @@ -8518,7 +8518,7 @@ For a description of supported Unicode normalization forms, see @@ -8594,7 +8594,7 @@ White-space characters are defined by the Unicode standard. The method. -:::code language="csharp" source="~/snippets/csharp/System/String/IsNullOrWhiteSpace/isnullorwhitespace1.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/IsNullOrWhiteSpace/isnullorwhitespace1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/IsNullOrWhiteSpace/isnullorwhitespace1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/IsNullOrWhiteSpace/isnullorwhitespace1.vb" id="Snippet1"::: @@ -8914,14 +8914,14 @@ If `separator` is `null`, an empty string ( is a convenience method that lets you concatenate each element in an `IEnumerable(Of String)` collection without first converting the elements to a string array. It is particularly useful with Language-Integrated Query (LINQ) query expressions. The following example passes a `List(Of String)` object that contains either the uppercase or lowercase letters of the alphabet to a lambda expression that selects letters that are equal to or greater than a particular letter (which, in the example, is "M"). The `IEnumerable(Of String)` collection returned by the method is passed to the method to display the result as a single string. -:::code language="csharp" source="~/snippets/csharp/System/String/Join/join4.cs" interactive="try-dotnet" id="Snippet4"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Join/join4.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Join/join4.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Join/join4.vb" id="Snippet4"::: ## Examples The following example uses the Sieve of Eratosthenes algorithm to calculate the prime numbers that are less than or equal to 100. It assigns the result to a object of type , which it then passes to the method. -:::code language="csharp" source="~/snippets/csharp/System/String/Join/join3.cs" interactive="try-dotnet" id="Snippet3"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Join/join3.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Join/join3.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Join/join3.vb" id="Snippet3"::: @@ -9023,7 +9023,7 @@ If `separator` is `null` or if any element of `values` other than the first elem ## Examples The following example uses the Sieve of Eratosthenes algorithm to calculate the prime numbers that are less than or equal to 100. It assigns the result to a integer array, which it then passes to the method. -:::code language="csharp" source="~/snippets/csharp/System/String/Join/join1.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Join/join1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Join/join1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Join/join1.vb" id="Snippet1"::: @@ -9035,7 +9035,7 @@ The following example uses the Sieve of Eratosthenes algorithm to calculate the .NET Framework only: If the first element of is , the method does not concatenate the elements in but instead returns . A number of workarounds for this issue are available. The easiest is to assign a value of to the first element of the array, as the following example shows. -:::code language="csharp" source="~/snippets/csharp/System/String/Join/joinfix1.cs" interactive="try-dotnet-method" id="Snippet6"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Join/joinfix1.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Join/joinfix1.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Join/joinfix1.vb" id="Snippet6"::: @@ -9241,7 +9241,7 @@ If `separator` is `null`, an empty string ( method. -:::code language="csharp" source="~/snippets/csharp/System/String/Join/stringjoin.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Join/stringjoin.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Join/stringjoin.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Join/stringjoin.vb" id="Snippet1"::: @@ -9408,7 +9408,7 @@ If `separator` is `null`, an empty string ( object that contains a number of `Animal` objects. The extension method is called to extract the `Animal` objects whose `Order` property equals "Rodent". The result is passed to the method. -:::code language="csharp" source="~/snippets/csharp/System/String/Join/join5.cs" interactive="try-dotnet" id="Snippet5"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Join/join5.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Join/join5.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Join/join5.vb" id="Snippet5"::: ## Examples The following example uses the Sieve of Eratosthenes algorithm to calculate the prime numbers that are less than or equal to 100. It assigns the result to a object of type integer, which it then passes to the method. -:::code language="csharp" source="~/snippets/csharp/System/String/Join/join6.cs" interactive="try-dotnet" id="Snippet2"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Join/join6.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Join/join6.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Join/join6.vb" id="Snippet1"::: @@ -10503,7 +10503,7 @@ This method performs an ordinal (culture-insensitive) search, where a character ## Examples The following example finds the index of the last occurrence of any character in the string "is" within another string. -:::code language="csharp" source="~/snippets/csharp/System/String/LastIndexOfAny/lastixany1.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/LastIndexOfAny/lastixany1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/LastIndexOfAny/lastixany1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/LastIndexOfAny/lastixany1.vb" id="Snippet1"::: @@ -10580,7 +10580,7 @@ This method performs an ordinal (culture-insensitive) search, where a character ## Examples The following example finds the index of the last occurrence of any character in the string "is" within a substring of another string. -:::code language="csharp" source="~/snippets/csharp/System/String/LastIndexOfAny/lastixany2.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/LastIndexOfAny/lastixany2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/LastIndexOfAny/lastixany2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/LastIndexOfAny/lastixany2.vb" id="Snippet1"::: @@ -10666,7 +10666,7 @@ This method performs an ordinal (culture-insensitive) search, where a character ## Examples The following example finds the index of the last occurrence of any character in the string "aid" within a substring of another string. -:::code language="csharp" source="~/snippets/csharp/System/String/LastIndexOfAny/lastixany3.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/LastIndexOfAny/lastixany3.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/LastIndexOfAny/lastixany3.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/LastIndexOfAny/lastixany3.vb" id="Snippet1"::: @@ -10743,14 +10743,14 @@ The property returns the number of property returns 7, which indicates that it includes the six alphabetic characters as well as the null character. -:::code language="csharp" source="~/snippets/csharp/System/String/Overview/System.String.Class.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Overview/System.String.Class.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Overview/System.String.Class.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Length/System.String.Class.vb" id="Snippet1"::: ## Examples The following example demonstrates the property. -:::code language="csharp" source="~/snippets/csharp/System/String/Length/length.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Length/length.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Length/length.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Length/length.vb" id="Snippet1"::: @@ -10773,7 +10773,7 @@ The following example demonstrates the property. ## Examples The following example normalizes a string to each of four normalization forms, confirms the string was normalized to the specified normalization form, then lists the code points in the normalized string. -:::code language="csharp" source="~/snippets/csharp/System/String/IsNormalized/norm.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/IsNormalized/norm.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/IsNormalized/norm.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/IsNormalized/norm.vb" id="Snippet1"::: @@ -11000,7 +11000,7 @@ The method defines the operation of the equa ## Examples The following example demonstrates the equality operator. -:::code language="csharp" source="~/snippets/csharp/System/String/op_Equality/equalityop.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/op_Equality/equalityop.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/op_Equality/equalityop.fs" id="Snippet1"::: ]]> @@ -11124,7 +11124,7 @@ The operator in turn calls the static @@ -11204,7 +11204,7 @@ The method pads the beginning of the ## Examples The following example demonstrates the method. -:::code language="csharp" source="~/snippets/csharp/System/String/PadLeft/source.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/PadLeft/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/PadLeft/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/PadLeft/source.vb" id="Snippet1"::: @@ -11277,7 +11277,7 @@ The method pads the beg ## Examples The following example demonstrates the method. -:::code language="csharp" source="~/snippets/csharp/System/String/PadLeft/source1.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/PadLeft/source1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/PadLeft/source1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/PadLeft/source1.vb" id="Snippet1"::: @@ -11364,7 +11364,7 @@ The method pads the end of the retur ## Examples The following example demonstrates the method. -:::code language="csharp" source="~/snippets/csharp/System/String/PadRight/source.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/PadRight/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/PadRight/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/PadRight/source.vb" id="Snippet1"::: @@ -11437,7 +11437,7 @@ The method pads the en ## Examples The following example demonstrates the method. -:::code language="csharp" source="~/snippets/csharp/System/String/PadRight/source1.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/PadRight/source1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/PadRight/source1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/PadRight/source1.vb" id="Snippet1"::: @@ -11521,7 +11521,7 @@ In the .NET Framework, strings are zero-based. The value of the `startIndex` par ## Examples The following example demonstrates the method. The next-to-last case removes all text starting from the specified index through the end of the string. The last case removes three characters starting from the specified index. -:::code language="csharp" source="~/snippets/csharp/System/String/Remove/r.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Remove/r.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Remove/r.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Remove/r.vb" id="Snippet1"::: @@ -11609,7 +11609,7 @@ In the .NET Framework, strings are zero-based. The value of the `startIndex` par ## Examples The following example demonstrates how you can remove the middle name from a complete name. -:::code language="csharp" source="~/snippets/csharp/System/String/Remove/stringremove.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Remove/stringremove.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Remove/stringremove.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Remove/stringremove.vb" id="Snippet1"::: @@ -11708,14 +11708,14 @@ This method performs an ordinal (case-sensitive and culture-insensitive) search Because this method returns the modified string, you can chain together successive calls to the method to perform multiple replacements on the original string. Method calls are executed from left to right. The following example provides an illustration. -:::code language="csharp" source="~/snippets/csharp/System/String/Replace/replace2.cs" interactive="try-dotnet-method" id="Snippet2"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Replace/replace2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Replace/replace2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Replace/replace2.vb" id="Snippet2"::: ## Examples The following example creates a comma separated value list by substituting commas for the blanks between a series of numbers. -:::code language="csharp" source="~/snippets/csharp/System/String/Replace/string.replace1.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Replace/string.replace1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Replace/string.replace1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Replace/string.replace1.vb" id="Snippet1"::: @@ -11810,14 +11810,14 @@ This method performs an ordinal (case-sensitive and culture-insensitive) search Because this method returns the modified string, you can chain together successive calls to the method to perform multiple replacements on the original string. Method calls are executed from left to right. The following example provides an illustration. -:::code language="csharp" source="~/snippets/csharp/System/String/Replace/replace1.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Replace/replace1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Replace/replace1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Replace/replace1.vb" id="Snippet1"::: ## Examples The following example demonstrates how you can use the method to correct a spelling error. -:::code language="csharp" source="~/snippets/csharp/System/String/Replace/stringreplace.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Replace/stringreplace.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Replace/stringreplace.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Replace/stringreplace.vb" id="Snippet1"::: @@ -12115,13 +12115,13 @@ Overloads of the method allow you to limit the num The following examples show three different overloads of `String.Split()`. The first example calls the overload and passes in a single delimiter. -:::code language="csharp" source="~/snippets/csharp/System/String/Split/intro.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Split/intro.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Split/intro.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/system/string.split/intro.vb" id="Snippet1"::: As you can see, the period characters (`.`) are included in two of the substrings. If you want to exclude the period characters, you can add the period character as an additional delimiting character. The next example shows how to do this. -:::code language="csharp" source="~/snippets/csharp/System/String/Split/intro.cs" interactive="try-dotnet-method" id="Snippet2"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Split/intro.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Split/intro.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/system/string.split/intro.vb" id="Snippet2"::: @@ -12129,7 +12129,7 @@ The periods are gone from the substrings, but now two extra empty substrings hav overload and specify for the `options` parameter. -:::code language="csharp" source="~/snippets/csharp/System/String/Split/intro.cs" interactive="try-dotnet-method" id="Snippet3"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Split/intro.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Split/intro.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/system/string.split/intro.vb" id="Snippet3"::: @@ -12235,7 +12235,7 @@ If the `separator` argument is `null` or contains no characters, the method trea Although the single parameter for this overload of is a character array, you can call it with a single character, as the following example shows. -:::code language="csharp" source="~/snippets/csharp/System/String/Split/compiler-resolution.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Split/compiler-resolution.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Split/compiler-resolution.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/system/string.split/compiler-resolution.vb" id="Snippet12"::: @@ -12259,7 +12259,7 @@ In addition, if the same set of characters is used to split strings in multiple The following example demonstrates how to extract individual words from a block of text by treating the space character (` `) and tab character (`\t`) as delimiters. The string being split includes both of these characters. -:::code language="csharp" source="~/snippets/csharp/System/String/Split/basic.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Split/basic.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Split/basic.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/system/string.split/basic.vb" id="Snippet1"::: @@ -12465,7 +12465,7 @@ In addition, if the same set of characters is used to split strings in multiple ## Examples The following example demonstrates how `count` can be used to limit the number of strings returned by . -:::code language="csharp" source="~/snippets/csharp/System/String/Split/limit.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Split/limit.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Split/limit.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/system/string.split/limit.vb" id="Snippet1"::: @@ -12578,7 +12578,7 @@ If the `separator` parameter is `null` or contains no characters, white-space ch To pass `null` for the `char[] separator` parameter, you must indicate the type of the `null` to disambiguate the call from some other overloads, such as . The following example shows several ways to unambiguously identify this overload. -:::code language="csharp" source="~/snippets/csharp/System/String/Split/identify.cs" interactive="try-dotnet-method" id="Snippet5"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Split/identify.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Split/identify.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/system/string.split/identify.vb" id="Snippet5"::: @@ -12597,7 +12597,7 @@ In addition, if the same set of characters is used to split strings in multiple ## Examples The following example uses the enumeration to include or exclude substrings generated by the method. -:::code language="csharp" source="~/snippets/csharp/System/String/Split/options.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Split/options.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Split/options.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/system/string.split/omit.vb" id="Snippet1"::: @@ -12753,7 +12753,7 @@ If the `separator` parameter is `null` or contains no non-empty strings, white-s To pass `null` for the `string[] separator` parameter, you must indicate the type of the `null` to disambiguate the call from some other overloads, such as . The following example shows several ways to unambiguously identify this overload. -:::code language="csharp" source="~/snippets/csharp/System/String/Split/identify.cs" interactive="try-dotnet-method" id="Snippet6"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Split/identify.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Split/identify.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/system/string.split/identify.vb" id="Snippet6"::: @@ -12781,13 +12781,13 @@ In addition, if the same set of characters is used to split strings in multiple The following example illustrates the difference in the arrays returned by calling a string's method with its `options` parameter equal to and . -:::code language="csharp" source="~/snippets/csharp/System/String/Split/options.cs" interactive="try-dotnet-method" id="Snippet2"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Split/options.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Split/options.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/system/string.split/options.vb" id="Snippet1"::: The following example defines an array of separators that include punctuation and white-space characters. Passing this array along with a value of to the method returns an array that consists of the individual words from the string. -:::code language="csharp" source="~/snippets/csharp/System/String/Split/options.cs" interactive="try-dotnet-method" id="Snippet3"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Split/options.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Split/options.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/system/string.split/options.vb" id="Snippet7"::: @@ -12927,7 +12927,7 @@ If the `separator` parameter is `null` or contains no characters, white-space ch To pass `null` for the `char[] separator` parameter, you must indicate the type of the `null` to disambiguate the call from some other overloads, such as . The following example shows several ways to unambiguously identify this overload. -:::code language="csharp" source="~/snippets/csharp/System/String/Split/identify.cs" interactive="try-dotnet-method" id="Snippet3"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Split/identify.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Split/identify.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/system/string.split/identify.vb" id="Snippet3"::: @@ -12950,7 +12950,7 @@ In addition, if the same set of characters is used to split strings in multiple The following example uses the enumeration to include or exclude substrings generated by the method. -:::code language="csharp" source="~/snippets/csharp/System/String/Split/options.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Split/options.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Split/options.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/system/string.split/omit.vb" id="Snippet1"::: @@ -13100,7 +13100,7 @@ If the `separator` parameter is `null` or contains no characters, white-space ch To pass `null` for the `string[] separator` parameter, you must indicate the type of the `null` to disambiguate the call from some other overloads, such as . The following example shows several ways to unambiguously identify this overload. -:::code language="csharp" source="~/snippets/csharp/System/String/Split/identify.cs" interactive="try-dotnet-method" id="Snippet4"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Split/identify.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Split/identify.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/system/string.split/identify.vb" id="Snippet4"::: @@ -13140,7 +13140,7 @@ In addition, if the same set of characters is used to split strings in multiple The following example uses the enumeration to include or exclude substrings generated by the method. -:::code language="csharp" source="~/snippets/csharp/System/String/Split/options.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Split/options.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Split/options.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/system/string.split/omit.vb" id="Snippet1"::: @@ -13270,7 +13270,7 @@ This method performs a word (case-sensitive and culture-sensitive) comparison us The following example defines a `StripStartTags` method that uses the method to remove HTML start tags from the beginning of a string. Note that the `StripStartTags` method is called recursively to ensure that multiple HTML start tags at the beginning of the line are removed. The example does not remove HTML tags embedded in a string. -:::code language="csharp" source="~/snippets/csharp/System/String/StartsWith/stringstartswith.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/StartsWith/stringstartswith.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/StartsWith/stringstartswith.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/StartsWith/stringstartswith.vb" id="Snippet1"::: @@ -13351,7 +13351,7 @@ The method compares the `value` parameter to ## Examples The following example searches for the string "the" at the beginning of a longer string that begins with the word "The". As the output from the example shows, a call to the method that performs a culture-insensitive but case-sensitive comparison fails to match the string, while a call that performs a culture- and case-insensitive comparison matches the string. -:::code language="csharp" source="~/snippets/csharp/System/String/StartsWith/StartsWith2.cs" interactive="try-dotnet" id="Snippet2"::: +:::code language="csharp" source="~/snippets/csharp/System/String/StartsWith/StartsWith2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/StartsWith/StartsWith2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/String/StartsWith/StartsWith2.vb" id="Snippet2"::: @@ -13528,13 +13528,13 @@ If `startIndex` is equal to zero, the method returns the original string unchang ## Examples The following example demonstrates obtaining a substring from a string. -:::code language="csharp" source="~/snippets/csharp/System/String/Substring/Substring10.cs" interactive="try-dotnet-method" id="Snippet10"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Substring/Substring10.cs" id="Snippet10"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Substring/Substring10.fs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Substring/Substring10.vb" id="Snippet10"::: The following example uses the method to separate key/value pairs that are delimited by an equals (`=`) character. -:::code language="csharp" source="~/snippets/csharp/System/String/Substring/Substring1.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Substring/Substring1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Substring/Substring1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Substring/Substring1.vb" id="Snippet1"::: @@ -13629,13 +13629,13 @@ If the substring should extend from `startIndex` to a specified character sequen - If you've searched for a single character that is to mark the end of the substring, the `length` parameter equals `endIndex` - `startIndex` + 1, where `endIndex` is the return value of the or method. The following example extracts a continuous block of "b" characters from a string. - :::code language="csharp" source="~/snippets/csharp/System/String/Substring/Substring2.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/String/Substring/Substring2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Substring/Substring2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Substring/Substring2.vb" id="Snippet2"::: - If you've searched for multiple characters that are to mark the end of the substring, the `length` parameter equals `endIndex` + `endMatchLength` - `startIndex`, where `endIndex` is the return value of the or method, and `endMatchLength` is the length of the character sequence that marks the end of the substring. The following example extracts a block of text that contains an XML `` element. - :::code language="csharp" source="~/snippets/csharp/System/String/Substring/Substring3.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/String/Substring/Substring3.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Substring/Substring3.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Substring/Substring3.vb" id="Snippet3"::: @@ -13646,7 +13646,7 @@ If `startIndex` is equal to zero and `length` equals the length of the current s ## Examples The following example illustrates a simple call to the method that extracts two characters from a string starting at the sixth character position (that is, at index five). -:::code language="csharp" source="~/snippets/csharp/System/String/Substring/Substring4.cs" interactive="try-dotnet-method" id="Snippet4"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Substring/Substring4.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Substring/Substring4.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Substring/Substring4.vb" id="Snippet4"::: @@ -13658,13 +13658,13 @@ The following example uses the exception. -:::code language="csharp" source="~/snippets/csharp/System/String/Substring/source.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Substring/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Substring/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Substring/source.vb" id="Snippet1"::: The following example uses the method to separate key/value pairs that are delimited by an equals (`=`) character. -:::code language="csharp" source="~/snippets/csharp/System/String/Substring/Substring1.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Substring/Substring1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Substring/Substring1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Substring/Substring1.vb" id="Snippet1"::: @@ -13893,7 +13893,7 @@ The following example uses the method with an The following example displays the enumerated constant for the type. -:::code language="csharp" source="~/snippets/csharp/System/String/GetTypeCode/gtc.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/GetTypeCode/gtc.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/GetTypeCode/gtc.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/GetTypeCode/gtc.vb" id="Snippet1"::: @@ -15168,7 +15168,7 @@ For more information, see [Character Encoding in .NET](/dotnet/standard/base-typ ## Examples The following example calls the method to extract the characters in a string to a character array. It then displays the original string and the elements in the array. -:::code language="csharp" source="~/snippets/csharp/System/String/ToCharArray/ToCharArray1.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/ToCharArray/ToCharArray1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/ToCharArray/ToCharArray1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/ToCharArray/ToCharArray1.vb" id="Snippet1"::: @@ -15257,7 +15257,7 @@ For more information, see [Character Encoding in .NET](/dotnet/standard/base-typ ## Examples The following example converts a substring within a string to an array of characters, then enumerates and displays the elements of the array. -:::code language="csharp" source="~/snippets/csharp/System/String/ToCharArray/tocharry1.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/ToCharArray/tocharry1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/ToCharArray/tocharry1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/ToCharArray/tocharry1.vb" id="Snippet1"::: @@ -15348,7 +15348,7 @@ The casing operation that results from calling the @@ -15435,7 +15435,7 @@ If you pass the m @@ -15508,7 +15508,7 @@ If you need the lowercase or uppercase version of an operating system identifier ## Examples The following example defines a string array that contains a single word in a number of languages. The method is used to populate the elements of a parallel array with the case-insensitive version of each word. The method is used to sort the case-sensitive array based on the order of elements in the lowercase array to ensure that elements appear in the same order regardless of language. -:::code language="csharp" source="~/snippets/csharp/System/String/ToLowerInvariant/tolowerinvariant.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/ToLowerInvariant/tolowerinvariant.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/ToLowerInvariant/tolowerinvariant.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/ToLowerInvariant/tolowerinvariant.vb" id="Snippet1"::: @@ -15591,7 +15591,7 @@ Because this method simply returns the current string unchanged, there is no nee ## Examples The following example demonstrates the method.Note that the example does not explicitly call the method. Instead, the method is called implicitly by the [composite formatting](/dotnet/standard/base-types/composite-formatting) feature. -:::code language="csharp" source="~/snippets/csharp/System/String/ToString/string.tostring.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/ToString/string.tostring.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/ToString/string.tostring.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/ToString/string.tostring.vb" id="Snippet1"::: @@ -15832,7 +15832,7 @@ If you pass the m @@ -16142,7 +16142,7 @@ If `trimChars` is `null` or an empty array, this method removes any leading or t The following example uses the `Trim(System.Char[])` method to remove space, asterisk (*), and apostrophe (') characters from a string. -:::code language="csharp" source="~/snippets/csharp/System/String/Trim/Trim1.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/Trim/Trim1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Trim/Trim1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/Trim/Trim1.vb" id="Snippet1"::: @@ -16334,7 +16334,7 @@ The `TrimEnd(System.Char[])` method removes from the current string all trailing The following example demonstrates how you can use the `TrimEnd(System.Char[])` method to trim white space or punctuation marks from the end of a string. -:::code language="csharp" source="~/snippets/csharp/System/String/TrimEnd/sample2.cs" interactive="try-dotnet-method" id="Snippet2"::: +:::code language="csharp" source="~/snippets/csharp/System/String/TrimEnd/sample2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/TrimEnd/sample2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/String/TrimEnd/Sample2.vb" id="Snippet2"::: @@ -16526,7 +16526,7 @@ The `TrimStart(System.Char[])` method removes from the current string all leadin The following example demonstrates the basic functionality of the method: -:::code language="csharp" source="~/snippets/csharp/System/String/TrimStart/sample.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/String/TrimStart/sample.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/TrimStart/sample.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/String/TrimStart/sample.vb" id="Snippet1"::: diff --git a/xml/System/StringSplitOptions.xml b/xml/System/StringSplitOptions.xml index f9be3268c1b..81669f8d7c2 100644 --- a/xml/System/StringSplitOptions.xml +++ b/xml/System/StringSplitOptions.xml @@ -71,7 +71,7 @@ The `TrimEntries` field is only available in .NET 5 and later versions. The following example shows how the `StringSplitOptions` enumeration is used to include or exclude substrings generated by the method: - :::code language="csharp" source="~/snippets/csharp/System/String/Split/options.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/String/Split/options.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/Split/options.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/system/string.split/omit.vb" id="Snippet1"::: diff --git a/xml/System/TimeSpan.xml b/xml/System/TimeSpan.xml index 7c7995c5be9..45c9e8c970b 100644 --- a/xml/System/TimeSpan.xml +++ b/xml/System/TimeSpan.xml @@ -121,7 +121,7 @@ object that represents the difference between two dates. It then displays the object's properties. -:::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Overview/structure1.cs" interactive="try-dotnet-method" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Overview/structure1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/Overview/structure1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/Overview/structure1.vb" id="Snippet1"::: :::code language="powershell" source="~/snippets/powershell/VS_Snippets_CLR_System/system.timespan.class/ps/structure1.ps1"::: @@ -198,7 +198,7 @@ The following example instantiates a object that represen ## Examples The following example creates several objects using the constructor overload that initializes a to a specified number of ticks. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/.ctor/ctorl.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/.ctor/ctorl.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/.ctor/ctorl.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/.ctor/ctorl.vb" id="Snippet1"::: @@ -270,7 +270,7 @@ The following example instantiates a object that represen ## Examples The following example creates several objects using the constructor overload that initializes a to a specified number of hours, minutes, and seconds. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/.ctor/ctoriii.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/.ctor/ctoriii.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/.ctor/ctoriii.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/.ctor/ctoriii.vb" id="Snippet2"::: @@ -339,7 +339,7 @@ The following example instantiates a object that represen ## Examples The following example creates several objects using the constructor overload that initializes a to a specified number of days, hours, minutes, and seconds. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/.ctor/ctoriiii.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/.ctor/ctoriiii.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/.ctor/ctoriiii.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/.ctor/ctoriiii.vb" id="Snippet3"::: @@ -410,7 +410,7 @@ The following example instantiates a object that represen ## Examples The following example creates several objects using the constructor overload that initializes a to a specified number of days, hours, minutes, seconds, and milliseconds. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/.ctor/ctoriiiii.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/.ctor/ctoriiiii.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/.ctor/ctoriiiii.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/.ctor/ctoriiiii.vb" id="Snippet4"::: @@ -528,7 +528,7 @@ The specified `days`, `hours`, `minutes`, `seconds`, `milliseconds`, and `micros ## Examples The following example calls the method to add each element in an array of time intervals to a base value. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Add/add1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Add/add1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/Add/add1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/Add/add1.vb" id="Snippet1"::: @@ -610,7 +610,7 @@ The specified `days`, `hours`, `minutes`, `seconds`, `milliseconds`, and `micros ## Examples The following example uses the method to compare several objects with a object whose value is a 2-hour time interval. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Compare/compare1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Compare/compare1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/Compare/compare1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/Compare/compare1.vb" id="Snippet1"::: @@ -721,7 +721,7 @@ The specified `days`, `hours`, `minutes`, `seconds`, `milliseconds`, and `micros ## Examples The following example compares several structures and other objects to a reference structure using the method. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/CompareTo/cto_eq_obj.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/CompareTo/cto_eq_obj.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/CompareTo/cto_eq_obj.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/CompareTo/cto_eq_obj.vb" id="Snippet1"::: @@ -874,7 +874,7 @@ The specified `days`, `hours`, `minutes`, `seconds`, `milliseconds`, and `micros ## Examples The following example creates several objects and displays the property of each. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Days/properties.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Days/properties.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/Days/properties.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/Days/properties.vb" id="Snippet1"::: @@ -1017,7 +1017,7 @@ The specified `days`, `hours`, `minutes`, `seconds`, `milliseconds`, and `micros ## Examples The following example applies the method to several objects. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Duration/dura_nega_una.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Duration/dura_nega_una.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/Duration/dura_nega_una.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/Duration/dura_nega_una.vb" id="Snippet1"::: @@ -1309,7 +1309,7 @@ The specified `days`, `hours`, `minutes`, `seconds`, `milliseconds`, and `micros ## Examples The following example creates several objects using the method. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/FromDays/fromdays.cs" interactive="try-dotnet" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/FromDays/fromdays.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/FromDays/fromdays.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/FromDays/fromdays.vb" id="Snippet6"::: @@ -1471,7 +1471,7 @@ The specified `days`, `hours`, `minutes`, `seconds`, `milliseconds`, and `micros ## Examples The following example creates several objects using the method. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/FromDays/fromhours.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/FromDays/fromhours.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/FromDays/fromhours.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/FromDays/fromhours.vb" id="Snippet5"::: @@ -1710,7 +1710,7 @@ The specified `days`, `hours`, `minutes`, `seconds`, `milliseconds`, and `micros ## Examples The following example creates several objects by using the method. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/FromDays/frommillisec.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/FromDays/frommillisec.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/FromDays/frommillisec.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/FromDays/frommillisec.vb" id="Snippet2"::: @@ -1868,7 +1868,7 @@ The specified `days`, `hours`, `minutes`, `seconds`, `milliseconds`, and `micros ## Examples The following example creates several objects using the method. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/FromDays/fromminutes.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/FromDays/fromminutes.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/FromDays/fromminutes.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/FromDays/fromminutes.vb" id="Snippet4"::: @@ -2026,7 +2026,7 @@ The specified `days`, `hours`, `minutes`, `seconds`, `milliseconds`, and `micros ## Examples The following example creates several objects using the method. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/FromDays/fromseconds.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/FromDays/fromseconds.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/FromDays/fromseconds.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/FromDays/fromseconds.vb" id="Snippet3"::: @@ -2184,7 +2184,7 @@ The specified `days`, `hours`, `minutes`, `seconds`, `milliseconds`, and `micros ## Examples The following example creates several objects using the method. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/FromDays/fromticks.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/FromDays/fromticks.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/FromDays/fromticks.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/FromDays/fromticks.vb" id="Snippet1"::: @@ -2315,7 +2315,7 @@ The specified `days`, `hours`, `minutes`, `seconds`, `milliseconds`, and `micros ## Examples The following example creates several objects and displays the property of each. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Days/properties.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Days/properties.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/Days/properties.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/Days/properties.vb" id="Snippet1"::: @@ -2409,7 +2409,7 @@ The specified `days`, `hours`, `minutes`, `seconds`, `milliseconds`, and `micros ## Examples The following example references and displays the value of the field. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/MaxValue/fields.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/MaxValue/fields.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/MaxValue/fields.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/MaxValue/fields.vb" id="Snippet1"::: @@ -2653,7 +2653,7 @@ The property represents whole microseconds, ## Examples The following example creates several objects and displays the property of each. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Days/properties.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Days/properties.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/Days/properties.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/Days/properties.vb" id="Snippet1"::: @@ -2834,7 +2834,7 @@ The property represents whole microseconds, ## Examples The following example creates several objects and displays the property of each. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Days/properties.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Days/properties.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/Days/properties.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/Days/properties.vb" id="Snippet1"::: @@ -2956,7 +2956,7 @@ The property represents whole microseconds, ## Examples The following example references and displays the value of the field. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/MaxValue/fields.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/MaxValue/fields.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/MaxValue/fields.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/MaxValue/fields.vb" id="Snippet1"::: @@ -3132,7 +3132,7 @@ The value of this constant is 100. ## Examples The following example applies the method to several objects. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Duration/dura_nega_una.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Duration/dura_nega_una.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/Duration/dura_nega_una.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/Duration/dura_nega_una.vb" id="Snippet1"::: @@ -3195,7 +3195,7 @@ The value of this constant is 100. ## Remarks The method defines the addition operator for values. It enables code such as the following: - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/op_Addition/operators1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/op_Addition/operators1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/op_Addition/operators1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/op_Addition/operators1.vb" id="Snippet1"::: @@ -3427,7 +3427,7 @@ The value of this constant is 100. ## Examples The following example compares several objects to a reference using the operator. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/op_Equality/relationalops.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/op_Equality/relationalops.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/op_Equality/relationalops.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/op_Equality/relationalops.vb" id="Snippet1"::: @@ -3872,7 +3872,7 @@ The value of this constant is 100. ## Examples The following example uses the subtraction operator to calculate the total length of the weekly work day. It also uses the addition operator to compute the total time of the daily breaks before using it in a subtraction operation to compute the total actual daily working time. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/op_Addition/Subtraction1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/op_Addition/Subtraction1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/op_Addition/Subtraction1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/op_Addition/Subtraction1.vb" id="Snippet2"::: @@ -4068,7 +4068,7 @@ The value of this constant is 100. method to convert each element in a string array to a 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. -:::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Parse/parse1.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Parse/parse1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/Parse/parse1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/Parse/parse1.vb" id="Snippet1"::: ]]> @@ -4213,7 +4213,7 @@ For more information about this API, see [Supplemental API remarks for System.Ti objects, and uses each object in calls to the method to parse the elements in a string array. The example illustrates how the conventions of a specific culture influence the formatting operation. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Parse/parse2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Parse/parse2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/Parse/parse2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/Parse/parse2.vb" id="Snippet2"::: ]]> @@ -4333,7 +4333,7 @@ The following example defines an array of method to parse several string representations of time intervals using various format strings and cultures. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/ParseExact/parseexactexample1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/ParseExact/parseexactexample1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/ParseExact/parseexactexample1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/ParseExact/parseexactexample1.vb" id="Snippet1"::: @@ -4444,7 +4444,7 @@ The following example defines an array of method to parse several string representations of time intervals using various format strings and cultures. It also uses the value to interpret each string as a negative time interval. The output from the example illustrates that the style affects the return value only when it is used with custom format strings. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/ParseExact/parseexactexample2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/ParseExact/parseexactexample2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/ParseExact/parseexactexample2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/ParseExact/parseexactexample2.vb" id="Snippet2"::: @@ -4797,7 +4797,7 @@ The following example defines an array of flag specified in the method call is used only when parsing a string with this format specifier. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/ParseExact/parseexactexample4.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/ParseExact/parseexactexample4.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/ParseExact/parseexactexample4.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/ParseExact/parseexactexample4.vb" id="Snippet4"::: @@ -5031,7 +5031,7 @@ The following example defines an array of method to calculate the difference between a single value and each of the time intervals in an array. Note that, because format strings do not include negative signs in the result string, the example uses conditional logic to include a negative sign with negative time intervals. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Subtract/subtract1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Subtract/subtract1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/Subtract/subtract1.fs" id="Snippet1"::: ]]> @@ -5140,7 +5140,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example creates several objects and displays the property of each. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Days/properties.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/Days/properties.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/Days/properties.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/Days/properties.vb" id="Snippet1"::: @@ -5207,7 +5207,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example references and displays the value of the field. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/MaxValue/fields.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/MaxValue/fields.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/MaxValue/fields.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/MaxValue/fields.vb" id="Snippet1"::: @@ -5377,7 +5377,7 @@ The value of this constant is 10. ## Examples The following example references and displays the value of the field. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/MaxValue/fields.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/MaxValue/fields.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/MaxValue/fields.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/MaxValue/fields.vb" id="Snippet1"::: @@ -5509,7 +5509,7 @@ The value of this constant is 10. ## Examples The following example references and displays the value of the field. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/MaxValue/fields.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/MaxValue/fields.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/MaxValue/fields.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/MaxValue/fields.vb" id="Snippet1"::: @@ -5601,7 +5601,7 @@ The value of this constant is 10. ## Examples The following example displays the strings returned by calling the method with a number of values. Note that although the example does not call the method directly, it is called by the method when it attempts to convert a value to its string representation. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/ToString/ToString1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/ToString/ToString1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/ToString/ToString1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/ToString/ToString1.vb" id="Snippet1"::: @@ -5693,7 +5693,7 @@ The value of this constant is 10. ## Examples The following example uses standard and custom format strings to display the string representation of each element in an array of values - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/ToString/tostring3.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/ToString/tostring3.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/ToString/tostring3.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/ToString/tostring3.vb" id="Snippet3"::: @@ -5791,7 +5791,7 @@ The value of this constant is 10. ## Examples The following example calls the method to format two time intervals. The example calls the method twice for each format string, first to display it using the conventions of the en-US culture and then to display it using the conventions of the fr-FR culture. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/ToString/tostring4.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/ToString/tostring4.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/ToString/tostring4.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/ToString/tostring4.vb" id="Snippet4"::: @@ -5857,7 +5857,7 @@ The value of this constant is 10. ## Examples The following example instantiates a object and displays the value of its property. It also displays the value of each component (hours, minutes, seconds, milliseconds) that forms the fractional part of the value of its property. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/TotalDays/totaldays.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/TotalDays/totaldays.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/TotalDays/totaldays.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/TotalDays/totaldays.vb" id="Snippet1"::: @@ -5925,7 +5925,7 @@ The value of this constant is 10. ## Examples The following example instantiates a object and displays the value its property. It also displays the value of each component (hours, minutes, seconds, and milliseconds) that forms the fractional part of the value of its property. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/TotalHours/totalhours.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/TotalHours/totalhours.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/TotalHours/totalhours.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/TotalHours/totalhours.vb" id="Snippet1"::: @@ -6035,7 +6035,7 @@ The property represents whole and fract ## Examples The following example instantiates a object and displays the value of its property. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/TotalMilliseconds/totalmilliseconds.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/TotalMilliseconds/totalmilliseconds.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/TotalMilliseconds/totalmilliseconds.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/TotalMilliseconds/totalmilliseconds.vb" id="Snippet1"::: @@ -6103,7 +6103,7 @@ The property represents whole and fract ## Examples The following example instantiates a object and displays the value of its property. It also displays the value of each component (seconds, milliseconds) that forms the fractional part of the value of its property. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/TotalMinutes/totalminutes.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/TotalMinutes/totalminutes.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/TotalMinutes/totalminutes.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/TotalMinutes/totalminutes.vb" id="Snippet1"::: @@ -6219,7 +6219,7 @@ The property represents whole and fracti ## Examples The following example instantiates a object and displays the value of its property. It also displays the value of its milliseconds component, which forms the fractional part of the value of its property. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/TotalSeconds/totalseconds.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/TotalSeconds/totalseconds.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/TotalSeconds/totalseconds.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/TotalSeconds/totalseconds.vb" id="Snippet1"::: @@ -6472,7 +6472,7 @@ The property represents whole and fracti method to create objects from valid strings and to indicate when the parse operation has failed because the time span string is invalid. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/TryParse/TryParse1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/TryParse/TryParse1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/TryParse/TryParse1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/TryParse/TryParse1.vb" id="Snippet1"::: ]]> @@ -6595,7 +6595,7 @@ The following example uses the method to crea objects, and uses each object in calls to the method to parse the elements in a string array. The example illustrates how the conventions of a specific culture influence the formatting operation. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/TryParse/tryparse2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/TryParse/tryparse2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/TryParse/tryparse2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/TryParse/tryparse2.vb" id="Snippet2"::: ]]> @@ -6840,7 +6840,7 @@ The following example defines an array of method to parse several string representations of time intervals using various format strings and cultures. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/TryParseExact/tryparseexactexample1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/TryParseExact/tryparseexactexample1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/TryParseExact/tryparseexactexample1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/TryParseExact/tryparseexactexample1.vb" id="Snippet1"::: @@ -6949,7 +6949,7 @@ The following example defines an array of method to parse several string representations of time intervals using various format strings and cultures. It also uses the value to interpret each string as a negative time interval. The output from the example illustrates that the style affects the return value only when it is used with custom format strings. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/TryParseExact/tryparseexactexample2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/TryParseExact/tryparseexactexample2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/TryParseExact/tryparseexactexample2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/TryParseExact/tryparseexactexample2.vb" id="Snippet2"::: @@ -7301,7 +7301,7 @@ The following example defines an array of flag specified in the method call is used only when parsing a string with this format specifier. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/TryParseExact/tryparseexactexample4.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/TryParseExact/tryparseexactexample4.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/TryParseExact/tryparseexactexample4.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/TryParseExact/tryparseexactexample4.vb" id="Snippet4"::: @@ -7363,7 +7363,7 @@ The following example defines an array of field. - :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/MaxValue/fields.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeSpan/MaxValue/fields.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeSpan/MaxValue/fields.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeSpan/MaxValue/fields.vb" id="Snippet1"::: diff --git a/xml/System/TimeZoneInfo.xml b/xml/System/TimeZoneInfo.xml index 69dbd854d6b..47e074aee15 100644 --- a/xml/System/TimeZoneInfo.xml +++ b/xml/System/TimeZoneInfo.xml @@ -1461,7 +1461,7 @@ ## Examples The following example creates a custom time zone for the Palmer station and Anvers Island in Antarctica. It sets the `disableDaylightSavingTime` parameter in the call to the method to `true`. It then displays the new time zone's daylight saving time name, if one is present, and the number of adjustment rules to confirm that the new time zone has no daylight saving time information. - :::code language="csharp" source="~/snippets/csharp/System/TimeZoneInfo/CreateCustomTimeZone/System.TimeZone2.CreateTimeZone.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/TimeZoneInfo/CreateCustomTimeZone/System.TimeZone2.CreateTimeZone.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/TimeZoneInfo/CreateCustomTimeZone/System.TimeZone2.CreateTimeZone.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/TimeZoneInfo/CreateCustomTimeZone/System.TimeZone2.CreateTimeZone.vb" id="Snippet3"::: diff --git a/xml/System/Tuple.xml b/xml/System/Tuple.xml index 4660a155279..3fd0b6883d3 100644 --- a/xml/System/Tuple.xml +++ b/xml/System/Tuple.xml @@ -72,13 +72,13 @@ Although you can create an instance of a tuple class by calling its class constructor, the code to do so can be cumbersome. The following example uses a class constructor to create a 7-tuple or septuple that contains population data for New York City for each census from 1950 through 2000. - :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/example1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/example1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Tuple/Overview/example1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Tuple/Overview/example1.vb" id="Snippet1"::: Creating the same tuple object by using a helper method is more straightforward, as the following example shows. - :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/example1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/example1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Tuple/Overview/example1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Tuple/Overview/example1.vb" id="Snippet2"::: @@ -92,7 +92,7 @@ ## Examples The following example creates an 8-tuple (octuple) that contains prime numbers that are less than 20. - :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/createntuple.cs" interactive="try-dotnet-method" id="Snippet17"::: + :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/createntuple.cs" id="Snippet17"::: :::code language="fsharp" source="~/snippets/fsharp/System/Tuple/Overview/createntuple.fs" id="Snippet17"::: :::code language="vb" source="~/snippets/visualbasic/System/Tuple/Overview/createntuple.vb" id="Snippet17"::: @@ -182,13 +182,13 @@ ## Remarks is a helper method that you can call to instantiate a 1-tuple object without having to explicitly specify the type of its component. The following example uses the method to instantiate a 1-tuple whose component is of type . - :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Tuple/Overview/create1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Tuple/Overview/create1.vb" id="Snippet1"::: This code is equivalent to the following call to the class constructor. - :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Tuple/Overview/create1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Tuple/Overview/create1.vb" id="Snippet2"::: @@ -269,13 +269,13 @@ ## Remarks is a helper method that you can call to instantiate a 2-tuple object without having to explicitly specify the types of its components. The following example uses the method to instantiate a 2-tuple. - :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Tuple/Overview/create1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Tuple/Overview/create1.vb" id="Snippet3"::: This code is equivalent to the following call to the class constructor. - :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Tuple/Overview/create1.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Tuple/Overview/create1.vb" id="Snippet4"::: @@ -367,13 +367,13 @@ ## Remarks is a helper method that you can call to instantiate a 3-tuple object without having to explicitly specify the types of its components. The following example uses the method to instantiate a 3-tuple. - :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Tuple/Overview/create1.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Tuple/Overview/create1.vb" id="Snippet5"::: This code is equivalent to the following call to the class constructor. - :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" interactive="try-dotnet-method" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/Tuple/Overview/create1.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Tuple/Overview/create1.vb" id="Snippet6"::: @@ -476,13 +476,13 @@ ## Remarks is a helper method that you can call to instantiate a 4-tuple object without having to explicitly specify the types of its components. The following example uses the method to instantiate a 4-tuple. - :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" interactive="try-dotnet-method" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/Tuple/Overview/create1.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/Tuple/Overview/create1.vb" id="Snippet7"::: This code is equivalent to the following call to the class constructor. - :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" interactive="try-dotnet-method" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" id="Snippet8"::: :::code language="fsharp" source="~/snippets/fsharp/System/Tuple/Overview/create1.fs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System/Tuple/Overview/create1.vb" id="Snippet8"::: @@ -596,13 +596,13 @@ ## Remarks is a helper method that you can call to instantiate a 5-tuple object without having to explicitly specify the types of its components. The following example uses the method to instantiate a 5-tuple. - :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" interactive="try-dotnet-method" id="Snippet9"::: + :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" id="Snippet9"::: :::code language="fsharp" source="~/snippets/fsharp/System/Tuple/Overview/create1.fs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System/Tuple/Overview/create1.vb" id="Snippet9"::: This code is equivalent to the following call to the class constructor. - :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" interactive="try-dotnet-method" id="Snippet10"::: + :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" id="Snippet10"::: :::code language="fsharp" source="~/snippets/fsharp/System/Tuple/Overview/create1.fs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System/Tuple/Overview/create1.vb" id="Snippet10"::: @@ -727,13 +727,13 @@ ## Remarks is a helper method that you can call to instantiate a 6-tuple object without having to explicitly specify the types of its components. The following example uses the method to instantiate a 6-tuple. - :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" interactive="try-dotnet-method" id="Snippet11"::: + :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" id="Snippet11"::: :::code language="fsharp" source="~/snippets/fsharp/System/Tuple/Overview/create1.fs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System/Tuple/Overview/create1.vb" id="Snippet11"::: This code is equivalent to the following call to the class constructor. - :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" interactive="try-dotnet-method" id="Snippet12"::: + :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" id="Snippet12"::: :::code language="fsharp" source="~/snippets/fsharp/System/Tuple/Overview/create1.fs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System/Tuple/Overview/create1.vb" id="Snippet12"::: @@ -869,13 +869,13 @@ ## Remarks is a helper method that you can call to instantiate a 7-tuple object without having to explicitly specify the types of its components. The following example uses the method to instantiate a 7-tuple. - :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" interactive="try-dotnet-method" id="Snippet13"::: + :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" id="Snippet13"::: :::code language="fsharp" source="~/snippets/fsharp/System/Tuple/Overview/create1.fs" id="Snippet13"::: :::code language="vb" source="~/snippets/visualbasic/System/Tuple/Overview/create1.vb" id="Snippet13"::: This code is equivalent to the following call to the class constructor. - :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" interactive="try-dotnet-method" id="Snippet14"::: + :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" id="Snippet14"::: :::code language="fsharp" source="~/snippets/fsharp/System/Tuple/Overview/create1.fs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/System/Tuple/Overview/create1.vb" id="Snippet14"::: @@ -1030,7 +1030,7 @@ ## Examples The following example creates an 8-tuple whose components are prime numbers that are less than 20. - :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/createntuple.cs" interactive="try-dotnet-method" id="Snippet17"::: + :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/createntuple.cs" id="Snippet17"::: :::code language="fsharp" source="~/snippets/fsharp/System/Tuple/Overview/createntuple.fs" id="Snippet17"::: :::code language="vb" source="~/snippets/visualbasic/System/Tuple/Overview/createntuple.vb" id="Snippet17"::: diff --git a/xml/System/Tuple`1.xml b/xml/System/Tuple`1.xml index 180192a4682..dfbcf0ad96a 100644 --- a/xml/System/Tuple`1.xml +++ b/xml/System/Tuple`1.xml @@ -526,7 +526,7 @@ ## Examples The following example defines an implementation that considers two floating-point values to be equal if they are approximately equal to each other (that is, if one value is within .01 percent of the other). - :::code language="csharp" source="~/snippets/csharp/System/TupleT1/Equals/equals2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/TupleT1/Equals/equals2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/TupleT1/Equals/equals2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/TupleT1/Equals/equals2.vb" id="Snippet2"::: diff --git a/xml/System/Tuple`2.xml b/xml/System/Tuple`2.xml index bf4c0e6e1fe..526efd36563 100644 --- a/xml/System/Tuple`2.xml +++ b/xml/System/Tuple`2.xml @@ -112,13 +112,13 @@ - To provide easy access to, and manipulation of, a data set. The following example defines an array of objects that contain the names of students and their corresponding test scores. It then iterates the array to calculate the mean test score. - :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2/Overview/example1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2/Overview/example1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TupleT1,T2/Overview/example1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TupleT1,T2/Overview/example1.vb" id="Snippet1"::: - To return multiple values from a method without the use of `out` parameters (in C#) or `ByRef` parameters (in Visual Basic). For example, the following example uses a object to return the quotient and the remainder that result from integer division. - :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2/Overview/item1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2/Overview/item1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TupleT1,T2/Overview/item1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TupleT1,T2/Overview/item1.vb" id="Snippet1"::: @@ -184,13 +184,13 @@ ## Remarks You can also use the static method to instantiate a 2-tuple object without having to explicitly specify the types of its components. The following example uses the method to instantiate a 2-tuple whose components are of type and . - :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Tuple/Overview/create1.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Tuple/Overview/create1.vb" id="Snippet3"::: This is equivalent to the following call to the class constructor. - :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/create1.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Tuple/Overview/create1.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Tuple/Overview/create1.vb" id="Snippet4"::: @@ -268,7 +268,7 @@ ## Examples The following example calls the method to determine whether any of the objects in an array of objects are equal to one another. The output reflects the fact that the method returns `true` when comparing objects whose components have equal values. - :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2/Equals/equals1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2/Equals/equals1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TupleT1,T2/Equals/equals1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TupleT1,T2/Equals/equals1.vb" id="Snippet1"::: @@ -375,7 +375,7 @@ ## Examples The example illustrates the use of the and properties to define a method that returns multiple values in the form of a 2-tuple. - :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2/Overview/item1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2/Overview/item1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TupleT1,T2/Overview/item1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TupleT1,T2/Overview/item1.vb" id="Snippet1"::: @@ -529,7 +529,7 @@ ## Examples The following example creates an array of objects that consist of a student's name and test score. It displays the component of each tuple in the array in unsorted order, sorts the array, and then calls to display the value of each tuple in sorted order. To sort the array, the example defines a generic `ScoreComparer` class that implements the interface and sorts the objects in ascending order by the value of their second component rather than their first component. Note that the example does not directly call the method. This method is called implicitly by the method for each element in the array. - :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2/System.Collections.IStructuralComparable.CompareTo/compareto2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2/System.Collections.IStructuralComparable.CompareTo/compareto2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/TupleT1,T2/System.Collections.IStructuralComparable.CompareTo/compareto2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/TupleT1,T2/System.Collections.IStructuralComparable.CompareTo/compareto2.vb" id="Snippet2"::: @@ -610,7 +610,7 @@ ## Examples The following example defines an `Item2Comparer` class that implements the interface and changes the way in which objects are evaluated for equality. The method always returns `true` when it is passed the property values of two objects, and it calls the method to evaluate their property values. As a result, the method tests for equality based only on the value of the property. The output illustrates the result for a data set of objects that record the names of runners and the distances that they ran. - :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2/Equals/equals2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2/Equals/equals2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/TupleT1,T2/Equals/equals2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/TupleT1,T2/Equals/equals2.vb" id="Snippet2"::: diff --git a/xml/System/Tuple`3.xml b/xml/System/Tuple`3.xml index 23ff7d2cf7e..09df82266ba 100644 --- a/xml/System/Tuple`3.xml +++ b/xml/System/Tuple`3.xml @@ -121,7 +121,7 @@ - To provide easy access to, and manipulation of, a data set. The following example defines an array of objects that contain the names of students, their average test scores, and the number of tests taken. The array is passed to the `ComputeStatistics` method, which calculates the mean and standard deviation of the test scores. - :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2,T3/Overview/example1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2,T3/Overview/example1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TupleT1,T2,T3/Overview/example1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TupleT1,T2,T3/Overview/example1.vb" id="Snippet1"::: @@ -599,7 +599,7 @@ ## Examples The following example creates an array of objects that consist of a student's name, mean test score, and number of tests. It displays the component of each tuple in the array in unsorted order, sorts the array, and then calls to display the value of each tuple in sorted order. To sort the array, the example defines a generic `ScoreComparer` class that implements the interface and sorts the objects in ascending order by the value of their second component rather than their first component. Note that the example does not directly call the method. This method is called implicitly by the method for each element in the array. - :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2,T3/System.Collections.IStructuralComparable.CompareTo/compareto2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2,T3/System.Collections.IStructuralComparable.CompareTo/compareto2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/TupleT1,T2,T3/System.Collections.IStructuralComparable.CompareTo/compareto2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/TupleT1,T2,T3/System.Collections.IStructuralComparable.CompareTo/compareto2.vb" id="Snippet2"::: @@ -680,7 +680,7 @@ ## Examples The following example defines an `Item2Comparer` class that implements the interface and changes the way in which objects are evaluated for equality. The method always returns `true` when it is passed the property values of two objects, and it calls the method to evaluate their property values. If this method call returns `true`, their property values are passed to the method, which always returns `true`. As a result, the method tests for equality based only on the value of the property. The output illustrates the result for a data set of objects that record the names, mean test score, and number of tests of students in a class. - :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2,T3/Equals/equals2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2,T3/Equals/equals2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/TupleT1,T2,T3/Equals/equals2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/TupleT1,T2,T3/Equals/equals2.vb" id="Snippet2"::: diff --git a/xml/System/Tuple`4.xml b/xml/System/Tuple`4.xml index 1b8367aa3ca..144cf1ef588 100644 --- a/xml/System/Tuple`4.xml +++ b/xml/System/Tuple`4.xml @@ -130,7 +130,7 @@ - To provide easy access to, and manipulation of, a data set. The following example defines an array of objects that contain the names of baseball pitchers, the number of innings they pitched, and the number of earned runs (runs that scored without fielding errors), and hits that they gave up. The array is passed to the `ComputeStatistics` method, which calculates each pitcher's earned run average (the average number of runs given up in a nine-inning game), and the average number of hits given up per inning. The method also uses these two averages to compute a hypothetical effectiveness average. - :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2,T3,T4/Overview/example1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2,T3,T4/Overview/example1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/TupleT1,T2,T3,T4/Overview/example1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/TupleT1,T2,T3,T4/Overview/example1.vb" id="Snippet1"::: @@ -673,7 +673,7 @@ ## Examples The following example creates an array of objects that contain statistical data about baseball pitchers. The data items include the name of the pitcher, the number of innings pitched, the pitcher's earned run average (the average number of runs a pitcher allows per game), and the number of hits the pitcher has given up. The example displays the component of each tuple in the array in unsorted order, sorts the array, and then calls to display the value of each tuple in sorted order. To sort the array, the example defines a generic `PitcherComparer` class that implements the interface and sorts the objects in ascending order by the value of their third component (the earned run average) rather than their first component. Note that the example does not directly call the method. This method is called implicitly by the method for each element in the array. - :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2,T3,T4/System.Collections.IStructuralComparable.CompareTo/compareto2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2,T3,T4/System.Collections.IStructuralComparable.CompareTo/compareto2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/TupleT1,T2,T3,T4/System.Collections.IStructuralComparable.CompareTo/compareto2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/TupleT1,T2,T3,T4/System.Collections.IStructuralComparable.CompareTo/compareto2.vb" id="Snippet2"::: diff --git a/xml/System/Tuple`5.xml b/xml/System/Tuple`5.xml index 79b9b6ddae7..738dab3c67d 100644 --- a/xml/System/Tuple`5.xml +++ b/xml/System/Tuple`5.xml @@ -825,7 +825,7 @@ ## Examples The following example defines a `DoubleComparer` class that implements the interface. The example instantiates two objects by using a random number generator to populate their second through fifth components, casts the first instance to an interface, and then uses a `DoubleComparer` object to test the two objects for approximate equality. - :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2,T3,T4,T5/Equals/equals2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2,T3,T4,T5/Equals/equals2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/TupleT1,T2,T3,T4,T5/Equals/equals2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/TupleT1,T2,T3,T4,T5/Equals/equals2.vb" id="Snippet2"::: diff --git a/xml/System/Tuple`6.xml b/xml/System/Tuple`6.xml index aede5623a40..e8a4950c92c 100644 --- a/xml/System/Tuple`6.xml +++ b/xml/System/Tuple`6.xml @@ -907,7 +907,7 @@ ## Examples The following example defines a `RateComparer` class that performs a custom test for equality. If the values that are passed to its method are of type or , the method tests for equality by using only up to three fractional digits. Otherwise, it simply calls the `x` parameter's `Equals` method. The example uses this implementation to determine whether four objects that contain data on the rate of population change between 1960 and 2000 are equal. - :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2,T3,T4,T5,T6/Equals/equals2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2,T3,T4,T5,T6/Equals/equals2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/TupleT1,T2,T3,T4,T5,T6/Equals/equals2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/TupleT1,T2,T3,T4,T5,T6/Equals/equals2.vb" id="Snippet2"::: diff --git a/xml/System/Tuple`7.xml b/xml/System/Tuple`7.xml index ddb7da34395..50512a5d973 100644 --- a/xml/System/Tuple`7.xml +++ b/xml/System/Tuple`7.xml @@ -901,7 +901,7 @@ The example then displays the elements in the array in unsorted order, sorts them by the third component (the population in 1960) and displays them, and then sorts them by the sixth component (the population in 1990) and displays them. - :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2,T3,T4,T5,T6,T7/System.Collections.IStructuralComparable.CompareTo/compareto2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2,T3,T4,T5,T6,T7/System.Collections.IStructuralComparable.CompareTo/compareto2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/TupleT1,T2,T3,T4,T5,T6,T7/System.Collections.IStructuralComparable.CompareTo/compareto2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/TupleT1,T2,T3,T4,T5,T6,T7/System.Collections.IStructuralComparable.CompareTo/compareto2.vb" id="Snippet2"::: @@ -982,7 +982,7 @@ ## Examples The following example defines a `RateComparer` class that performs a custom test for equality. If the values that are passed to its method are of type or , the method tests for equality by using only up to three fractional digits. Otherwise, it simply calls the `x` parameter's `Equals` method. The example uses this implementation to determine whether four objects that contain data on the rate of population change between 1950 and 2000 are equal. - :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2,T3,T4,T5,T6,T7/Equals/equals2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2,T3,T4,T5,T6,T7/Equals/equals2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/TupleT1,T2,T3,T4,T5,T6,T7/Equals/equals2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/TupleT1,T2,T3,T4,T5,T6,T7/Equals/equals2.vb" id="Snippet2"::: diff --git a/xml/System/Tuple`8.xml b/xml/System/Tuple`8.xml index 4a924a6b7d0..4f0ad512e0d 100644 --- a/xml/System/Tuple`8.xml +++ b/xml/System/Tuple`8.xml @@ -153,7 +153,7 @@ You can instantiate a object with exactly eight components by calling the static method. The following example creates an 8-tuple (octuple) that contains prime numbers that are less than 20. Note that it uses type inference to determine the type of each component. - :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/createntuple.cs" interactive="try-dotnet-method" id="Snippet17"::: + :::code language="csharp" source="~/snippets/csharp/System/Tuple/Overview/createntuple.cs" id="Snippet17"::: :::code language="fsharp" source="~/snippets/fsharp/System/Tuple/Overview/createntuple.fs" id="Snippet17"::: :::code language="vb" source="~/snippets/visualbasic/System/Tuple/Overview/createntuple.vb" id="Snippet17"::: @@ -1011,7 +1011,7 @@ The example then displays the elements in the array in unsorted order, sorts them by the third component (the population in 1950) and displays them, and then sorts them by the eighth component (the population in 2000) and displays them. - :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2,T3,T4,T5,T6,T7,TRest/System.Collections.IStructuralComparable.CompareTo/compareto2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/TupleT1,T2,T3,T4,T5,T6,T7,TRest/System.Collections.IStructuralComparable.CompareTo/compareto2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/TupleT1,T2,T3,T4,T5,T6,T7,TRest/System.Collections.IStructuralComparable.CompareTo/compareto2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/TupleT1,T2,T3,T4,T5,T6,T7,TRest/System.Collections.IStructuralComparable.CompareTo/compareto2.vb" id="Snippet2"::: diff --git a/xml/System/Type.xml b/xml/System/Type.xml index 56f590984a6..c65da9f20f6 100644 --- a/xml/System/Type.xml +++ b/xml/System/Type.xml @@ -98,7 +98,7 @@ To identify the overload signature, the code example creates a temporary array c The code example uses the to invoke the method on the string "Hello, World!", and displays the result. -:::code language="csharp" source="~/snippets/csharp/System/Type/Overview/source.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/System/Type/Overview/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/Overview/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/Overview/source.vb" id="Snippet1"::: ]]> @@ -437,7 +437,7 @@ TopNamespace.Sub\+Namespace.ContainingClass+NestedClass, MyAssembly, Version=1.3 ## Examples The following example uses the property. - :::code language="csharp" source="~/snippets/csharp/System/Type/Attributes/attributes1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/Attributes/attributes1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/Attributes/attributes1.vb" id="Snippet1"::: ]]> @@ -519,7 +519,7 @@ TopNamespace.Sub\+Namespace.ContainingClass+NestedClass, MyAssembly, Version=1.3 ## Examples The following example demonstrates using the property. - :::code language="csharp" source="~/snippets/csharp/System/Type/BaseType/testbasetype.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/BaseType/testbasetype.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/BaseType/testbasetype.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/BaseType/testbasetype.vb" id="Snippet1"::: @@ -594,7 +594,7 @@ TopNamespace.Sub\+Namespace.ContainingClass+NestedClass, MyAssembly, Version=1.3 ## Examples The following example defines a generic class with two type parameters and then defines a second generic class that derives from the first class. The derived class's base class has two type arguments: the first is and the second is a type parameter of the derived type. The example displays information about these generic classes, including the positions reported by the property. - :::code language="csharp" source="~/snippets/csharp/System/Type/ContainsGenericParameters/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/ContainsGenericParameters/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/ContainsGenericParameters/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/ContainsGenericParameters/source.vb" id="Snippet1"::: @@ -677,7 +677,7 @@ TopNamespace.Sub\+Namespace.ContainingClass+NestedClass, MyAssembly, Version=1.3 ## Examples The following code example defines a class that has a generic method, assigns a type argument to the method, and invokes the resulting constructed generic method. It also displays information about the generic method definition and the constructed method. When displaying information about the type parameters of the generic method definition, in the `DisplayGenericMethodInfo` method, the example code shows the value of the property for the method's generic type parameter. - :::code language="csharp" source="~/snippets/csharp/System/Type/DeclaringMethod/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/DeclaringMethod/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/DeclaringMethod/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/DeclaringMethod/source.vb" id="Snippet1"::: @@ -768,7 +768,7 @@ TopNamespace.Sub\+Namespace.ContainingClass+NestedClass, MyAssembly, Version=1.3 ## Examples This example displays the declaring type of a method in a derived class. - :::code language="csharp" source="~/snippets/csharp/System/Type/DeclaringType/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/DeclaringType/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/DeclaringType/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/DeclaringType/source.vb" id="Snippet1"::: @@ -1037,7 +1037,7 @@ TopNamespace.Sub\+Namespace.ContainingClass+NestedClass, MyAssembly, Version=1.3 ## Examples The following example uses to compare various object instances with various instances. - :::code language="csharp" source="~/snippets/csharp/System/Type/Equals/EqualsEx1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/Equals/EqualsEx1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/Equals/EqualsEx1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/Equals/EqualsEx1.vb" id="Snippet1"::: @@ -1119,7 +1119,7 @@ TopNamespace.Sub\+Namespace.ContainingClass+NestedClass, MyAssembly, Version=1.3 ## Examples The following example uses `Equals` to compare two types. - :::code language="csharp" source="~/snippets/csharp/System/Type/Equals/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/Equals/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/Equals/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/Equals/source.vb" id="Snippet1"::: @@ -1391,7 +1391,7 @@ TopNamespace.Sub\+Namespace.ContainingClass+NestedClass, MyAssembly, Version=1.3 ## Examples The following example finds the specified interface implemented or inherited by the specified type, and then displays the interface names. - :::code language="csharp" source="~/snippets/csharp/System/Type/FindInterfaces/type_findinterfaces.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/FindInterfaces/type_findinterfaces.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/FindInterfaces/type_findinterfaces.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/FindInterfaces/type_findinterfaces.vb" id="Snippet1"::: @@ -1526,7 +1526,7 @@ The `filter` argument can be a custom delegate of type property are qualified by their full assembly name, even though the string representation of the generic type itself is not qualified by its full assembly name. The following example illustrates the difference in the FullName property for a type that represents generic type definition and one that represents a closed generic type. - :::code language="csharp" source="~/snippets/csharp/System/Type/FullName/fullnameex1.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/FullName/fullnameex1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/FullName/fullnameex1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/FullName/fullnameex1.vb" id="Snippet2"::: @@ -1612,7 +1612,7 @@ The `filter` argument can be a custom delegate of type type and attempts to display its property. - :::code language="csharp" source="~/snippets/csharp/System/Type/FullName/Fullname3.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/FullName/Fullname3.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/FullName/Fullname3.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/FullName/Fullname3.vb" id="Snippet3"::: @@ -1620,7 +1620,7 @@ The `filter` argument can be a custom delegate of type `, with three methods: `Display(T[])`, which is passed an array of type T; `HandleT(T)`, which is passed a T object; and `ChangeValue(ref T)`, which is passed a T object by reference. Because C# and Visual Basic do not allow us to define T as a pointer in the `HandleT` method, we have to call the method on the object that represents the method's parameter type to create a pointer to a generic type. The output from the example shows that in all three cases, the property is `null`. - :::code language="csharp" source="~/snippets/csharp/System/Type/FullName/Fullname4.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/FullName/Fullname4.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/FullName/Fullname4.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/FullName/FullName4.vb" id="Snippet4"::: @@ -1628,7 +1628,7 @@ The `filter` argument can be a custom delegate of type ` inherits from `Base`. The property obtains the object that represents the base type of `Derived`, and its property returns `null`. - :::code language="csharp" source="~/snippets/csharp/System/Type/FullName/Fullname5.cs" interactive="try-dotnet" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/FullName/Fullname5.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/FullName/Fullname5.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/FullName/FullName5.vb" id="Snippet5"::: @@ -1641,13 +1641,13 @@ The `filter` argument can be a custom delegate of type method and the , `FullName`, and properties. - :::code language="csharp" source="~/snippets/csharp/System/Type/AssemblyQualifiedName/fullname1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/AssemblyQualifiedName/fullname1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/AssemblyQualifiedName/fullname1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/AssemblyQualifiedName/fullname1.vb" id="Snippet1"::: @@ -2073,7 +2073,7 @@ The `filter` argument can be a custom delegate of type object, and displays the constructor signature. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetConstructor/type_getconstructor.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetConstructor/type_getconstructor.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/GetConstructor/type_getconstructor.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetConstructor/type_getconstructor.vb" id="Snippet1"::: @@ -2259,7 +2259,7 @@ The `filter` argument can be a custom delegate of type object, and displays the constructor signature. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetConstructor/type_getconstructor2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetConstructor/type_getconstructor2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/GetConstructor/type_getconstructor2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetConstructor/type_getconstructor2.vb" id="Snippet1"::: @@ -2421,7 +2421,7 @@ The `filter` argument can be a custom delegate of type object, and displays the constructor signature. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetConstructor/type_getconstructor3.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetConstructor/type_getconstructor3.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/GetConstructor/type_getconstructor3.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetConstructor/type_getconstructor3.vb" id="Snippet1"::: @@ -2593,7 +2593,7 @@ The `filter` argument can be a custom delegate of type overload from a class that has two instance constructors and one static constructor. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetConstructors/source1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetConstructors/source1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/GetConstructors/source1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetConstructors/source1.vb" id="Snippet1"::: @@ -2609,7 +2609,7 @@ False To find static constructors, use the overload, and pass it the combination (logical OR) of , , , , as shown in the following code example: - :::code language="csharp" source="~/snippets/csharp/System/Type/GetConstructors/source2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetConstructors/source2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/GetConstructors/source2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetConstructors/source2.vb" id="Snippet2"::: @@ -2967,7 +2967,7 @@ If the current represents a generic type parameter, the represents a generic type parameter, the object for the field, and displays the value of the field. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetField/type_getfield.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetField/type_getfield.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/GetField/type_getfield.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetField/type_getfield.vb" id="Snippet1"::: @@ -3880,7 +3880,7 @@ If the current represents a generic type parameter, the object for the field that matches the specified binding flags, and displays the value of the field. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetField/type_getfield.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetField/type_getfield.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/GetField/type_getfield.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetField/type_getfield.vb" id="Snippet2"::: @@ -3992,7 +3992,7 @@ If the current represents a generic type parameter, the method does ## Examples The following example shows a use of the `GetFields(BindingFlags)` method. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetFields/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetFields/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/GetFields/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetFields/source.vb" id="Snippet1"::: @@ -4419,7 +4419,7 @@ In .NET 6 and earlier versions, the method does ## Examples The following code example creates an instance of a constructed type by using ordinary instance creation and then uses the and methods to retrieve the constructed type and the generic type definition. This example uses the generic type; the constructed type represents a of `Test` objects with string keys. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetGenericTypeDefinition/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetGenericTypeDefinition/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/GetGenericTypeDefinition/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetGenericTypeDefinition/source.vb" id="Snippet1"::: @@ -5619,7 +5619,7 @@ This method can be used to find a constructed generic member given a member from If a method is overloaded and has more than one public method, the method throws an exception. In the following example, an exception is thrown because there is more than one public overload of the method. On the other hand, because the `Person.ToString` method overrides and therefore is not overloaded, the method is able to retrieve the object. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetMethod/GetMethodWithOverloads2.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetMethod/GetMethodWithOverloads2.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/GetMethod/GetMethodWithOverloads2.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetMethod/GetMethodWithOverloads2.vb" id="Snippet3"::: @@ -5643,7 +5643,7 @@ This method can be used to find a constructed generic member given a member from ## Examples The following example gets a method named `MethodA`. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetMethod/type_getmethod1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetMethod/type_getmethod1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/GetMethod/type_getmethod1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetMethod/type_getmethod1.vb" id="Snippet1"::: @@ -5752,7 +5752,7 @@ This method can be used to find a constructed generic member given a member from - The `TestClass` type has two public instance overloads of the `Equals` method, one of which is inherited from : `Equals(TestClass)` and `Equals(Object)`. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetMethod/GetMethodWithOverloads1.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetMethod/GetMethodWithOverloads1.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/GetMethod/GetMethodWithOverloads1.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetMethod/GetMethodWithOverloads1.vb" id="Snippet2"::: @@ -5776,7 +5776,7 @@ This method can be used to find a constructed generic member given a member from ## Examples The following example gets the method that matches the specified binding flags. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetMethod/type_getmethod2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetMethod/type_getmethod2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/GetMethod/type_getmethod2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetMethod/type_getmethod2.vb" id="Snippet1"::: @@ -5890,7 +5890,7 @@ This method can be used to find a constructed generic member given a member from The following example retrieves objects that represent the `Add` methods of a non-generic type (the class), an open generic type (the class), and a closed generic type (the `List(Of String)` type. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetMethod/GetMethod1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetMethod/GetMethod1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/GetMethod/GetMethod1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetMethod/GetMethod1.vb" id="Snippet1"::: @@ -7273,7 +7273,7 @@ If the current represents a type parameter in the definition ## Examples The following example creates a class with two public methods and one protected method, creates a `Type` object corresponding to `MyTypeClass`, gets all public and non-public methods, and displays their names. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetMethods/type_getmethods2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetMethods/type_getmethods2.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetMethods/type_getmethods2.vb" id="Snippet1"::: ]]> @@ -7603,7 +7603,7 @@ If the current represents a type parameter in the definition ## Examples The following example defines a nested class and a `struct` in `MyClass`, and then obtains objects of the nested types using the type of `MyClass`. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetNestedTypes/type_getnestedtypes.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetNestedTypes/type_getnestedtypes.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetNestedTypes/type_getnestedtypes.vb" id="Snippet1"::: ]]> @@ -7704,7 +7704,7 @@ If the current represents a type parameter in the definition ## Examples The following example creates two nested public classes and two nested protected classes, and displays information for classes that match the specified binding constraints. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetNestedTypes/type_getnestedclassesabs.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetNestedTypes/type_getnestedclassesabs.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetNestedTypes/type_getnestedclassesabs.vb" id="Snippet1"::: ]]> @@ -7968,7 +7968,7 @@ In .NET 6 and earlier versions, the method d ## Examples The following example defines a class named `PropertyClass` that includes six properties: two are public, one is private, one is protected, one is internal (`Friend` in Visual Basic), and one is protected internal (`Protected Friend` in Visual Basic). It then displays some basic property information (the property name and type, whether it's read/write, and the visibility of its `get` and `set` accessors) for the properties that match the specified binding constraints. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetProperties/type_getproperties2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetProperties/type_getproperties2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/GetProperties/type_getproperties2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetProperties/type_getproperties2.vb" id="Snippet1"::: @@ -8060,7 +8060,7 @@ In .NET 6 and earlier versions, the method d @@ -8150,7 +8150,7 @@ The following example retrieves the `Type` object of a user-defined class, retri ## Examples The following example retrieves the type of a user-defined class, retrieves a property of that class and displays the property name in accordance with the specified binding constraints. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetProperty/type_getproperty2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetProperty/type_getproperty2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/GetProperty/type_getproperty2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetProperty/type_getproperty2.vb" id="Snippet1"::: @@ -8246,7 +8246,7 @@ The following example retrieves the `Type` object of a user-defined class, retri ## Examples The following example defines a class with one property and retrieves the name and type of the property. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetProperty/type_getproperty_types.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetProperty/type_getproperty_types.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/GetProperty/type_getproperty_types.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetProperty/type_getproperty_types.vb" id="Snippet1"::: @@ -8344,7 +8344,7 @@ The following example retrieves the `Type` object of a user-defined class, retri ## Examples The following example retrieves the `Type` object of a user-defined class, retrieves the property of that class, and displays the property name and type of the property as specified by the arguments passed to `GetProperty`. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetProperty/type_getproperty3.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetProperty/type_getproperty3.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/GetProperty/type_getproperty3.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetProperty/type_getproperty3.vb" id="Snippet1"::: @@ -8570,7 +8570,7 @@ The following example retrieves the `Type` object of a user-defined class, retri ## Examples The following example obtains a `Type` object corresponding to `MyPropertyClass`, and the indexed property of this class is retrieved using the arguments passed to the `GetProperty` method. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetProperty/type_getproperty21.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetProperty/type_getproperty21.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/GetProperty/type_getproperty21.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetProperty/type_getproperty21.vb" id="Snippet1"::: @@ -9143,7 +9143,7 @@ Type.GetType("System.Collections.Generic.Dictionary`2[System.String,[MyType,MyAs ## Examples The following example retrieves the type of `System.Int32` and uses that type object to display the property of `System.Int32`. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetType/type_gettype.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetType/type_gettype.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/GetType/type_gettype.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetType/type_gettype.vb" id="Snippet1"::: @@ -9357,7 +9357,7 @@ Type.GetType("System.Collections.Generic.Dictionary`2[System.String,[MyType,MyAs ## Examples The following example retrieves the type of `System.Int32` and uses that type object to display the property of `System.Int32`. If a type object refers to an assembly that does not exist, this example throws an exception. - :::code language="csharp" source="~/snippets/csharp/System/Type/GetType/type_gettype.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/GetType/type_gettype.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/GetType/type_gettype.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetType/type_gettype.vb" id="Snippet1"::: @@ -11482,7 +11482,7 @@ Calling this method overload is the same as calling the property. - :::code language="csharp" source="~/snippets/csharp/System/Type/IsArray/isarray2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/IsArray/isarray2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/IsArray/isarray2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/IsArray/isarray2.vb" id="Snippet1"::: @@ -12433,7 +12433,7 @@ GetType(Array).IsAssignableFrom(type) In the following example, the current instance is a object that represents the class. `GenericWithConstraint` is a generic type whose generic type parameter must be of type . Passing its generic type parameter to the `IsAssignableFrom` method indicates that an instance of the generic type parameter can be assigned to an object. - :::code language="csharp" source="~/snippets/csharp/System/Type/IsAssignableFrom/IsAssignableFrom2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/IsAssignableFrom/IsAssignableFrom2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/IsAssignableFrom/IsAssignableFrom2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/IsAssignableFrom/IsAssignableFrom2.vb" id="Snippet2"::: @@ -12849,7 +12849,7 @@ Byref-like structures are declared using `ref struct` keyword in C#. An instance ## Examples The following example creates an instance of a type and indicates whether the type is a class. - :::code language="csharp" source="~/snippets/csharp/System/Type/IsClass/type_isclass.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/IsClass/type_isclass.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/IsClass/type_isclass.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/IsClass/type_isclass.vb" id="Snippet1"::: @@ -13221,7 +13221,7 @@ Byref-like structures are declared using `ref struct` keyword in C#. An instance ## Examples The following example demonstrates how to use the `IsEnum` property. - :::code language="csharp" source="~/snippets/csharp/System/Type/IsEnum/testisenum.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/IsEnum/testisenum.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/IsEnum/testisenum.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/IsEnum/testisenum.vb" id="Snippet1"::: @@ -13641,7 +13641,7 @@ Byref-like structures are declared using `ref struct` keyword in C#. An instance ## Examples The following code example displays the value of the , , , and properties for the types described in the Remarks section. For explanations of the property values, see the accompanying table in Remarks. - :::code language="csharp" source="~/snippets/csharp/System/Type/IsGenericType/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/IsGenericType/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/IsGenericType/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/IsGenericType/source.vb" id="Snippet1"::: @@ -13883,7 +13883,7 @@ Byref-like structures are declared using `ref struct` keyword in C#. An instance ## Examples The following example demonstrates the use of the `IsInstanceOfType` method. - :::code language="csharp" source="~/snippets/csharp/System/Type/IsInstanceOfType/testisinstanceoftype.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/IsInstanceOfType/testisinstanceoftype.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/IsInstanceOfType/testisinstanceoftype.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/IsInstanceOfType/testisinstanceoftype.vb" id="Snippet1"::: @@ -13954,7 +13954,7 @@ Byref-like structures are declared using `ref struct` keyword in C#. An instance ## Examples The following example creates an interface, checks for the interface type, and indicates whether a class has the `IsInterface` property set. - :::code language="csharp" source="~/snippets/csharp/System/Type/IsInterface/type_isinterface.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/IsInterface/type_isinterface.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/IsInterface/type_isinterface.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/IsInterface/type_isinterface.vb" id="Snippet1"::: @@ -15533,7 +15533,7 @@ A signature type is a restricted type that can be passed to the method cannot be used to determine whether an interface derives from another interface, or whether a class implements an interface. Use the method for that purpose, as the following example shows. - :::code language="csharp" source="~/snippets/csharp/System/Type/IsSubclassOf/issubclassof_interface1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/IsSubclassOf/issubclassof_interface1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/IsSubclassOf/issubclassof_interface1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/IsSubclassOf/issubclassof_interface1.vb" id="Snippet1"::: @@ -15549,7 +15549,7 @@ A signature type is a restricted type that can be passed to the method to show that `DerivedC1` is a subclass of `Class1`. - :::code language="csharp" source="~/snippets/csharp/System/Type/IsSubclassOf/testissubclassof.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/IsSubclassOf/testissubclassof.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/IsSubclassOf/testissubclassof.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/IsSubclassOf/testissubclassof.vb" id="Snippet1"::: @@ -15789,7 +15789,7 @@ A signature type is a restricted type that can be passed to the method to create a constructed type from the generic type definition for the type. The constructed type represents a of `Test` objects with string keys. - :::code language="csharp" source="~/snippets/csharp/System/Type/MakeGenericType/source.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/MakeGenericType/source.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/MakeGenericType/source.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/MakeGenericType/source.vb" id="Snippet1"::: ]]> @@ -17423,7 +17423,7 @@ The following example uses the method to c The following example compares the strings returned by the `ToString` method and the , , and properties. - :::code language="csharp" source="~/snippets/csharp/System/Type/AssemblyQualifiedName/fullname1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Type/AssemblyQualifiedName/fullname1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/AssemblyQualifiedName/fullname1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/AssemblyQualifiedName/fullname1.vb" id="Snippet1"::: diff --git a/xml/System/UInt16.xml b/xml/System/UInt16.xml index 922a8df4ded..46091b9f7a7 100644 --- a/xml/System/UInt16.xml +++ b/xml/System/UInt16.xml @@ -1277,7 +1277,7 @@ For this method matches the IEEE 754:2 ## Examples The following example uses the and properties to ensure that an value is in the range of the type before converting it to a value. This prevents the conversion operation from throwing an if the integer value is not in the range of the type. - :::code language="csharp" source="~/snippets/csharp/System/UInt16/MaxValue/MaxValue.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/UInt16/MaxValue/MaxValue.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/UInt16/MaxValue/MaxValue.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/UInt16/MaxValue/MaxValue.vb" id="Snippet1"::: diff --git a/xml/System/UInt32.xml b/xml/System/UInt32.xml index 0583fab0595..054b6300c83 100644 --- a/xml/System/UInt32.xml +++ b/xml/System/UInt32.xml @@ -1330,7 +1330,7 @@ For this method matches the IEEE 754:2 ## Examples The following example uses the and fields to verify that an value is within the range of the type before it performs a type conversion. This verification prevents an at run time. - :::code language="csharp" source="~/snippets/csharp/System/UInt32/MaxValue/MaxValue1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/UInt32/MaxValue/MaxValue1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/UInt32/MaxValue/MaxValue1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/UInt32/MaxValue/MaxValue1.vb" id="Snippet1"::: @@ -1542,7 +1542,7 @@ For this method matches the IEEE 754:2 ## Examples The following example uses the method to parse an array of string values. - :::code language="csharp" source="~/snippets/csharp/System/UInt32/Parse/parse1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/UInt32/Parse/parse1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/UInt32/Parse/parse1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/UInt32/Parse/parse1.vb" id="Snippet1"::: @@ -1766,7 +1766,7 @@ For this method matches the IEEE 754:2 ## Examples The following example tries to parse each element in a string array by using a number of values. - :::code language="csharp" source="~/snippets/csharp/System/UInt32/Parse/parseex2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/UInt32/Parse/parseex2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/UInt32/Parse/parseex2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/UInt32/Parse/parseex2.vb" id="Snippet2"::: @@ -2150,7 +2150,7 @@ For this method matches the IEEE 754:2 ## Examples The following example uses the method to convert various string representations of numbers to 32-bit unsigned integer values. - :::code language="csharp" source="~/snippets/csharp/System/UInt32/Parse/parseex4.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/UInt32/Parse/parseex4.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/UInt32/Parse/parseex4.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/UInt32/Parse/parseex4.vb" id="Snippet4"::: @@ -6277,7 +6277,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example formats a 16-bit signed integer value by using several format providers, including one for the invariant culture. The output from the example illustrates that the formatted string returned by the method is the same regardless of the format provider. - :::code language="csharp" source="~/snippets/csharp/System/UInt32/ToString/tostring2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/UInt32/ToString/tostring2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/UInt32/ToString/tostring2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/UInt32/ToString/tostring2.vb" id="Snippet2"::: @@ -6378,7 +6378,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example displays a 32-bit unsigned integer value by using each standard format string and some custom format strings. - :::code language="csharp" source="~/snippets/csharp/System/UInt32/ToString/tostring3.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/UInt32/ToString/tostring3.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/UInt32/ToString/tostring3.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/UInt32/ToString/tostring3.vb" id="Snippet3"::: @@ -6494,7 +6494,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example displays a 32-bit unsigned integer value by using the standard numeric format specifiers and a number of specific objects. - :::code language="csharp" source="~/snippets/csharp/System/UInt32/ToString/tostring4.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/UInt32/ToString/tostring4.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/UInt32/ToString/tostring4.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/UInt32/ToString/tostring4.vb" id="Snippet4"::: @@ -6868,7 +6868,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example calls the method once for each element in a string array. - :::code language="csharp" source="~/snippets/csharp/System/UInt16/TryParse/tryparse11.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/UInt16/TryParse/tryparse11.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/UInt16/TryParse/tryparse11.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/UInt16/TryParse/tryparse1.vb" id="Snippet1"::: @@ -7273,7 +7273,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example calls the method with a number of different strings and values. - :::code language="csharp" source="~/snippets/csharp/System/UInt16/TryParse/tryparse21.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/UInt16/TryParse/tryparse21.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/UInt16/TryParse/tryparse21.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/UInt16/TryParse/tryparse21.vb" id="Snippet2"::: diff --git a/xml/System/UInt64.xml b/xml/System/UInt64.xml index 94a7681d213..797556a983c 100644 --- a/xml/System/UInt64.xml +++ b/xml/System/UInt64.xml @@ -1319,7 +1319,7 @@ For this method matches the IEEE 754:2 ## Examples The following example uses the and fields to verify that a value is within the range of the type before it performs a type conversion. This prevents an at run time. - :::code language="csharp" source="~/snippets/csharp/System/UInt64/MaxValue/MaxValue1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/UInt64/MaxValue/MaxValue1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/UInt64/MaxValue/MaxValue1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/UInt64/MaxValue/MaxValue1.vb" id="Snippet1"::: @@ -6249,7 +6249,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example formats a 64-bit signed integer value by using several format providers, including one for the invariant culture. The output from the example illustrates that the formatted string returned by the method is the same regardless of the format provider. - :::code language="csharp" source="~/snippets/csharp/System/UInt64/ToString/tostring2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/UInt64/ToString/tostring2.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/UInt64/ToString/tostring2.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/UInt64/ToString/tostring2.vb" id="Snippet2"::: @@ -6462,7 +6462,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples The following example displays a 32-bit unsigned integer value by using the standard numeric format specifiers and a number of specific objects. - :::code language="csharp" source="~/snippets/csharp/System/UInt64/ToString/tostring4.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/UInt64/ToString/tostring4.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/UInt64/ToString/tostring4.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/UInt64/ToString/tostring4.vb" id="Snippet4"::: diff --git a/xml/System/Uri.xml b/xml/System/Uri.xml index 2a3815d7202..a23c410227e 100644 --- a/xml/System/Uri.xml +++ b/xml/System/Uri.xml @@ -702,7 +702,7 @@ For `uriString`, an IPv6 address in string form must be enclosed within brackets The following example creates a new instance of the class by combining the relative URIs `http://www.contoso.com` and `catalog/shownew.htm` to form the absolute URI `http://www.contoso.com/catalog/shownew.htm`. - :::code language="csharp" source="~/snippets/csharp/System/Uri/.ctor/source2.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/.ctor/source2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/.ctor/source2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/.ctor/source2.vb" id="Snippet1"::: @@ -813,7 +813,7 @@ For `uriString`, an IPv6 address in string form must be enclosed within brackets This example creates an absolute instance, `absoluteUri`, and a relative instance, `relativeUri`. A new instance, `combinedUri`, is then created from these two instances. - :::code language="csharp" source="~/snippets/csharp/System/Uri/.ctor/nclurienhancements.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/.ctor/nclurienhancements.cs" id="Snippet2"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/.ctor/nclurienhancements.fs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/.ctor/nclurienhancements.vb" id="Snippet2"::: @@ -1043,7 +1043,7 @@ The URI formed by combining and and and and and instance from a string. It illustrates the difference between the value returned from , which returns the host name or address specified in the URI, and the value returned from , which returns an address that is safe to use in DNS resolution. - :::code language="csharp" source="~/snippets/csharp/System/Uri/.ctor/nclurienhancements.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/.ctor/nclurienhancements.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/.ctor/nclurienhancements.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/.ctor/nclurienhancements.vb" id="Snippet4"::: @@ -1691,7 +1691,7 @@ If you used an escaped string to construct this instance (for example, `"http:// ## Examples This example creates two instances from strings and compares them to determine whether they represent the same value. `address1` and `address2` are the same because the portion is ignored for this comparison. The outcome is written to the console. - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet8"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet8"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet8"::: @@ -2114,7 +2114,7 @@ If you used an escaped string to construct this instance (for example, `"http:// ## Examples The following example creates a instance and writes the fragment information to the console. - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet4"::: @@ -2174,7 +2174,7 @@ If you used an escaped string to construct this instance (for example, `"http:// ## Examples The following example determines whether a character is a hexadecimal character and, if it is, writes the corresponding decimal value to the console. - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet1"::: @@ -2302,7 +2302,7 @@ If you used an escaped string to construct this instance (for example, `"http:// ## Examples The following example creates a instance and writes the hash code to the console. - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet4"::: @@ -2386,7 +2386,7 @@ The following examples show a URI and the results of calling instance and writes the path to the console. - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet4"::: @@ -2489,7 +2489,7 @@ The following examples show a URI and the results of calling instance and writes the to the console. - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet9"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet9"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet9"::: @@ -2918,7 +2918,7 @@ The following examples show a URI and the results of calling instance that represents a base instance. It then creates a second instance from a string. It calls to determine whether the base instance is the base of the second instance. The outcome is written to the console. - :::code language="csharp" source="~/snippets/csharp/System/Uri/.ctor/nclurienhancements.cs" interactive="try-dotnet-method" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/.ctor/nclurienhancements.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/.ctor/nclurienhancements.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/.ctor/nclurienhancements.vb" id="Snippet6"::: @@ -2977,7 +2977,7 @@ The following examples show a URI and the results of calling instance and checks whether it uses the default port. - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet4"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet4"::: @@ -3159,7 +3159,7 @@ The following examples show a URI and the results of calling instance and determines whether it is a UNC path. - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet6"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet6"::: @@ -3780,7 +3780,7 @@ The following examples show a URI and the results of calling instances. The difference in the path information is written to the console. - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet3"::: @@ -3849,7 +3849,7 @@ The following examples show a URI and the results of calling instances from strings and compares them to determine whether they represent the same value. `Address1` and `Address2` are the same because the portion is ignored for this comparison. The outcome is written to the console. - :::code language="csharp" source="~/snippets/csharp/System/Uri/.ctor/nclurienhancements.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/.ctor/nclurienhancements.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/.ctor/nclurienhancements.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/.ctor/nclurienhancements.vb" id="Snippet5"::: @@ -3915,7 +3915,7 @@ The following examples show a URI and the results of calling instances from strings and compares them to determine whether they represent the same value. `Address2` and `Address3` are not the same because `Address3` contains a that is not found in `Address2`. The outcome is written to the console. - :::code language="csharp" source="~/snippets/csharp/System/Uri/.ctor/nclurienhancements.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/.ctor/nclurienhancements.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/.ctor/nclurienhancements.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/.ctor/nclurienhancements.vb" id="Snippet5"::: @@ -3981,7 +3981,7 @@ The following examples show a URI and the results of calling instance from a string. It illustrates the difference between the value returned from , which returns the string that was passed to the constructor, and from a call to , which returns the canonical form of the string. - :::code language="csharp" source="~/snippets/csharp/System/Uri/.ctor/nclurienhancements.cs" interactive="try-dotnet-method" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/.ctor/nclurienhancements.cs" id="Snippet3"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/.ctor/nclurienhancements.fs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/.ctor/nclurienhancements.vb" id="Snippet3"::: @@ -4100,7 +4100,7 @@ The following examples show a URI and the results of calling , , and an address. A instance is then created from the string. - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet17"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet17"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet17"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet17"::: @@ -4446,7 +4446,7 @@ The following examples show a URI and the results of calling instance with 3 segments and displays the segments on the screen. - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet5"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet5"::: @@ -4652,7 +4652,7 @@ The following examples show a URI and the results of calling instance from a string. It illustrates the difference between the value returned from , which returns the string that was passed to the constructor, and from a call to , which returns the canonical form of the string. - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet7"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet7"::: @@ -5220,7 +5220,7 @@ The following examples show a URI and the results of calling @@ -5277,7 +5277,7 @@ The following examples show a URI and the results of calling instance and determines whether the scheme is . - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet10"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet10"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet10"::: @@ -5328,7 +5328,7 @@ The following examples show a URI and the results of calling instance and determines whether the scheme is . - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet15"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet15"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet15"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet15"::: @@ -5409,7 +5409,7 @@ The following examples show a URI and the results of calling instance and determines whether the scheme is . - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet14"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet14"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet14"::: @@ -5460,7 +5460,7 @@ The following examples show a URI and the results of calling instance and determines whether the scheme is . - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet9"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet9"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet9"::: @@ -5511,7 +5511,7 @@ The following examples show a URI and the results of calling instance and determines whether the scheme is . - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet16"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet16"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet16"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet16"::: @@ -5562,7 +5562,7 @@ The following examples show a URI and the results of calling instance and determines whether the scheme is . - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet11"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet11"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet11"::: @@ -5691,7 +5691,7 @@ The following examples show a URI and the results of calling instance and determines whether the scheme is . - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet12"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet12"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet12"::: @@ -5745,7 +5745,7 @@ The following examples show a URI and the results of calling instance and determines whether the scheme is . - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet13"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet13"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet13"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet13"::: @@ -5956,7 +5956,7 @@ The property was originally designed to indicate t ## Examples The following example creates a instance and determines whether it was fully escaped when it was created. - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet18"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet18"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet18"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet18"::: @@ -6015,7 +6015,7 @@ The property was originally designed to indicate t ## Examples The following example creates a instance and writes the user information to the console. - :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" interactive="try-dotnet-method" id="Snippet18"::: + :::code language="csharp" source="~/snippets/csharp/System/Uri/CheckSchemeName/uriexamples.cs" id="Snippet18"::: :::code language="fsharp" source="~/snippets/fsharp/System/Uri/CheckSchemeName/uriexamples.fs" id="Snippet18"::: :::code language="vb" source="~/snippets/visualbasic/System/Uri/CheckSchemeName/uriexamples.vb" id="Snippet18"::: diff --git a/xml/System/ValueType.xml b/xml/System/ValueType.xml index 08c5299e79a..4696cbcd15b 100644 --- a/xml/System/ValueType.xml +++ b/xml/System/ValueType.xml @@ -346,7 +346,7 @@ The following example demonstrates how the method to provide a more meaningful string representation of the value type. The following example illustrates the difference. It defines two value types, `EmployeeA` and `EmployeeB`, creates an instance of each, and calls its `ToString` method. Because the `EmployeeA` structure does not override the method, it displays only the fully qualified type name. The `EmployeeB.ToString` method, on the other hand, provides meaningful information about the object. - :::code language="csharp" source="~/snippets/csharp/System/ValueType/ToString/ToString2.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/ValueType/ToString/ToString2.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/ValueType/ToString/ToString2.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/ValueType/ToString/ToString2.vb" id="Snippet1"::: diff --git a/xml/System/Version.xml b/xml/System/Version.xml index 3ebb34332e9..9cda6fc1367 100644 --- a/xml/System/Version.xml +++ b/xml/System/Version.xml @@ -443,7 +443,7 @@ The following example uses the ## Examples The following code example demonstrates the constructor, and , , , , , and properties. - :::code language="csharp" source="~/snippets/csharp/System/Version/.ctor/rev.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Version/.ctor/rev.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Version/.ctor/rev.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Version/.ctor/rev.vb" id="Snippet1"::: @@ -506,7 +506,7 @@ The following example uses the ## Examples The following code example demonstrates the constructor, and , , , , , and properties. - :::code language="csharp" source="~/snippets/csharp/System/Version/.ctor/rev.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Version/.ctor/rev.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Version/.ctor/rev.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Version/.ctor/rev.vb" id="Snippet1"::: @@ -1068,7 +1068,7 @@ The following example uses the ## Examples The following code example demonstrates the constructor, and the , , , , , and properties. - :::code language="csharp" source="~/snippets/csharp/System/Version/.ctor/rev.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Version/.ctor/rev.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Version/.ctor/rev.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Version/.ctor/rev.vb" id="Snippet1"::: @@ -1130,7 +1130,7 @@ The following example uses the ## Examples The following code example demonstrates the constructor, and , , , , , and properties. - :::code language="csharp" source="~/snippets/csharp/System/Version/.ctor/rev.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Version/.ctor/rev.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Version/.ctor/rev.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Version/.ctor/rev.vb" id="Snippet1"::: @@ -1709,7 +1709,7 @@ where `major`, `minor`, `build`, and `revision` are the string representations o ## Examples The following example uses the method to parse a number of strings that contain version information. - :::code language="csharp" source="~/snippets/csharp/System/Version/Parse/parse1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Version/Parse/parse1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Version/Parse/parse1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Version/Parse/parse1.vb" id="Snippet1"::: @@ -1779,7 +1779,7 @@ where `major`, `minor`, `build`, and `revision` are the string representations o ## Examples The following code example demonstrates the constructor, and , , , , , and properties. - :::code language="csharp" source="~/snippets/csharp/System/Version/.ctor/rev.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Version/.ctor/rev.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Version/.ctor/rev.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Version/.ctor/rev.vb" id="Snippet1"::: @@ -2547,7 +2547,7 @@ where `major`, `minor`, `build`, and `revision` are the string representations o ## Examples The following example uses the method to parse a number of strings that contain version information. - :::code language="csharp" source="~/snippets/csharp/System/Version/TryParse/tryparse1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System/Version/TryParse/tryparse1.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Version/TryParse/tryparse1.fs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Version/TryParse/tryparse1.vb" id="Snippet1":::