Skip to content

Merge master into live #4443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 26, 2020
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
Expand Up @@ -7,10 +7,50 @@ public class Form1: Form
{
protected void Method()
{
// <Snippet1>
Uri siteUri = new Uri("http://www.contoso.com/");
Uri uri = new Uri("https://user:password@www.contoso.com:80/Home/Index.htm?q1=v1&q2=v2#FragmentName");
Console.WriteLine("AbsolutePath: {0}", uri.AbsolutePath);
Console.WriteLine("AbsoluteUri: {0}", uri.AbsoluteUri);
Console.WriteLine("DnsSafeHost: {0}", uri.DnsSafeHost);
Console.WriteLine("Fragment: {0}", uri.Fragment);
Console.WriteLine("Host: {0}", uri.Host);
Console.WriteLine("HostNameType: {0}", uri.HostNameType);
Console.WriteLine("IdnHost: {0}", uri.IdnHost);
Console.WriteLine("IsAbsoluteUri: {0}", uri.IsAbsoluteUri);
Console.WriteLine("IsDefaultPort: {0}", uri.IsDefaultPort);
Console.WriteLine("IsFile: {0}", uri.IsFile);
Console.WriteLine("IsLoopback: {0}", uri.IsLoopback);
Console.WriteLine("IsUnc: {0}", uri.IsUnc);
Console.WriteLine("LocalPath: {0}", uri.LocalPath);
Console.WriteLine("OriginalString: {0}", uri.OriginalString);
Console.WriteLine("PathAndQuery: {0}", uri.PathAndQuery);
Console.WriteLine("Port: {0}", uri.Port);
Console.WriteLine("Query: {0}", uri.Query);
Console.WriteLine("Scheme: {0}", uri.Scheme);
Console.WriteLine("Segments: {0}", string.Join(", ", uri.Segments));
Console.WriteLine("UserEscaped: {0}", uri.UserEscaped);
Console.WriteLine("UserInfo: {0}", uri.UserInfo);

WebRequest wr = WebRequest.Create(siteUri);
// AbsolutePath: /Home/Index.htm
// AbsoluteUri: https://user:password@www.contoso.com:80/Home/Index.htm?q1=v1&q2=v2#FragmentName
// DnsSafeHost: www.contoso.com
// Fragment: #FragmentName
// Host: www.contoso.com
// HostNameType: Dns
// IdnHost: www.contoso.com
// IsAbsoluteUri: True
// IsDefaultPort: False
// IsFile: False
// IsLoopback: False
// IsUnc: False
// LocalPath: /Home/Index.htm
// OriginalString: https://user:password@www.contoso.com:80/Home/Index.htm?q1=v1&q2=v2#FragmentName
// PathAndQuery: /Home/Index.htm?q1=v1&q2=v2
// Port: 80
// Query: ?q1=v1&q2=v2
// Scheme: https
// Segments: /, Home/, Index.htm
// UserEscaped: False
// UserInfo: user:password

// </Snippet1>
}
Expand Down
1 change: 0 additions & 1 deletion xml/System/Array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3893,7 +3893,6 @@
<format type="text/markdown"><![CDATA[

## Remarks
[Visual Basic, C#]

The `foreach` statement of the C# language (`for each` in C++, `For Each` in Visual Basic) hides the complexity of the enumerators. Therefore, using `foreach` is recommended, instead of directly manipulating the enumerator.

Expand Down
30 changes: 11 additions & 19 deletions xml/System/Console.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1926,16 +1926,16 @@
<format type="text/markdown"><![CDATA[

## Remarks
This method can be used to reacquire the standard input stream after it has been changed by the <xref:System.Console.SetIn%2A> method.




This method can be used to reacquire the standard input stream after it has been changed by the <xref:System.Console.SetIn%2A> method.

## Examples
The following example illustrates the use of the `OpenStandardInput` property.

The following example illustrates the use of the `OpenStandardInput` method.

[!code-cpp[System.Console.OpenStandartInput#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Console.OpenStandartInput/CPP/decode.cpp#1)]
[!code-csharp[System.Console.OpenStandartInput#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Console.OpenStandartInput/CS/decode.cs#1)]
[!code-vb[System.Console.OpenStandartInput#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Console.OpenStandartInput/VB/decode.vb#1)]
[!code-cpp[System.Console.OpenStandartInput#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Console.OpenStandartInput/CPP/decode.cpp#1)]
[!code-csharp[System.Console.OpenStandartInput#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Console.OpenStandartInput/CS/decode.cs#1)]
[!code-vb[System.Console.OpenStandartInput#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Console.OpenStandartInput/VB/decode.vb#1)]

]]></format>
</remarks>
Expand Down Expand Up @@ -1985,17 +1985,9 @@
<format type="text/markdown"><![CDATA[

## Remarks
This method can be used to reacquire the standard output stream after it has been changed by the <xref:System.Console.SetIn%2A> method.



## Examples
The following example illustrates the use of the `OpenStandardInput` property.

[!code-cpp[System.Console.OpenStandartInput#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Console.OpenStandartInput/CPP/decode.cpp#1)]
[!code-csharp[System.Console.OpenStandartInput#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Console.OpenStandartInput/CS/decode.cs#1)]
[!code-vb[System.Console.OpenStandartInput#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Console.OpenStandartInput/VB/decode.vb#1)]


This method can be used to reacquire the standard output stream after it has been changed by the <xref:System.Console.SetIn%2A> method.

]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
Expand Down