Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// <Snippet1>
// <Snippet3>
using System;
using System.ComponentModel;
using System.IO;
Expand Down Expand Up @@ -56,7 +55,6 @@ static void Main()
var arguments = Console.ReadLine();
startInfo.Arguments = arguments;
}
// </Snippet4>

try
{
Expand All @@ -81,6 +79,7 @@ static void Main()
Console.WriteLine($"Unable to start '{fileName}' with verb {verbToUse}");
}
}
// </Snippet4>
}
else
{
Expand All @@ -90,5 +89,4 @@ static void Main()
}
}
}
// </Snippet3>
// </Snippet1>
6 changes: 4 additions & 2 deletions xml/Microsoft.CSharp/CSharpCodeProvider.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,18 @@
<format type="text/markdown"><![CDATA[

## Remarks

This class provides methods that can be used to retrieve instances of the C# <xref:System.CodeDom.Compiler.ICodeGenerator> and <xref:System.CodeDom.Compiler.ICodeCompiler> implementations.

> [!NOTE]
> This class contains a link demand and an inheritance demand at the class level that applies to all members. A <xref:System.Security.SecurityException> is thrown when either the immediate caller or the derived class does not have full-trust permission.



## Examples
The following example uses either the C# or Visual Basic code provider to compile a source file. The example checks the input file extension and uses the corresponding <xref:Microsoft.CSharp.CSharpCodeProvider> or <xref:Microsoft.VisualBasic.VBCodeProvider> for compilation. The input file is compiled into an executable file, and any compilation errors are displayed to the console.

> [!IMPORTANT]
> The `CompileAssemblyFrom*` methods aren't supported on .NET Core and .NET 5+. This example only runs on .NET Framework.

:::code language="csharp" source="~/snippets/csharp/Microsoft.CSharp/CSharpCodeProvider/Overview/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/CodeDom_CodeProviders/VB/source.vb" id="Snippet1":::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
<remarks>
<format type="text/markdown"><![CDATA[
> [!CAUTION]
> There may be transient states while the cache is full but blocks are being released on a background thread. In this state, unexpected behavior might occur if the cache is being overutilized.
> There might be transient states while the cache is full but blocks are being released on a background thread. In this state, unexpected behavior might occur if the cache is being overutilized.
]]></format>
</remarks>
</Docs>
Expand Down
18 changes: 9 additions & 9 deletions xml/System.CodeDom.Compiler/CodeDomProvider.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@

## Remarks

> [!NOTE]
> In the .NET Framework versions 1.0 and 1.1, this method is provided by the <xref:System.CodeDom.Compiler.ICodeCompiler> implementation that is returned by the <xref:System.CodeDom.Compiler.CodeDomProvider.CreateCompiler%2A> method of the provider. In version 2.0, this method can be called directly on the code provider even if it is not overridden by the code provider. If the code provider does not override this method, the <xref:System.CodeDom.Compiler.ICodeCompiler> implementation is called by the base class.
> [!IMPORTANT]
> On .NET Core and .NET 5+, calls to the `CodeDomProvider.CompileAssemblyFromDom` method throw a <xref:System.PlatformNotSupportedException>. Compile code is not supported.

> [!NOTE]
> On .NET Core and .NET 5+, calls to the `CodeDomProvider.CompileAssemblyFromDom` method throw a <xref:System.PlatformNotSupportedException>. Compile code is not supported.
> In .NET Framework 2.0 and later versions, this method can be called directly on the code provider even if it's not overridden by the code provider. If the code provider does not override this method, the <xref:System.CodeDom.Compiler.ICodeCompiler> implementation is called by the base class.

]]></format>
</remarks>
Expand Down Expand Up @@ -230,11 +230,11 @@

## Remarks

> [!NOTE]
> In the .NET Framework versions 1.0 and 1.1, this method is provided by the <xref:System.CodeDom.Compiler.ICodeCompiler> implementation that is returned by the <xref:System.CodeDom.Compiler.CodeDomProvider.CreateCompiler%2A> method of the provider. In version 2.0, this method can be called directly on the code provider even if it is not overridden by the code provider. If the code provider does not override this method, the <xref:System.CodeDom.Compiler.ICodeCompiler> implementation is called by the base class.
> [!IMPORTANT]
> On .NET Core and .NET 5+, calls to the `CodeDomProvider.CompileAssemblyFromFile` method throw a <xref:System.PlatformNotSupportedException>. Compile from file is not supported.

> [!NOTE]
> On .NET Core and .NET 5+, calls to the `CodeDomProvider.CompileAssemblyFromFile` method throw a <xref:System.PlatformNotSupportedException>. Compile from file is not supported.
> In .NET Framework 2.0 and later versions, this method can be called directly on the code provider even if it's not overridden by the code provider. If the code provider does not override this method, the <xref:System.CodeDom.Compiler.ICodeCompiler> implementation is called by the base class.

]]></format>
</remarks>
Expand Down Expand Up @@ -294,11 +294,11 @@

## Remarks

> [!NOTE]
> In the .NET Framework versions 1.0 and 1.1, this method is provided by the <xref:System.CodeDom.Compiler.ICodeCompiler> implementation that is returned by the <xref:System.CodeDom.Compiler.CodeDomProvider.CreateCompiler%2A> method of the provider. In version 2.0, this method can be called directly on the code provider even if it is not overridden by the code provider. If the code provider does not override this method, the <xref:System.CodeDom.Compiler.ICodeCompiler> implementation is called by the base class.
> [!IMPORTANT]
> On .NET Core and .NET 5+, calls to the `CodeDomProvider.CompileAssemblyFromSource` method throw a <xref:System.PlatformNotSupportedException>. Compile source code is not supported.

> [!NOTE]
> On .NET Core and .NET 5+, calls to the `CodeDomProvider.CompileAssemblyFromSource` method throw a <xref:System.PlatformNotSupportedException>. Compile source code is not supported.
> In .NET Framework 2.0 and later versions, this method can be called directly on the code provider even if it's not overridden by the code provider. If the code provider does not override this method, the <xref:System.CodeDom.Compiler.ICodeCompiler> implementation is called by the base class.

]]></format>
</remarks>
Expand Down
4 changes: 0 additions & 4 deletions xml/System.Collections/ArrayList.xml
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,6 @@ This method is an `O(1)` operation.

This method is an `O(log n)` operation, where `n` is <xref:System.Collections.ArrayList.Count%2A>.



## Examples
The following code example shows how to use <xref:System.Collections.ArrayList.BinarySearch%2A> to locate a specific object in the <xref:System.Collections.ArrayList>.

Expand Down Expand Up @@ -781,8 +779,6 @@ This method is an `O(1)` operation.

This method is an `O(log n)` operation, where `n` is <xref:System.Collections.ArrayList.Count%2A>.



## Examples
The following example creates an <xref:System.Collections.ArrayList> of colored animals. The provided <xref:System.Collections.IComparer> performs the string comparison for the binary search. The results of both an iterative search and a binary search are displayed.

Expand Down
9 changes: 6 additions & 3 deletions xml/System.Diagnostics/Process.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2660,16 +2660,19 @@ The calling process is a member of the associated process's descendant tree.</ex
</ReturnValue>
<Docs>
<summary>Gets the main module for the associated process.</summary>
<value>The <see cref="T:System.Diagnostics.ProcessModule" /> that was used to start the process.</value>
<value>The <see cref="T:System.Diagnostics.ProcessModule" /> that was used to start the process, or <see langword="null" /> if no main module was found.</value>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
A process module represents a.dll or .exe file that is loaded into a particular process. The <xref:System.Diagnostics.Process.MainModule%2A> property lets you view information about the executable used to start the process, including the module name, file name, and module memory details.

A process module represents a .dll or .exe file that's loaded into a particular process. The <xref:System.Diagnostics.Process.MainModule> property lets you view information about the executable used to start the process, including the module name, file name, and module memory details.

If no main module is found, it could be because the process hasn't finished loading the main module when the property is called.

]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">You are trying to access the <see cref="P:System.Diagnostics.Process.MainModule" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer.</exception>
<exception cref="T:System.NotSupportedException">You are trying to access the <see cref="P:System.Diagnostics.Process.MainModule" /> property for a process that's running on a remote computer. This property is available only for processes that are running on the local computer.</exception>
<exception cref="T:System.ComponentModel.Win32Exception">A 32-bit process is trying to access the modules of a 64-bit process.</exception>
<exception cref="T:System.InvalidOperationException">The process <see cref="P:System.Diagnostics.Process.Id" /> is not available.

Expand Down
9 changes: 3 additions & 6 deletions xml/System.Diagnostics/ProcessStartInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1958,11 +1958,10 @@ You can use asynchronous read operations to avoid these dependencies and their d
<format type="text/markdown"><![CDATA[

## Remarks
Each file name extension has its own set of verbs, which can be obtained by using the <xref:System.Diagnostics.ProcessStartInfo.Verbs%2A> property. For example, the "`print`" verb will print a document specified by using <xref:System.Diagnostics.ProcessStartInfo.FileName%2A>. The default verb can be specified by using an empty string (""). Examples of verbs are "Edit", "Open", "OpenAsReadOnly", "Print", and "Printto". You should use only verbs that appear in the set of verbs returned by the <xref:System.Diagnostics.ProcessStartInfo.Verbs%2A> property.

When you use the <xref:System.Diagnostics.ProcessStartInfo.Verb%2A> property, you must include the file name extension when you set the value of the <xref:System.Diagnostics.ProcessStartInfo.FileName%2A> property. The file name does not need to have an extension if you manually enter a value for the <xref:System.Diagnostics.ProcessStartInfo.Verb%2A> property.

Each file name extension has its own set of verbs, which can be obtained by using the <xref:System.Diagnostics.ProcessStartInfo.Verbs%2A> property. For example, the "`print`" verb prints a document specified by using <xref:System.Diagnostics.ProcessStartInfo.FileName%2A>. The default verb can be specified by using an empty string (""). Examples of verbs are "Edit", "Open", "OpenAsReadOnly", "Print", and "Printto". You should use only verbs that appear in the set of verbs returned by the <xref:System.Diagnostics.ProcessStartInfo.Verbs%2A> property.

When you use the <xref:System.Diagnostics.ProcessStartInfo.Verb%2A> property, you must include the file name extension when you set the value of the <xref:System.Diagnostics.ProcessStartInfo.FileName%2A> property. The file name does not need to have an extension if you manually enter a value for the <xref:System.Diagnostics.ProcessStartInfo.Verb%2A> property.

## Examples
The following code example starts a new process by using the specified verb and file name. This code example is part of a larger example provided for the <xref:System.Diagnostics.ProcessStartInfo.Verbs%2A> property.
Expand Down Expand Up @@ -2032,12 +2031,10 @@ You can use asynchronous read operations to avoid these dependencies and their d

When you use the <xref:System.Diagnostics.ProcessStartInfo.Verbs%2A> property, you must include the file name extension when you set the value of the <xref:System.Diagnostics.ProcessStartInfo.FileName%2A> property. The file name extension determines the set of possible verbs.



## Examples
The following code example displays the defined verbs for the chosen file name. If the user selects one of the defined verbs, the example starts a new process using the selected verb and the input file name.

:::code language="csharp" source="~/snippets/csharp/System.Diagnostics/ProcessStartInfo/Verb/source.cs" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Diagnostics/ProcessStartInfo/Verb/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ProcessVerbs_Diagnostics/VB/source.vb" id="Snippet3":::

]]></format>
Expand Down
3 changes: 2 additions & 1 deletion xml/System.Drawing/Size.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@
<format type="text/markdown"><![CDATA[

## Remarks
The <xref:System.Drawing.Size> class is used to specify a height and width through the <xref:System.Drawing.Rectangle.Size%2A> property for <xref:System.Drawing.Rectangle>, <xref:System.Drawing.RectangleF>, <xref:System.Drawing.Image>, <xref:System.Drawing.Icon> and other graphics classes. You can perform operations on a <xref:System.Drawing.Size> by using the overloaded operators such as <xref:System.Drawing.Size.op_Addition%2A>, <xref:System.Drawing.Size.op_Subtraction%2A>, and <xref:System.Drawing.Size.op_Equality%2A>. The unit for the <xref:System.Drawing.Size.Height%2A> and <xref:System.Drawing.Size.Width%2A> of the <xref:System.Drawing.Size> structure depend on the <xref:System.Drawing.Graphics.PageUnit%2A> and <xref:System.Drawing.Graphics.PageScale%2A> settings for the <xref:System.Drawing.Graphics> object that is used to draw.

The <xref:System.Drawing.Size> structure is used to specify a height and width through the <xref:System.Drawing.Rectangle.Size%2A> property for <xref:System.Drawing.Rectangle>, <xref:System.Drawing.RectangleF>, <xref:System.Drawing.Image>, <xref:System.Drawing.Icon> and other graphics classes. You can perform operations on a <xref:System.Drawing.Size> by using the overloaded operators such as <xref:System.Drawing.Size.op_Addition%2A>, <xref:System.Drawing.Size.op_Subtraction%2A>, and <xref:System.Drawing.Size.op_Equality%2A>. The unit for the <xref:System.Drawing.Size.Height%2A> and <xref:System.Drawing.Size.Width%2A> of the <xref:System.Drawing.Size> structure depend on the <xref:System.Drawing.Graphics.PageUnit%2A> and <xref:System.Drawing.Graphics.PageScale%2A> settings for the <xref:System.Drawing.Graphics> object that is used to draw.

]]></format>
</remarks>
Expand Down
2 changes: 1 addition & 1 deletion xml/System.IO/File.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5548,7 +5548,7 @@ The following example moves a file.
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Replaces the contents of a specified file with the contents of another file, deleting the original file, and creating a backup of the replaced file.</summary>
<summary>Replaces the contents of a specified file with the contents of another file, deleting the original file and creating a backup of the replaced file.</summary>
<remarks>
<format type="text/markdown"><![CDATA[

Expand Down
2 changes: 1 addition & 1 deletion xml/System.IO/Path.xml
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ The following example displays <xref:System.IO.Path> field values on Windows and

## Remarks

This method is intended to concatenate individual strings into a single string that represents a file path. However, if an argument other than the first contains a rooted path, any previous path components are ignored, and the returned string begins with that rooted path component. As an alternative to the `Combine` method, consider using the <xref:System.IO.Path.Join%2A> or <xref:System.IO.Path.TryJoin%2A> methods.
This method is intended to concatenate individual strings into a single string that represents a file path. However, if an argument other than the first contains a rooted path, any previous path components are ignored, and the returned string begins with that rooted path component. As an alternative to the `Combine` method, consider using the <xref:System.IO.Path.Join%2A> or <xref:System.IO.Path.TryJoin%2A> methods (not available in .NET Framework).

> [!IMPORTANT]
> This method assumes that the first argument is an absolute path and that the following argument or arguments are relative paths. If this is not the case, and particularly if any subsequent arguments are strings input by the user, call the <xref:System.IO.Path.Join%2A> or <xref:System.IO.Path.TryJoin%2A> method instead.
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Text.Json/JsonSerializerOptions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ Read-only fields are not deserialized regardless of this setting.
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether read-only properties are ignored during serialization. The default value is <see langword="false" />.</summary>
<summary>Gets or sets a value that indicates whether read-only properties are ignored during serialization. The default value is <see langword="false" />.</summary>
<value>
<see langword="true" /> if read-only properties are ignored during serialization; otherwise, <see langword="false" />.</value>
<remarks>
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Windows.Forms/ListView.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

If the <xref:System.Windows.Forms.ListView.LabelEdit%2A> property set to `true`, you can perform tasks such as validating the text being edited before and after the text changed by creating an event handler for the <xref:System.Windows.Forms.ListView.BeforeLabelEdit> and <xref:System.Windows.Forms.ListView.AfterLabelEdit> events. To perform tasks such as opening a file or displaying a dialog box to edit an item displayed in a <xref:System.Windows.Forms.ListView>, you can create an event handler for the <xref:System.Windows.Forms.ListView.ItemActivate> event. If you allow the user to sort the items in a <xref:System.Windows.Forms.ListView> when they click a column header, you can create an event handler for the <xref:System.Windows.Forms.ListView.ColumnClick> event to perform the sorting. When the <xref:System.Windows.Forms.ListView.CheckBoxes%2A> property is set to `true`, you can determine when a change in an item's check state has occurred by handling the <xref:System.Windows.Forms.ListView.ItemCheck> event.

You can also set a background image for the <xref:System.Windows.Forms.ListView> with the <xref:System.Windows.Forms.Control.BackgroundImage%2A> property. Your application must have the <xref:System.STAThreadAttribute> on its `Main` method to correctly display the background image for the <xref:System.Windows.Forms.ListView> control. In addition, if a <xref:System.Windows.Forms.ListView> control with a background image is hosted in Internet Explorer, specify comctl32.dll version 6.0 as a dependent assembly in the application manifest file to ensure the background image is property displayed.
You can also set a background image for the <xref:System.Windows.Forms.ListView> with the <xref:System.Windows.Forms.Control.BackgroundImage%2A> property. Your application must have the <xref:System.STAThreadAttribute> on its `Main` method to correctly display the background image for the <xref:System.Windows.Forms.ListView> control. In addition, if a <xref:System.Windows.Forms.ListView> control with a background image is hosted in Internet Explorer, specify comctl32.dll version 6.0 as a dependent assembly in the application manifest file to ensure the background image is properly displayed.

Windows XP and Windows Server 2003 provide three features that enhance the <xref:System.Windows.Forms.ListView> control when your application calls the <xref:System.Windows.Forms.Application.EnableVisualStyles%2A?displayProperty=nameWithType> method: tile view, grouping, and the insertion mark.

Expand Down
Loading