Skip to content

Commit 414c175

Browse files
committed
Turn off interactive
Remove the interactive use in the System folder.
1 parent 118d0a6 commit 414c175

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+1114
-1121
lines changed

includes/csharp-interactive-with-utc-note.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

xml/System/Action`1.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
## Examples
110110
The following example demonstrates the use of the <xref:System.Action%601> delegate to print the contents of a <xref:System.Collections.Generic.List%601> 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 <xref:System.Action%601> variable. Instead, it passes a reference to a method that takes a single parameter and that does not return a value to the <xref:System.Collections.Generic.List%601.ForEach%2A?displayProperty=nameWithType> method, whose single parameter is an <xref:System.Action%601> delegate. Similarly, in the C# example, an <xref:System.Action%601> delegate is not explicitly instantiated because the signature of the anonymous method matches the signature of the <xref:System.Action%601> delegate that is expected by the <xref:System.Collections.Generic.List%601.ForEach%2A?displayProperty=nameWithType> method.
111111
112-
:::code language="csharp" source="~/snippets/csharp/System/ActionT/Overview/action.cs" interactive="try-dotnet-method" id="Snippet01":::
112+
:::code language="csharp" source="~/snippets/csharp/System/ActionT/Overview/action.cs" id="Snippet01":::
113113
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action_PrintExample/fs/action.fs" id="Snippet01":::
114114
:::code language="vb" source="~/snippets/visualbasic/System/ActionT/Overview/action.vb" id="Snippet01":::
115115

xml/System/Action`2.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,23 +107,23 @@
107107
108108
When you use the <xref:System.Action%602> 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.
109109
110-
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2/Overview/Delegate.cs" interactive="try-dotnet" id="Snippet1":::
110+
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2/Overview/Delegate.cs" id="Snippet1":::
111111
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~2/fs/Delegate.fs" id="Snippet1":::
112112
:::code language="vb" source="~/snippets/visualbasic/System/ActionT1,T2/Overview/Delegate.vb" id="Snippet1":::
113113
114114
The following example simplifies this code by instantiating the <xref:System.Action%602> delegate instead of explicitly defining a new delegate and assigning a named method to it.
115115
116-
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2/Overview/Action2.cs" interactive="try-dotnet" id="Snippet2":::
116+
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2/Overview/Action2.cs" id="Snippet2":::
117117
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~2/fs/Action2.fs" id="Snippet2":::
118118
:::code language="vb" source="~/snippets/visualbasic/System/ActionT1,T2/Overview/action2.vb" id="Snippet2":::
119119
120120
You can also use the <xref:System.Action%602> 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).)
121121
122-
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2/Overview/Anon.cs" interactive="try-dotnet" id="Snippet3":::
122+
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2/Overview/Anon.cs" id="Snippet3":::
123123
124124
You can also assign a lambda expression to an <xref:System.Action%602> 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).)
125125
126-
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2/Overview/Lambda.cs" interactive="try-dotnet" id="Snippet4":::
126+
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2/Overview/Lambda.cs" id="Snippet4":::
127127
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~2/fs/Lambda.fs" id="Snippet4":::
128128
:::code language="vb" source="~/snippets/visualbasic/System/ActionT1,T2/Overview/lambda.vb" id="Snippet4":::
129129

xml/System/Action`3.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,23 +121,23 @@
121121
122122
When you use the <xref:System.Action%603> 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.
123123
124-
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3/Overview/Delegate.cs" interactive="try-dotnet" id="Snippet1":::
124+
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3/Overview/Delegate.cs" id="Snippet1":::
125125
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~3/fs/Delegate.fs" id="Snippet1":::
126126
:::code language="vb" source="~/snippets/visualbasic/System/ActionT1,T2,T3/Overview/Delegate.vb" id="Snippet1":::
127127
128128
The following example simplifies this code by instantiating the <xref:System.Action%603> delegate instead of explicitly defining a new delegate and assigning a named method to it.
129129
130-
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3/Overview/Action3.cs" interactive="try-dotnet" id="Snippet2":::
130+
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3/Overview/Action3.cs" id="Snippet2":::
131131
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~3/fs/Action3.fs" id="Snippet2":::
132132
:::code language="vb" source="~/snippets/visualbasic/System/ActionT1,T2,T3/Overview/Action3.vb" id="Snippet2":::
133133
134134
You can also use the <xref:System.Action%603> 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).)
135135
136-
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3/Overview/Anon.cs" interactive="try-dotnet" id="Snippet3":::
136+
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3/Overview/Anon.cs" id="Snippet3":::
137137
138138
You can also assign a lambda expression to an <xref:System.Action%603> 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).)
139139
140-
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3/Overview/Lambda.cs" interactive="try-dotnet" id="Snippet4":::
140+
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3/Overview/Lambda.cs" id="Snippet4":::
141141
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~3/fs/Lambda.fs" id="Snippet4":::
142142
:::code language="vb" source="~/snippets/visualbasic/System/ActionT1,T2,T3/Overview/lambda.vb" id="Snippet4":::
143143

xml/System/Activator.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@
408408
## Examples
409409
The following code example demonstrates how to call the <xref:System.Activator.CreateInstance%28System.Type%29> method. Instances of several different types are created and their default values are displayed.
410410
411-
:::code language="csharp" source="~/snippets/csharp/System/Activator/Overview/source2.cs" interactive="try-dotnet" id="Snippet4":::
411+
:::code language="csharp" source="~/snippets/csharp/System/Activator/Overview/source2.cs" id="Snippet4":::
412412
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/ActivatorX/fs/source2.fs" id="Snippet4":::
413413
:::code language="vb" source="~/snippets/visualbasic/System/Activator/Overview/source2.vb" id="Snippet4":::
414414
@@ -815,13 +815,13 @@ Note: In <see href="https://go.microsoft.com/fwlink/?LinkID=247912">.NET for Win
815815
## Examples
816816
The following example calls the <xref:System.Activator.CreateInstance%28System.Type%2CSystem.Object%5B%5D%29> method to create a <xref:System.String> object. It calls the <xref:System.String.%23ctor%28System.Char%5B%5D%2CSystem.Int32%2CSystem.Int32%29?displayProperty=nameWithType> constructor to instantiate a string that contains ten elements from a character array starting at the fourteenth position.
817817
818-
:::code language="csharp" source="~/snippets/csharp/System/Activator/CreateInstance/CreateInstance5.cs" interactive="try-dotnet" id="Snippet5":::
818+
:::code language="csharp" source="~/snippets/csharp/System/Activator/CreateInstance/CreateInstance5.cs" id="Snippet5":::
819819
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.activator.createinstance/fs/CreateInstance5.fs" id="Snippet5":::
820820
:::code language="vb" source="~/snippets/visualbasic/System/Activator/CreateInstance/CreateInstance5.vb" id="Snippet5":::
821821
822822
The following example creates a jagged array whose elements are arguments to be passed to a <xref:System.String> constructor. The example then passes each array to the <xref:System.Activator.CreateInstance%28System.Type%2CSystem.Object%5B%5D%29> method to invoke the appropriate string constructor.
823823
824-
:::code language="csharp" source="~/snippets/csharp/System/Activator/CreateInstance/createinstance2.cs" interactive="try-dotnet" id="Snippet4":::
824+
:::code language="csharp" source="~/snippets/csharp/System/Activator/CreateInstance/createinstance2.cs" id="Snippet4":::
825825
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.activator.createinstance/fs/createinstance2.fs" id="Snippet4":::
826826
:::code language="vb" source="~/snippets/visualbasic/System/Activator/CreateInstance/createinstance2.vb" id="Snippet4":::
827827

xml/System/AppDomain.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7839,7 +7839,7 @@ The friendly name of the default application domain is the file name of the proc
78397839
The following example demonstrates how to use the <xref:System.AppDomain.SetData%28System.String%2CSystem.Object%29> method to create a new value pair. The example then uses the <xref:System.AppDomain.GetData%2A> method to retrieve the value, and displays it to the console.
78407840

78417841
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ADGetData/CPP/adgetdata.cpp" id="Snippet1":::
7842-
:::code language="csharp" source="~/snippets/csharp/System/AppDomain/GetData/adgetdata.cs" interactive="try-dotnet" id="Snippet1":::
7842+
:::code language="csharp" source="~/snippets/csharp/System/AppDomain/GetData/adgetdata.cs" id="Snippet1":::
78437843
:::code language="fsharp" source="~/snippets/fsharp/System/AppDomain/GetData/adgetdata.fs" id="Snippet1":::
78447844
:::code language="vb" source="~/snippets/visualbasic/System/AppDomain/GetData/adgetdata.vb" id="Snippet1":::
78457845

xml/System/ArgumentException.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ In F#, you can use the [invalidArg](/dotnet/fsharp/language-reference/exception-
101101
102102
The following example demonstrates how to throw and catch an <xref:System.ArgumentException>. It uses the [ArgumentException.GetType().Name](xref:System.Type.Name%2A) property to display the name of the exception object, and also uses the <xref:System.ArgumentException.Message%2A> property to display the text of the exception message.
103103
104-
:::code language="csharp" source="~/snippets/csharp/System/ArgumentException/Overview/argumentexception2.cs" interactive="try-dotnet" id="Snippet3":::
104+
:::code language="csharp" source="~/snippets/csharp/System/ArgumentException/Overview/argumentexception2.cs" id="Snippet3":::
105105
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/ArgumentException/FS/argumentexception2.fs" id="Snippet3":::
106106
:::code language="vb" source="~/snippets/visualbasic/System/ArgumentException/Overview/program2.vb" id="Snippet3":::
107107

xml/System/ArgumentOutOfRangeException.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ The conditions in which an <xref:System.ArgumentOutOfRangeException> exception i
9494
9595
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:
9696
97-
:::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/NoElements.cs" interactive="try-dotnet" id="Snippet4":::
97+
:::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/NoElements.cs" id="Snippet4":::
9898
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/System.ArgumentOutOfRangeException/fs/NoElements.fs" id="Snippet4":::
9999
:::code language="vb" source="~/snippets/visualbasic/System/ArgumentOutOfRangeException/Overview/NoElements.vb" id="Snippet4":::
100100
@@ -118,7 +118,7 @@ The conditions in which an <xref:System.ArgumentOutOfRangeException> exception i
118118
119119
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 <xref:System.Collections.Generic.List%601.FindIndex%28System.Predicate%7B%600%7D%29?displayProperty=nameWithType> method fails to find a string equal to "Z" and so returns -1. However, this is an invalid index value.
120120
121-
:::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/BadSearch.cs" interactive="try-dotnet" id="Snippet6":::
121+
:::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/BadSearch.cs" id="Snippet6":::
122122
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/System.ArgumentOutOfRangeException/fs/BadSearch.fs" id="Snippet6":::
123123
:::code language="vb" source="~/snippets/visualbasic/System/ArgumentOutOfRangeException/Overview/BadSearch.vb" id="Snippet6":::
124124
@@ -130,7 +130,7 @@ The conditions in which an <xref:System.ArgumentOutOfRangeException> exception i
130130
131131
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.
132132
133-
:::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/OOR2.cs" interactive="try-dotnet" id="Snippet8":::
133+
:::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/OOR2.cs" id="Snippet8":::
134134
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/System.ArgumentOutOfRangeException/fs/OOR2.fs" id="Snippet8":::
135135
:::code language="vb" source="~/snippets/visualbasic/System/ArgumentOutOfRangeException/Overview/OOR2.vb" id="Snippet8":::
136136
@@ -168,7 +168,7 @@ The conditions in which an <xref:System.ArgumentOutOfRangeException> exception i
168168
169169
To eliminate the exception, validate the value returned by the string search method before calling the string manipulation method.
170170
171-
:::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/NoFind2.cs" interactive="try-dotnet" id="Snippet18":::
171+
:::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/NoFind2.cs" id="Snippet18":::
172172
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/System.ArgumentOutOfRangeException/fs/NoFind2.fs" id="Snippet18":::
173173
:::code language="vb" source="~/snippets/visualbasic/System/ArgumentOutOfRangeException/Overview/NoFind2.vb" id="Snippet18":::
174174
@@ -192,7 +192,7 @@ The conditions in which an <xref:System.ArgumentOutOfRangeException> exception i
192192
193193
The following example defines a `FindWords` method that uses the <xref:System.String.IndexOfAny%28System.Char%5B%5D%2CSystem.Int32%29?displayProperty=nameWithType> method to identify space characters and punctuation marks in a string and returns an array that contains the words found in the string.
194194
195-
:::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/FindWords1.cs" interactive="try-dotnet" id="Snippet19":::
195+
:::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/FindWords1.cs" id="Snippet19":::
196196
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/System.ArgumentOutOfRangeException/fs/FindWords1.fs" id="Snippet19":::
197197
:::code language="vb" source="~/snippets/visualbasic/System/ArgumentOutOfRangeException/Overview/FindWords1.vb" id="Snippet19":::
198198
@@ -250,7 +250,7 @@ For a list of initial property values for an instance of <xref:System.ArgumentOu
250250
251251
The following example defines a class to contain information about an invited guest. If the guest is younger than 21, an <xref:System.ArgumentOutOfRangeException> exception is thrown.
252252
253-
:::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/program.cs" interactive="try-dotnet" id="Snippet1":::
253+
:::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/program.cs" id="Snippet1":::
254254
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/ArgumentOutOfRangeException/FS/program.fs" id="Snippet1":::
255255
:::code language="vb" source="~/snippets/visualbasic/System/ArgumentOutOfRangeException/Overview/program.vb" id="Snippet1":::
256256

0 commit comments

Comments
 (0)