Skip to content

Commit abe4237

Browse files
authored
Merge pull request #4443 from dotnet/publish-2648
Merge master into live
2 parents c858ae5 + 5749e42 commit abe4237

File tree

3 files changed

+54
-23
lines changed

3 files changed

+54
-23
lines changed

samples/snippets/csharp/VS_Snippets_Remoting/Classic Uri Example/CS/source.cs

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,50 @@ public class Form1: Form
77
{
88
protected void Method()
99
{
10-
// <Snippet1>
11-
Uri siteUri = new Uri("http://www.contoso.com/");
10+
Uri uri = new Uri("https://user:[email protected]:80/Home/Index.htm?q1=v1&q2=v2#FragmentName");
11+
Console.WriteLine("AbsolutePath: {0}", uri.AbsolutePath);
12+
Console.WriteLine("AbsoluteUri: {0}", uri.AbsoluteUri);
13+
Console.WriteLine("DnsSafeHost: {0}", uri.DnsSafeHost);
14+
Console.WriteLine("Fragment: {0}", uri.Fragment);
15+
Console.WriteLine("Host: {0}", uri.Host);
16+
Console.WriteLine("HostNameType: {0}", uri.HostNameType);
17+
Console.WriteLine("IdnHost: {0}", uri.IdnHost);
18+
Console.WriteLine("IsAbsoluteUri: {0}", uri.IsAbsoluteUri);
19+
Console.WriteLine("IsDefaultPort: {0}", uri.IsDefaultPort);
20+
Console.WriteLine("IsFile: {0}", uri.IsFile);
21+
Console.WriteLine("IsLoopback: {0}", uri.IsLoopback);
22+
Console.WriteLine("IsUnc: {0}", uri.IsUnc);
23+
Console.WriteLine("LocalPath: {0}", uri.LocalPath);
24+
Console.WriteLine("OriginalString: {0}", uri.OriginalString);
25+
Console.WriteLine("PathAndQuery: {0}", uri.PathAndQuery);
26+
Console.WriteLine("Port: {0}", uri.Port);
27+
Console.WriteLine("Query: {0}", uri.Query);
28+
Console.WriteLine("Scheme: {0}", uri.Scheme);
29+
Console.WriteLine("Segments: {0}", string.Join(", ", uri.Segments));
30+
Console.WriteLine("UserEscaped: {0}", uri.UserEscaped);
31+
Console.WriteLine("UserInfo: {0}", uri.UserInfo);
1232

13-
WebRequest wr = WebRequest.Create(siteUri);
33+
// AbsolutePath: /Home/Index.htm
34+
// AbsoluteUri: https://user:[email protected]:80/Home/Index.htm?q1=v1&q2=v2#FragmentName
35+
// DnsSafeHost: www.contoso.com
36+
// Fragment: #FragmentName
37+
// Host: www.contoso.com
38+
// HostNameType: Dns
39+
// IdnHost: www.contoso.com
40+
// IsAbsoluteUri: True
41+
// IsDefaultPort: False
42+
// IsFile: False
43+
// IsLoopback: False
44+
// IsUnc: False
45+
// LocalPath: /Home/Index.htm
46+
// OriginalString: https://user:[email protected]:80/Home/Index.htm?q1=v1&q2=v2#FragmentName
47+
// PathAndQuery: /Home/Index.htm?q1=v1&q2=v2
48+
// Port: 80
49+
// Query: ?q1=v1&q2=v2
50+
// Scheme: https
51+
// Segments: /, Home/, Index.htm
52+
// UserEscaped: False
53+
// UserInfo: user:password
1454

1555
// </Snippet1>
1656
}

xml/System/Array.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3893,7 +3893,6 @@
38933893
<format type="text/markdown"><![CDATA[
38943894

38953895
## Remarks
3896-
[Visual Basic, C#]
38973896

38983897
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.
38993898

xml/System/Console.xml

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1926,16 +1926,16 @@
19261926
<format type="text/markdown"><![CDATA[
19271927
19281928
## Remarks
1929-
This method can be used to reacquire the standard input stream after it has been changed by the <xref:System.Console.SetIn%2A> method.
1930-
1931-
1932-
1929+
1930+
This method can be used to reacquire the standard input stream after it has been changed by the <xref:System.Console.SetIn%2A> method.
1931+
19331932
## Examples
1934-
The following example illustrates the use of the `OpenStandardInput` property.
1933+
1934+
The following example illustrates the use of the `OpenStandardInput` method.
19351935
1936-
[!code-cpp[System.Console.OpenStandartInput#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Console.OpenStandartInput/CPP/decode.cpp#1)]
1937-
[!code-csharp[System.Console.OpenStandartInput#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Console.OpenStandartInput/CS/decode.cs#1)]
1938-
[!code-vb[System.Console.OpenStandartInput#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Console.OpenStandartInput/VB/decode.vb#1)]
1936+
[!code-cpp[System.Console.OpenStandartInput#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Console.OpenStandartInput/CPP/decode.cpp#1)]
1937+
[!code-csharp[System.Console.OpenStandartInput#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Console.OpenStandartInput/CS/decode.cs#1)]
1938+
[!code-vb[System.Console.OpenStandartInput#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Console.OpenStandartInput/VB/decode.vb#1)]
19391939
19401940
]]></format>
19411941
</remarks>
@@ -1985,17 +1985,9 @@
19851985
<format type="text/markdown"><![CDATA[
19861986
19871987
## Remarks
1988-
This method can be used to reacquire the standard output stream after it has been changed by the <xref:System.Console.SetIn%2A> method.
1989-
1990-
1991-
1992-
## Examples
1993-
The following example illustrates the use of the `OpenStandardInput` property.
1994-
1995-
[!code-cpp[System.Console.OpenStandartInput#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Console.OpenStandartInput/CPP/decode.cpp#1)]
1996-
[!code-csharp[System.Console.OpenStandartInput#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Console.OpenStandartInput/CS/decode.cs#1)]
1997-
[!code-vb[System.Console.OpenStandartInput#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Console.OpenStandartInput/VB/decode.vb#1)]
1998-
1988+
1989+
This method can be used to reacquire the standard output stream after it has been changed by the <xref:System.Console.SetIn%2A> method.
1990+
19991991
]]></format>
20001992
</remarks>
20011993
<exception cref="T:System.ArgumentOutOfRangeException">

0 commit comments

Comments
 (0)