Skip to content

Commit 6c244c0

Browse files
committed
Revert "Make the example more interesting and show what each property returns. (dotnet#4388)"
This reverts commit b525f0a.
1 parent c69b0c6 commit 6c244c0

File tree

1 file changed

+3
-43
lines changed
  • samples/snippets/csharp/VS_Snippets_Remoting/Classic Uri Example/CS

1 file changed

+3
-43
lines changed

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

Lines changed: 3 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -7,50 +7,10 @@ public class Form1: Form
77
{
88
protected void Method()
99
{
10-
Uri uri = new Uri("https://user:password@www.contoso.com: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);
10+
// <Snippet1>
11+
Uri siteUri = new Uri("http://www.contoso.com/");
3212

33-
// AbsolutePath: /Home/Index.htm
34-
// AbsoluteUri: https://user:password@www.contoso.com: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:password@www.contoso.com: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
13+
WebRequest wr = WebRequest.Create(siteUri);
5414

5515
// </Snippet1>
5616
}

0 commit comments

Comments
 (0)