diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7673c299eba..aa13ed9bf04 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -19,10 +19,10 @@ # Area owners of the dotnet/runtime repo: https://github.com/dotnet/runtime/blob/master/docs/area-owners.md -/xml/System.Buffers**/** @layomia @JeremyKuhne +/xml/System.Buffers**/** @tannergooding @GrabYourPitchforks @pgovind /xml/System.CodeDom**/** @buyaa-n @krwq /xml/System.Collections**/** @eiriktsarpalis @layomia -/xml/System.ComponentModel**/** @JeremyKuhne @safern +/xml/System.ComponentModel**/** @safern /xml/System.ComponentModel.Composition**/** @maryamariyan @ViktorHofer /xml/System.ComponentModel.DataAnnotations**/** @lajones @ajcvickers /xml/System.ComponentModel.Design**/** @RussKie @merriemcgaw @@ -36,31 +36,31 @@ /xml/System.Diagnostics/PerformanceCounter*.xml @Anipik /xml/System.Diagnostics/Process*.xml @adsitnik @eiriktsarpalis /xml/System.Diagnostics/TraceSource.xml @Anipik -/xml/System.Diagnostics.Tracing**/** @Anipik +/xml/System.Diagnostics.Tracing**/** @noahfalk @tommcdon @tarekgh @Anipik /xml/System.DirectoryServices**/** @tquerec @josephisenhour -/xml/System.Drawing**/** @JeremyKuhne @maryamariyan +/xml/System.Drawing**/** @safern @tannergooding /xml/System.Dynamic**/** @cston @333fred /xml/System.Globalization**/** @safern @krwq @tarekgh -/xml/System.IO**/** @JeremyKuhne @carlossanlop @jozkee +/xml/System.IO**/** @carlossanlop @jozkee /xml/System.IO.Compression**/** @carlossanlop @ericstj /xml/System.IO.Pipelines**/** @davidfowl @halter73 @jkotalik @anurse -/xml/System.Linq**/** @eiriktsarpalis -/xml/System.Linq/Parallel*.xml @tarekgh @kouvel +/xml/System.Linq**/** @eiriktsarpalis @adamsitnik /xml/System.Linq.Expressions**/** @cston @333fred +/xml/System.Linq/Parallel*.xml @tarekgh @kouvel /xml/System.Management**/** @Anipik /xml/System.Net**/** @dotnet/ncl -/xml/System.Numerics**/** @tannergooding @pgovind +/xml/System.Numerics**/** @tannergooding @pgovind /xml/System.Reflection**/** @steveharter @GrabYourPitchforks /xml/System.Reflection.Emit**/** @steveharter @GrabYourPitchforks -/xml/System.Reflection.Metadata**/** @tmat @nguerrera +/xml/System.Reflection.Metadata**/** @tmat /xml/System.Resources**/** @buyaa-n @tarekgh @krwq /xml/System.Runtime**/** @bartonjs @joperezr /xml/System.Runtime.Caching**/** @StephenMolloy @HongGit /xml/System.Runtime.CompilerServices**/** @Anipik @steveharter /xml/System.Runtime.InteropServices**/** @AaronRobinsonMSFT @jkoritzinsky -/xml/System.Runtime.Intrinsics**/** @tannergooding @CarolEidt @RussKeldorph +/xml/System.Runtime.Intrinsics**/** @tannergooding @CarolEidt @echesakovMSFT /xml/System.Security**/** @bartonjs @GrabYourPitchforks @krwq -/xml/System.ServiceModel.Syndication**/** @StephenMolloy @HongGit @mconnew +/xml/System.ServiceModel**/** @HongGit @mcconnew StephenMolloy /xml/System.ServiceProcess**/** @Anipik /xml/System.Text**/** @tarekgh @GrabYourPitchforks /xml/System.Text/Encoding*.xml @layomia @krwq @tarekgh diff --git a/xml/System.Data.SqlClient/SqlCredential.xml b/xml/System.Data.SqlClient/SqlCredential.xml index 3e56fd07e63..f24325de2fe 100644 --- a/xml/System.Data.SqlClient/SqlCredential.xml +++ b/xml/System.Data.SqlClient/SqlCredential.xml @@ -40,7 +40,7 @@ to get or set a connection's object. Use to change the password for a object. For information on how a object affects connection pool behavior, see [SQL Server Connection Pooling (ADO.NET)](~/docs/framework/data/adonet/sql-server-connection-pooling.md). + Use to get or set a connection's object. Use to change the password for a user via an object. For information on how a object affects connection pool behavior, see [SQL Server Connection Pooling (ADO.NET)](~/docs/framework/data/adonet/sql-server-connection-pooling.md). An exception will be raised if a non-null object is used in a connection with any of the following connection string keywords: diff --git a/xml/System.Linq/Enumerable.xml b/xml/System.Linq/Enumerable.xml index 30d2005c09b..3586a49deb4 100644 --- a/xml/System.Linq/Enumerable.xml +++ b/xml/System.Linq/Enumerable.xml @@ -2179,9 +2179,9 @@ Dim doubles = From item As Integer In sequence ## Examples The following code example demonstrates how to use to determine whether an array contains a specific element. - - [!code-csharp[System.Linq.Enumerable#21](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs#21)] - [!code-vb[System.Linq.Enumerable#21](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb#21)] + + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs" interactive="try-dotnet-method" id="Snippet21"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb" id="Snippet21"::: ]]> @@ -9331,14 +9331,14 @@ Only unique elements are returned. ## Examples The following code example demonstrates how to use to select the only element of an array. - - [!code-csharp[System.Linq.Enumerable#79](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs#79)] - [!code-vb[System.Linq.Enumerable#79](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb#79)] + + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs" interactive="try-dotnet-method" id="Snippet79"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb" id="Snippet79"::: The following code example demonstrates that throws an exception when the sequence does not contain exactly one element. - [!code-csharp[System.Linq.Enumerable#80](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs#80)] - [!code-vb[System.Linq.Enumerable#80](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb#80)] + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs" interactive="try-dotnet-method" id="Snippet80"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb" id="Snippet80"::: ]]> @@ -9405,14 +9405,15 @@ Only unique elements are returned. ## Examples The following code example demonstrates how to use to select the only element of an array that satisfies a condition. - - [!code-csharp[System.Linq.Enumerable#81](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs#81)] - [!code-vb[System.Linq.Enumerable#81](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb#81)] - + + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs" interactive="try-dotnet-method" id="Snippet81"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb" id="Snippet81"::: + The following code example demonstrates that throws an exception when the sequence does not contain exactly one element that satisfies the condition. - + [!code-csharp[System.Linq.Enumerable#82](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs#82)] - [!code-vb[System.Linq.Enumerable#82](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb#82)] + [!code-vb[System.Linq.Enumerable#82](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb#82)] + ]]> @@ -9495,18 +9496,18 @@ Only unique elements are returned. ## Examples The following code example demonstrates how to use to select the only element of an array. - [!code-csharp[System.Linq.Enumerable#83](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs#83)] - [!code-vb[System.Linq.Enumerable#83](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb#83)] + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs" interactive="try-dotnet-method" id="Snippet83"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb" id="Snippet83"::: The following code example demonstrates that returns a default value when the sequence does not contain exactly one element. - [!code-csharp[System.Linq.Enumerable#84](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs#84)] - [!code-vb[System.Linq.Enumerable#84](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb#84)] + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs" interactive="try-dotnet-method" id="Snippet84"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb" id="Snippet84"::: Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the element. The following code example uses both techniques to obtain a default value of 1 if a collection of page numbers is empty. Because the default value for an integer is 0, which is not usually a valid page number, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query has finished executing. The second result variable is obtained by using to specify a default value of 1. - - [!code-csharp[System.Linq.Enumerable#128](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs#128)] - [!code-vb[System.Linq.Enumerable#128](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb#128)] + + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs" interactive="try-dotnet-method" id="Snippet128"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb" id="Snippet128"::: ]]> @@ -9569,9 +9570,9 @@ Only unique elements are returned. ## Examples The following code example demonstrates how to use to select the only element of an array that satisfies a condition. - - [!code-csharp[System.Linq.Enumerable#85](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs#85)] - [!code-vb[System.Linq.Enumerable#85](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb#85)] + + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs" interactive="try-dotnet-method" id="Snippet85"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb" id="Snippet85"::: The following code example demonstrates that returns a default value when the sequence does not contain exactly one element that satisfies the condition. diff --git a/xml/System.Threading.Tasks/TaskFactory.xml b/xml/System.Threading.Tasks/TaskFactory.xml index fd6b48c64fa..13e0839bc7e 100644 --- a/xml/System.Threading.Tasks/TaskFactory.xml +++ b/xml/System.Threading.Tasks/TaskFactory.xml @@ -3318,7 +3318,7 @@ The NotOn\* and OnlyOn\* , - The type of the result available through the . + The type of the result available through the task. The IAsyncResult whose completion should trigger the processing of the . The function delegate that processes the completed . Creates a that executes an end method function when a specified completes. @@ -3386,7 +3386,7 @@ The NotOn\* and OnlyOn\* , - The type of the result available through the . + The type of the result available through the task. The delegate that begins the asynchronous operation. The delegate that ends the asynchronous operation. An object containing data to be used by the delegate. @@ -3452,7 +3452,7 @@ The NotOn\* and OnlyOn\* , - The type of the result available through the . + The type of the result available through the task. The IAsyncResult whose completion should trigger the processing of the . The function delegate that processes the completed . The TaskCreationOptions value that controls the behavior of the created . @@ -3523,7 +3523,7 @@ The NotOn\* and OnlyOn\* , - The type of the result available through the . + The type of the result available through the task. The delegate that begins the asynchronous operation. The delegate that ends the asynchronous operation. An object containing data to be used by the delegate. @@ -3593,7 +3593,7 @@ The NotOn\* and OnlyOn\* , - The type of the result available through the . + The type of the result available through the task. The IAsyncResult whose completion should trigger the processing of the . The function delegate that processes the completed . The TaskCreationOptions value that controls the behavior of the created . @@ -3819,7 +3819,7 @@ The NotOn\* and OnlyOn\* , The type of the first argument passed to the delegate. - The type of the result available through the . + The type of the result available through the task. The delegate that begins the asynchronous operation. The delegate that ends the asynchronous operation. The first argument passed to the delegate. @@ -3890,7 +3890,7 @@ The NotOn\* and OnlyOn\* , The type of the first argument passed to the delegate. - The type of the result available through the . + The type of the result available through the task. The delegate that begins the asynchronous operation. The delegate that ends the asynchronous operation. The first argument passed to the delegate. @@ -4122,7 +4122,7 @@ The NotOn\* and OnlyOn\* , The type of the second argument passed to delegate. The type of the first argument passed to the delegate. - The type of the result available through the . + The type of the result available through the task. The delegate that begins the asynchronous operation. The delegate that ends the asynchronous operation. The first argument passed to the delegate. @@ -4197,7 +4197,7 @@ The NotOn\* and OnlyOn\* , The type of the second argument passed to delegate. The type of the first argument passed to the delegate. - The type of the result available through the . + The type of the result available through the task. The delegate that begins the asynchronous operation. The delegate that ends the asynchronous operation. The first argument passed to the delegate. @@ -4277,7 +4277,7 @@ The NotOn\* and OnlyOn\* , The type of the second argument passed to delegate. The type of the third argument passed to delegate. The type of the first argument passed to the delegate. - The type of the result available through the . + The type of the result available through the task. The delegate that begins the asynchronous operation. The delegate that ends the asynchronous operation. The first argument passed to the delegate. @@ -4356,7 +4356,7 @@ The NotOn\* and OnlyOn\* , The type of the second argument passed to delegate. The type of the third argument passed to delegate. The type of the first argument passed to the delegate. - The type of the result available through the . + The type of the result available through the task. The delegate that begins the asynchronous operation. The delegate that ends the asynchronous operation. The first argument passed to the delegate. @@ -4443,7 +4443,7 @@ The NotOn\* and OnlyOn\* , 4.0.10.0 - Creates and starts a . + Creates and starts a task. , The action delegate to execute asynchronously. - Creates and starts a task. + Creates and starts a task for the specified action delegate. The started task. , The action delegate to execute asynchronously. - The that will be assigned to the new task. - Creates and starts a . - The started . + The cancellation token that will be assigned to the new task. + Creates and starts a task for the specified action delegate and cancellation token. + The started task. , The action delegate to execute asynchronously. - A TaskCreationOptions value that controls the behavior of the created - Creates and starts a . - The started . + One of the enumeration values that controls the behavior of the created task> + Creates and starts a task for the specified action delegate and creation options. + The started task. , The action delegate to execute asynchronously. An object containing data to be used by the delegate. - Creates and starts a . - The started . + Creates and starts a task for the specified action delegate and state. + The started task. , The action delegate to execute asynchronously. An object containing data to be used by the delegate. - The that will be assigned to the new - Creates and starts a . - The started . + The cancellation token that will be assigned to the new task. + Creates and starts a task for the specified action delegate, state and cancellation token. + The started task. , The action delegate to execute asynchronously. An object containing data to be used by the delegate. - A TaskCreationOptions value that controls the behavior of the created - Creates and starts a . - The started . + One of the enumeration values that controls the behavior of the created task. + Creates and starts a task for the specified action delegate, state and creation options. + The started task. , The action delegate to execute asynchronously. - The that will be assigned to the new - A TaskCreationOptions value that controls the behavior of the created - The that is used to schedule the created . - Creates and starts a . - The started . + The cancellation token that will be assigned to the new task. + One of the enumeration values that controls the behavior of the created task. + The task scheduler that is used to schedule the created task. + Creates and starts a task for the specified action delegate, cancellation token, creation options and state. + The started task. , The action delegate to execute asynchronously. An object containing data to be used by the delegate. - The that will be assigned to the new task. - A TaskCreationOptions value that controls the behavior of the created - The that is used to schedule the created . - Creates and starts a . - The started . + The cancellation token that will be assigned to the new task. + One of the enumeration values that controls the behavior of the created task. + The task scheduler that is used to schedule the created task. + Creates and starts a task for the specified action delegate, state, cancellation token, creation options and task scheduler. + The started task. , - The type of the result available through the . - A function delegate that returns the future result to be available through the . - Creates and starts a . - The started . + The type of the result available through the task. + A function delegate that returns the future result to be available through the task. + Creates and starts a task of type for the specified function delegate. + The started task. , - The type of the result available through the . - A function delegate that returns the future result to be available through the . + The type of the result available through the task. + A function delegate that returns the future result to be available through the task. An object containing data to be used by the delegate. - Creates and starts a . - The started . + Creates and starts a task of type for the specified function delegate and state. + The started task. , - The type of the result available through the . - A function delegate that returns the future result to be available through the . - The that will be assigned to the new - Creates and starts a . - The started . + The type of the result available through the task. + A function delegate that returns the future result to be available through the task. + The cancellation token that will be assigned to the new task. + Creates and starts a task of type for the specified function delegate and cancellation token. + The started task. , - The type of the result available through the . - A function delegate that returns the future result to be available through the . - A TaskCreationOptions value that controls the behavior of the created . - Creates and starts a . - The started . + The type of the result available through the task. + A function delegate that returns the future result to be available through the task. + One of the enumeration values that controls the behavior of the created task. + Creates and starts a task of type for the specified function delegate and creation options. + The started task. , - The type of the result available through the . - A function delegate that returns the future result to be available through the . + The type of the result available through the task. + A function delegate that returns the future result to be available through the task. An object containing data to be used by the delegate. - The that will be assigned to the new - Creates and starts a . - The started . + The cancellation token that will be assigned to the new task. + Creates and starts a task of type for the specified function delegate, state and cancellation token. + The started task. , - The type of the result available through the . - A function delegate that returns the future result to be available through the . + The type of the result available through the task. + A function delegate that returns the future result to be available through the task. An object containing data to be used by the delegate. - A TaskCreationOptions value that controls the behavior of the created . - Creates and starts a . - The started . + One of the enumeration values that controls the behavior of the created task. + Creates and starts a task of type for the specified function delegate, state and creation options. + The started task. , - The type of the result available through the . - A function delegate that returns the future result to be available through the . - The that will be assigned to the new task. - A TaskCreationOptions value that controls the behavior of the created . - The that is used to schedule the created . - Creates and starts a . - The started . + The type of the result available through the task. + A function delegate that returns the future result to be available through the task. + The cancellation token that will be assigned to the new task. + One of the enumeration values that controls the behavior of the created task. + The task scheduler that is used to schedule the created task. + Creates and starts a task of type for the specified function delegate, cancellation token, creation options and task scheduler. + The started task. , - The type of the result available through the . - A function delegate that returns the future result to be available through the . + The type of the result available through the task. + A function delegate that returns the future result to be available through the task. An object containing data to be used by the delegate. - The that will be assigned to the new task. - A TaskCreationOptions value that controls the behavior of the created . - The that is used to schedule the created . - Creates and starts a . - The started . + The cancellation token that will be assigned to the new task. + One of the enumeration values that controls the behavior of the created task. + The task scheduler that is used to schedule the created task. + Creates and starts a task of type for the specified function delegate, state, cancellation token, creation options and task scheduler. + The started task. + @@ -41,14 +41,32 @@ - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + + to set the initial state to signaled if the named event is created as a result of this call; to set it to non-signaled. + One of the enum values that determines whether the event resets automatically or manually. + The name, if the event is to be shared with other processes; otherwise, or an empty string. + When this method returns, this argument is always set to if a local event is created; that is, when is or . If has a valid, non-empty value, this argument is set to when the system event is created, or it is set to if an existing system event is found with that name. + The optional Windows access control security to apply. + Gets or creates an instance, allowing a instance to be optionally specified to set it during the event creation. + An object that represents an event wait handle as requested. + + , a new process-local event is created. + + ]]> + + .NET Framework only: The length is beyond MAX_PATH (260 characters). + +-or- + +.NET Framework only: The enum value was out of legal range. + The enum value was out of legal range. + Could not find a part of the path specified in . + A system-wide synchronization event with the provided was not found. + -or- An with system-wide name cannot be created. An of a different type might have the same name. diff --git a/xml/System.Threading/MutexAcl.xml b/xml/System.Threading/MutexAcl.xml index c4d89ce2676..1d8c0f8214e 100644 --- a/xml/System.Threading/MutexAcl.xml +++ b/xml/System.Threading/MutexAcl.xml @@ -1,4 +1,4 @@ - + @@ -40,13 +40,16 @@ - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + + to give the calling thread initial ownership of the named system mutex if the named system mutex is created as a result of this call; otherwise, . + The optional name of the system mutex. If this argument is set to or , a local mutex is created. + When this method returns, this argument is always set to if a local mutex is created; that is, when is or . If has a valid non-empty value, this argument is set to when the system mutex is created, or it is set to if an existing system mutex is found with that name. This parameter is passed uninitialized. + The optional mutex access control security to apply. + Gets or creates instance, allowing a to be optionally specified to set it during the mutex creation. + An object that represents a system mutex, if named, or a local mutex, if nameless. To be added. + .NET Framework only: The length of the name exceeds the maximum limit. + A mutex handle with system-wide cannot be created. A mutex handle of a different type might have the same name. diff --git a/xml/System.Threading/SemaphoreAcl.xml b/xml/System.Threading/SemaphoreAcl.xml index e77c358bcc0..1051097fffc 100644 --- a/xml/System.Threading/SemaphoreAcl.xml +++ b/xml/System.Threading/SemaphoreAcl.xml @@ -1,4 +1,4 @@ - + @@ -41,14 +41,22 @@ - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The initial number of requests for the semaphore that can be satisfied concurrently. + The maximum number of requests for the semaphore that can be satisfied concurrently. + Optional argument to create a system semaphore. Set to or to create a local semaphore. + When this method returns, this argument is always set to if a local semaphore is created; that is, when is or . If has a valid, non-empty value, this argument is set to when the system semaphore is created, or it is set to if an existing system semaphore is found with that name. This parameter is passed uninitialized. + The optional semaphore access control security to apply. + Gets or creates an instance, allowing a instance to be optionally specified to set it during the event creation. + An object that represents a system semaphore, if named, or a local semaphore, if nameless. To be added. + + is a negative number. + -or- + + is not a positive number. + + is greater than . + A semaphore handle with the system-wide name '' cannot be created. A semaphore handle of a different type might have the same name. diff --git a/xml/System/Object.xml b/xml/System/Object.xml index ce33738f25e..0eb0e9ca5d4 100644 --- a/xml/System/Object.xml +++ b/xml/System/Object.xml @@ -780,17 +780,17 @@ and the interface. The . 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-csharp-interactive[System.Object.GetType#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.object.gettype/cs/gettype1.cs#1)] - [!code-vb[System.Object.GetType#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.object.gettype/vb/gettype1.vb#1)] - + + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.object.gettype/cs/gettype1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.object.gettype/vb/gettype1.vb" id="Snippet1"::: + > [!NOTE] > To determine whether an object is a specific type, you can use your language's type comparison keyword or construct. For example, you can use the `TypeOf…Is` construct in Visual Basic or the `is` keyword in C#. 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-csharp-interactive[System.Object.GetType#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.object.gettype/cs/GetTypeEx2.cs#2)] - [!code-vb[System.Object.GetType#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.object.gettype/vb/GetTypeEx2.vb#2)] + + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.object.gettype/cs/GetTypeEx2.cs" interactive="try-dotnet-method" id="Snippet2"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.object.gettype/vb/GetTypeEx2.vb" id="Snippet2"::: The object exposes the metadata associated with the class of the current . @@ -799,10 +799,10 @@ and the interface. The returns the runtime type of the current instance. - - [!code-cpp[ECMA-System.Object.GetType#1](~/samples/snippets/cpp/VS_Snippets_CLR/ECMA-System.Object.GetType/CPP/gettype.cpp#1)] - [!code-csharp[ECMA-System.Object.GetType#1](~/samples/snippets/csharp/VS_Snippets_CLR/ECMA-System.Object.GetType/CS/gettype.cs#1)] - [!code-vb[ECMA-System.Object.GetType#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/ECMA-System.Object.GetType/VB/gettype.vb#1)] + + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/ECMA-System.Object.GetType/CPP/gettype.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/ECMA-System.Object.GetType/CS/gettype.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/ECMA-System.Object.GetType/VB/gettype.vb" id="Snippet1"::: ]]> diff --git a/xml/System/String.xml b/xml/System/String.xml index a6da6842a09..db3adce5b8a 100644 --- a/xml/System/String.xml +++ b/xml/System/String.xml @@ -1384,18 +1384,18 @@ Examples of instantiating strings: This property returns the object at the position specified by the `index` parameter. However, a Unicode character might be represented by more than one . Use the class to work with Unicode characters instead of objects. For more information, see the "Char Objects and Unicode Characters" section in the class overview. 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-csharp[System.String.Chars#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.string.chars/cs/chars1.cs#1)] - [!code-vb[System.String.Chars#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.string.chars/vb/chars1.vb#1)] - + + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.string.chars/cs/chars1.cs" interactive="try-dotnet-method" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.string.chars/vb/chars1.vb" id="Snippet1"::: + ## Examples The following example demonstrates how you can use this indexer in a routine to validate a string. - [!code-cpp[Uri_IsHexDigit#1](~/samples/snippets/cpp/VS_Snippets_CLR/Uri_IsHexDigit/CPP/uri_ishexdigit.cpp#1)] - [!code-csharp[Uri_IsHexDigit#1](~/samples/snippets/csharp/VS_Snippets_CLR/Uri_IsHexDigit/CS/uri_ishexdigit.cs#1)] - [!code-vb[Uri_IsHexDigit#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/Uri_IsHexDigit/VB/uri_ishexdigit.vb#1)] + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/Uri_IsHexDigit/CPP/uri_ishexdigit.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/Uri_IsHexDigit/CS/uri_ishexdigit.cs" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/Uri_IsHexDigit/VB/uri_ishexdigit.vb" id="Snippet1"::: ]]> @@ -2801,9 +2801,9 @@ Examples of instantiating strings: ## Examples The following example performs and ordinal comparison of two strings that only differ in case. - [!code-cpp[string.compareordinal#1](~/samples/snippets/cpp/VS_Snippets_CLR/string.compareordinal/CPP/comp0.cpp#1)] - [!code-csharp[string.compareordinal#1](~/samples/snippets/csharp/VS_Snippets_CLR/string.compareordinal/CS/comp0.cs#1)] - [!code-vb[string.compareordinal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/string.compareordinal/VB/comp0.vb#1)] + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/string.compareordinal/CPP/comp0.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/string.compareordinal/CS/comp0.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/string.compareordinal/VB/comp0.vb" id="Snippet1"::: ]]> @@ -2904,9 +2904,9 @@ Examples of instantiating strings: ## Examples This following example demonstrates that and use different sort orders. - [!code-cpp[StringCompareOrdinal#1](~/samples/snippets/cpp/VS_Snippets_CLR/StringCompareOrdinal/CPP/stringcompareordinal.cpp#1)] - [!code-csharp[StringCompareOrdinal#1](~/samples/snippets/csharp/VS_Snippets_CLR/StringCompareOrdinal/CS/stringcompareordinal.cs#1)] - [!code-vb[StringCompareOrdinal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/StringCompareOrdinal/VB/stringcompareordinal.vb#1)] + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/StringCompareOrdinal/CPP/stringcompareordinal.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/StringCompareOrdinal/CS/stringcompareordinal.cs" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/StringCompareOrdinal/VB/stringcompareordinal.vb" id="Snippet1"::: ]]> @@ -4912,9 +4912,9 @@ Invalid sequences are represented in the enumeration by method. - [!code-cpp[string.equals#1](~/samples/snippets/cpp/VS_Snippets_CLR/string.equals/CPP/equals.cpp#1)] - [!code-csharp[string.equals#1](~/samples/snippets/csharp/VS_Snippets_CLR/string.equals/CS/equals.cs#1)] - [!code-vb[string.equals#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/string.equals/VB/equals.vb#1)] + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/string.equals/CPP/equals.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/string.equals/CS/equals.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/string.equals/VB/equals.vb" id="Snippet1"::: ]]> @@ -5056,9 +5056,9 @@ Invalid sequences are represented in the enumeration by method. - [!code-cpp[string.equals#1](~/samples/snippets/cpp/VS_Snippets_CLR/string.equals/CPP/equals.cpp#1)] - [!code-csharp[string.equals#1](~/samples/snippets/csharp/VS_Snippets_CLR/string.equals/CS/equals.cs#1)] - [!code-vb[string.equals#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/string.equals/VB/equals.vb#1)] + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/string.equals/CPP/equals.cpp" id="Snippet1"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/string.equals/CS/equals.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/string.equals/VB/equals.vb" id="Snippet1"::: ]]> @@ -5129,8 +5129,8 @@ Invalid sequences are represented in the enumeration by enumeration. The comparisons use the conventions of the English (United States) and Sami (Upper Sweden) cultures. Note that the strings "encyclopædia" and "encyclopaedia" are considered equivalent in the en-US culture but not in the Sami (Northern Sweden) culture. - [!code-csharp[System.String.Equals#4](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.string.equals/cs/equals_ex4.cs#4)] - [!code-vb[System.String.Equals#4](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.string.equals/vb/equals_ex4.vb#4)] + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.string.equals/cs/equals_ex4.cs" interactive="try-dotnet" id="Snippet4"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.string.equals/vb/equals_ex4.vb" id="Snippet4"::: ]]> @@ -5200,8 +5200,8 @@ Invalid sequences are represented in the enumeration by enumeration. The comparisons use the conventions of the English (United States) and Sami (Upper Sweden) cultures. Note that the strings "encyclopædia" and "encyclopaedia" are considered equivalent in the en-US culture but not in the Sami (Northern Sweden) culture. - [!code-csharp[System.String.Equals#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.string.equals/cs/equals_ex3.cs#3)] - [!code-vb[System.String.Equals#3](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.string.equals/vb/equals_ex3.vb#3)] + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.string.equals/cs/equals_ex3.cs" interactive="try-dotnet" id="Snippet3"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.string.equals/vb/equals_ex3.vb" id="Snippet3"::: ]]> @@ -7734,8 +7734,8 @@ The `comparisonType` parameter is a enumeration m ## Examples The following example inserts a space character in the fourth character position (the character at index 3) of a string. - [!code-csharp[System.String.Insert#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/System.String.Insert/cs/Insert1.cs#1)] - [!code-vb[System.String.Insert#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.String.Insert/vb/Insert1.vb#1)] + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.String.Insert/cs/Insert1.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.String.Insert/vb/Insert1.vb" id="Snippet1"::: The following console application prompts the users to enter one or more adjectives to describe two animals. It then calls the method to insert the text entered by the user into a string. @@ -12097,9 +12097,9 @@ 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-cpp[stringstartswith#1](~/samples/snippets/cpp/VS_Snippets_CLR/stringstartswith/CPP/stringstartswith.cpp#1)] -[!code-csharp[stringstartswith#1](~/samples/snippets/csharp/VS_Snippets_CLR/stringstartswith/CS/stringstartswith.cs#1)] -[!code-vb[stringstartswith#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/stringstartswith/VB/stringstartswith.vb#1)] +:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/stringstartswith/CPP/stringstartswith.cpp" id="Snippet1"::: +:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/stringstartswith/CS/stringstartswith.cs" interactive="try-dotnet" id="Snippet1"::: +:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/stringstartswith/VB/stringstartswith.vb" id="Snippet1"::: ]]> @@ -12173,9 +12173,9 @@ The following example defines a `StripStartTags` method that uses 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-cpp[System.String.StartsWith#2](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.string.startswith/cpp/StartsWith2.cpp#2)] - [!code-csharp[System.String.StartsWith#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.string.startswith/cs/StartsWith2.cs#2)] - [!code-vb[System.String.StartsWith#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.string.startswith/vb/StartsWith2.vb#2)] + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.string.startswith/cpp/StartsWith2.cpp" id="Snippet2"::: + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.string.startswith/cs/StartsWith2.cs" interactive="try-dotnet" id="Snippet2"::: + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.string.startswith/vb/StartsWith2.vb" id="Snippet2"::: The following example determines whether a string starts with a particular substring. It initializes a two-dimensional string array. The first element in the second dimension contains a string, and the second element contains the string to search for at the start of the first string. The results are affected by the choice of culture, whether case is ignored, and whether an ordinal comparison is performed. Note that when the string instance contains a ligature, culture-sensitive comparisons with its consecutive characters successfully match. @@ -14922,8 +14922,8 @@ The `TrimStart(System.Char[])` method removes from the current string all leadin The following example demonstrates the basic functionality of the method: -[!code-csharp[System.String.TrimStart#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.String.TrimStart/cs/sample.cs#1)] -[!code-vb[System.String.TrimStart#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.String.TrimStart/vb/sample.vb#1)] +:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.String.TrimStart/cs/sample.cs" id="Snippet1"::: +:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.String.TrimStart/vb/sample.vb" id="Snippet1"::: The following example uses the method to trim white space and comment characters from lines of source code. The `StripComments` method wraps a call to and passes it a character array that contains a space and the comment character, which is an apostrophe ( ' ) in Visual Basic and a slash ( / ) in C#. The method is also called to remove leading white space when evaluating whether a string is a comment.