From 418da199ab2581655924fbeb424a90edb38dfdb6 Mon Sep 17 00:00:00 2001
From: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Date: Tue, 3 Jun 2025 12:19:04 -0700
Subject: [PATCH 1/2] delete C++ snippet refs from System.Net
---
xml/System.Net.Cache/HttpCacheAgeControl.xml | 23 +-
.../HttpRequestCacheLevel.xml | 35 +-
.../HttpRequestCachePolicy.xml | 361 ++++----
xml/System.Net.Cache/RequestCacheLevel.xml | 31 +-
xml/System.Net.Cache/RequestCachePolicy.xml | 129 ++-
xml/System.Net.Mail/Attachment.xml | 8 -
xml/System.Net.Mail/AttachmentCollection.xml | 41 +-
xml/System.Net.Mail/MailAddress.xml | 409 ++++-----
xml/System.Net.Mail/MailAddressCollection.xml | 62 +-
xml/System.Net.Mail/MailMessage.xml | 91 +-
.../SendCompletedEventHandler.xml | 23 +-
xml/System.Net.Mail/SmtpAccess.xml | 23 +-
xml/System.Net.Mail/SmtpClient.xml | 13 -
xml/System.Net.Mail/SmtpException.xml | 189 ++--
.../SmtpFailedRecipientsException.xml | 43 +-
xml/System.Net.Mail/SmtpStatusCode.xml | 1 -
xml/System.Net.Mime/ContentDisposition.xml | 358 ++++----
xml/System.Net.Mime/ContentType.xml | 289 +++---
xml/System.Net.Mime/DispositionTypeNames.xml | 53 +-
xml/System.Net.Mime/TransferEncoding.xml | 31 +-
.../DuplicateAddressDetectionState.xml | 27 +-
.../IPAddressInformation.xml | 93 +-
.../IPGlobalProperties.xml | 574 ++++++------
.../IPGlobalStatistics.xml | 546 ++++++-----
.../IPInterfaceProperties.xml | 290 +++---
.../IPStatus.xml | 29 +-
.../IPv4InterfaceProperties.xml | 212 +++--
.../IPv6InterfaceProperties.xml | 89 +-
.../IcmpV4Statistics.xml | 697 +++++++-------
.../IcmpV6Statistics.xml | 851 +++++++++---------
.../NetworkChange.xml | 66 +-
.../NetworkInformationAccess.xml | 23 +-
.../NetworkInterface.xml | 12 -
.../NetworkInterfaceComponent.xml | 23 +-
.../OperationalStatus.xml | 23 +-
.../PhysicalAddress.xml | 7 -
xml/System.Net.NetworkInformation/Ping.xml | 12 -
.../PingCompletedEventArgs.xml | 48 +-
.../PingCompletedEventHandler.xml | 23 +-
.../PingOptions.xml | 157 ++--
.../PingReply.xml | 170 ++--
.../PrefixOrigin.xml | 27 +-
.../SuffixOrigin.xml | 27 +-
.../TcpConnectionInformation.xml | 68 +-
.../TcpState.xml | 23 +-
.../TcpStatistics.xml | 369 ++++----
.../UdpStatistics.xml | 152 ++--
.../AuthenticationLevel.xml | 27 +-
.../LocalCertificateSelectionCallback.xml | 32 +-
.../RemoteCertificateValidationCallback.xml | 38 +-
xml/System.Net.Security/SslStream.xml | 34 -
xml/System.Net.Sockets/AddressFamily.xml | 23 +-
xml/System.Net.Sockets/IOControlCode.xml | 23 +-
.../IPv6MulticastOption.xml | 5 -
xml/System.Net.Sockets/LingerOption.xml | 163 ++--
xml/System.Net.Sockets/MulticastOption.xml | 5 -
xml/System.Net.Sockets/NetworkStream.xml | 5 -
xml/System.Net.Sockets/SelectMode.xml | 23 +-
xml/System.Net.Sockets/Socket.xml | 62 --
xml/System.Net.Sockets/SocketFlags.xml | 13 +-
xml/System.Net.Sockets/SocketOptionLevel.xml | 27 +-
xml/System.Net.Sockets/SocketOptionName.xml | 23 +-
xml/System.Net.Sockets/SocketType.xml | 27 +-
xml/System.Net.Sockets/TcpClient.xml | 20 -
xml/System.Net.Sockets/TcpListener.xml | 636 +++++++------
.../TransmitFileOptions.xml | 25 +-
xml/System.Net.Sockets/UdpClient.xml | 36 -
xml/System.Net/AuthenticationManager.xml | 243 +++--
xml/System.Net/Authorization.xml | 191 ++--
xml/System.Net/Cookie.xml | 15 -
xml/System.Net/CookieCollection.xml | 2 -
xml/System.Net/CredentialCache.xml | 8 -
xml/System.Net/Dns.xml | 664 +++++++-------
xml/System.Net/DnsPermission.xml | 208 ++---
.../DownloadDataCompletedEventArgs.xml | 57 +-
.../DownloadDataCompletedEventHandler.xml | 32 +-
.../DownloadProgressChangedEventArgs.xml | 3 -
.../DownloadProgressChangedEventHandler.xml | 1 -
.../DownloadStringCompletedEventArgs.xml | 57 +-
.../DownloadStringCompletedEventHandler.xml | 32 +-
xml/System.Net/FileWebRequest.xml | 401 ++++-----
xml/System.Net/FileWebResponse.xml | 212 +++--
xml/System.Net/FtpStatusCode.xml | 27 +-
xml/System.Net/FtpWebRequest.xml | 22 -
xml/System.Net/FtpWebResponse.xml | 319 ++++---
xml/System.Net/GlobalProxySelection.xml | 81 +-
xml/System.Net/HttpVersion.xml | 21 +-
xml/System.Net/HttpWebRequest.xml | 38 +-
xml/System.Net/HttpWebResponse.xml | 17 -
xml/System.Net/IAuthenticationModule.xml | 131 ++-
xml/System.Net/ICredentialPolicy.xml | 49 +-
xml/System.Net/ICredentials.xml | 48 +-
xml/System.Net/IPAddress.xml | 15 -
xml/System.Net/IPEndPoint.xml | 243 +++--
xml/System.Net/IPHostEntry.xml | 67 +-
xml/System.Net/IWebProxy.xml | 81 +-
xml/System.Net/NetworkCredential.xml | 8 +-
xml/System.Net/OpenReadCompletedEventArgs.xml | 57 +-
.../OpenReadCompletedEventHandler.xml | 32 +-
.../OpenWriteCompletedEventArgs.xml | 57 +-
.../OpenWriteCompletedEventHandler.xml | 32 +-
xml/System.Net/ServicePoint.xml | 15 -
xml/System.Net/ServicePointManager.xml | 12 -
xml/System.Net/SocketAddress.xml | 1 -
.../UploadDataCompletedEventArgs.xml | 57 +-
.../UploadDataCompletedEventHandler.xml | 32 +-
.../UploadFileCompletedEventArgs.xml | 57 +-
.../UploadFileCompletedEventHandler.xml | 32 +-
.../UploadStringCompletedEventArgs.xml | 57 +-
.../UploadStringCompletedEventHandler.xml | 32 +-
xml/System.Net/WebException.xml | 7 -
xml/System.Net/WebHeaderCollection.xml | 7 -
xml/System.Net/WebProxy.xml | 593 ++++++------
xml/System.Net/WebRequest.xml | 19 -
xml/System.Net/WebResponse.xml | 8 -
115 files changed, 5816 insertions(+), 6682 deletions(-)
diff --git a/xml/System.Net.Cache/HttpCacheAgeControl.xml b/xml/System.Net.Cache/HttpCacheAgeControl.xml
index f7232a297f6..dfe7bf1d211 100644
--- a/xml/System.Net.Cache/HttpCacheAgeControl.xml
+++ b/xml/System.Net.Cache/HttpCacheAgeControl.xml
@@ -42,19 +42,18 @@
Specifies the meaning of time values that control caching behavior for resources obtained using objects.
- class to configure the time values for cache policies.
-
-
-
-## Examples
- The following code example creates a policy based on MaxAgeAndMinFresh.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSimpleCache/CPP/NCLSimpleCache.cpp" id="Snippet9":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet9":::
+ class to configure the time values for cache policies.
+
+
+
+## Examples
+ The following code example creates a policy based on MaxAgeAndMinFresh.
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet9":::
+
]]>
Cache Management for Network Applications
diff --git a/xml/System.Net.Cache/HttpRequestCacheLevel.xml b/xml/System.Net.Cache/HttpRequestCacheLevel.xml
index f44fff9d968..20f48b8b786 100644
--- a/xml/System.Net.Cache/HttpRequestCacheLevel.xml
+++ b/xml/System.Net.Cache/HttpRequestCacheLevel.xml
@@ -42,25 +42,24 @@
Specifies caching behavior for resources obtained using the Hypertext Transfer protocol (HTTP).
- objects.
-
- This `BypassCache` value is the default cache behavior specified in the machine configuration file that ships with the .NET Framework. No entries are taken from caches, added to caches, or removed from caches between the client and server.
-
- The property is used to get or set the default cache policy for instances. The property is used to get or set the default cache policy for a instance. The property is used to get or set the cache policy for a specific request.
-
- A copy of a resource is only added to the cache if the response stream for the resource is retrieved and read to the end of the stream. So another request for the same resource could use a cached copy, depending on the default cache policy level for this request.
-
-
-
-## Examples
- The following code example sets the application domain's caching policy to Default.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSimpleCache/CPP/NCLSimpleCache.cpp" id="Snippet2":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet2":::
+ objects.
+
+ This `BypassCache` value is the default cache behavior specified in the machine configuration file that ships with the .NET Framework. No entries are taken from caches, added to caches, or removed from caches between the client and server.
+
+ The property is used to get or set the default cache policy for instances. The property is used to get or set the default cache policy for a instance. The property is used to get or set the cache policy for a specific request.
+
+ A copy of a resource is only added to the cache if the response stream for the resource is retrieved and read to the end of the stream. So another request for the same resource could use a cached copy, depending on the default cache policy level for this request.
+
+
+
+## Examples
+ The following code example sets the application domain's caching policy to Default.
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet2":::
+
]]>
diff --git a/xml/System.Net.Cache/HttpRequestCachePolicy.xml b/xml/System.Net.Cache/HttpRequestCachePolicy.xml
index e7a28109bcd..8dbb1a6646a 100644
--- a/xml/System.Net.Cache/HttpRequestCachePolicy.xml
+++ b/xml/System.Net.Cache/HttpRequestCachePolicy.xml
@@ -43,23 +43,22 @@
Defines an application's caching requirements for resources obtained by using objects.
- property or the application or machine configuration files. For more information, see [<requestCaching> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/requestcaching-element-network-settings).
-
- You can specify the cache policy for an individual request by using the property.
-
- Caching for Web services is not supported.
-
-
-
-## Examples
- The following code example creates a default cache policy for the application domain, and overrides it for a request.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSimpleCache/CPP/NCLSimpleCache.cpp" id="Snippet2":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet2":::
-
+ property or the application or machine configuration files. For more information, see [<requestCaching> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/requestcaching-element-network-settings).
+
+ You can specify the cache policy for an individual request by using the property.
+
+ Caching for Web services is not supported.
+
+
+
+## Examples
+ The following code example creates a default cache policy for the application domain, and overrides it for a request.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet2":::
+
]]>
Cache Management for Network Applications
@@ -115,19 +114,18 @@
Initializes a new instance of the class.
- property to .
-
-
-
-## Examples
- The following code example demonstrates setting the cache policy using this constructor.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSimpleCache/CPP/NCLSimpleCache.cpp" id="Snippet11":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet11":::
-
+ property to .
+
+
+
+## Examples
+ The following code example demonstrates setting the cache policy using this constructor.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet11":::
+
]]>
@@ -170,21 +168,20 @@
A object that specifies the time when resources stored in the cache must be revalidated.
Initializes a new instance of the class using the specified cache synchronization date.
- property to . The property is initialized to `cacheSyncDate`.
-
-
-
-## Examples
- The following code example demonstrates creating a cache policy based on a cache synchronization date.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSimpleCache/CPP/NCLSimpleCache.cpp" id="Snippet3":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet3":::
-
+ property to . The property is initialized to `cacheSyncDate`.
+
+
+
+## Examples
+ The following code example demonstrates creating a cache policy based on a cache synchronization date.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet3":::
+
]]>
@@ -227,21 +224,20 @@
An value.
Initializes a new instance of the class using the specified cache policy.
- property to `level`.
-
- The value controls whether caching is enabled, and when the cache can be used. For additional information, see the documentation.
-
-
-
-## Examples
- The following code example demonstrates creating a cache policy that allows resources found in the cache to be used from the cache.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSimpleCache/CPP/NCLSimpleCache.cpp" id="Snippet12":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet12":::
-
+ property to `level`.
+
+ The value controls whether caching is enabled, and when the cache can be used. For additional information, see the documentation.
+
+
+
+## Examples
+ The following code example demonstrates creating a cache policy that allows resources found in the cache to be used from the cache.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet12":::
+
]]>
@@ -286,21 +282,20 @@
A value that specifies an amount of time.
Initializes a new instance of the class using the specified age control and time values.
- , the property is set to the value of the `ageOrFreshOrStale` parameter.
-
- This constructor initializes the property to .
-
-
-
-## Examples
- The following code example demonstrates creating a cache policy based on minimum freshness.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSimpleCache/CPP/NCLSimpleCache.cpp" id="Snippet5":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet5":::
-
+ , the property is set to the value of the `ageOrFreshOrStale` parameter.
+
+ This constructor initializes the property to .
+
+
+
+## Examples
+ The following code example demonstrates creating a cache policy based on minimum freshness.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet5":::
+
]]>
The value specified for the parameter cannot be used with this constructor.
@@ -348,23 +343,22 @@
A value that specifies an amount of time.
Initializes a new instance of the class using the specified maximum age, age control value, and time value.
- , the property is set to the value of the `freshOrStale` parameter. When you specify , the property is set using the value of the `maxAge` parameter and the property is set using the value of the `freshOrStale` parameter.
-
- Note that unless you specify or , the property is not set.
-
- This constructor initializes the property to .
-
-
-
-## Examples
- The following code example demonstrates creating a cache policy based on minimum freshness and maximum age.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSimpleCache/CPP/NCLSimpleCache.cpp" id="Snippet9":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet9":::
-
+ , the property is set to the value of the `freshOrStale` parameter. When you specify , the property is set using the value of the `maxAge` parameter and the property is set using the value of the `freshOrStale` parameter.
+
+ Note that unless you specify or , the property is not set.
+
+ This constructor initializes the property to .
+
+
+
+## Examples
+ The following code example demonstrates creating a cache policy based on minimum freshness and maximum age.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet9":::
+
]]>
The value specified for the parameter is not valid.
@@ -414,23 +408,22 @@
A object that specifies the time when resources stored in the cache must be revalidated.
Initializes a new instance of the class using the specified maximum age, age control value, time value, and cache synchronization date.
- , the property is set to the value of the `freshOrStale` parameter. When you specify , the property is set using the value of the `maxAge` parameter and the property is set using the value of the `freshOrStale` parameter.
-
- Note that unless you specify or , the property is not set.
-
- This constructor initializes the property to `cacheSyncDate`, and initializes the property to .
-
-
-
-## Examples
- The following code example demonstrates creating a cache policy based on minimum freshness, maximum age, and a cache synchronization date.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSimpleCache/CPP/NCLSimpleCache.cpp" id="Snippet10":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet10":::
-
+ , the property is set to the value of the `freshOrStale` parameter. When you specify , the property is set using the value of the `maxAge` parameter and the property is set using the value of the `freshOrStale` parameter.
+
+ Note that unless you specify or , the property is not set.
+
+ This constructor initializes the property to `cacheSyncDate`, and initializes the property to .
+
+
+
+## Examples
+ The following code example demonstrates creating a cache policy based on minimum freshness, maximum age, and a cache synchronization date.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet10":::
+
]]>
@@ -473,19 +466,18 @@
Gets the cache synchronization date for this instance.
A value set to the date specified when this instance was created. If no date was specified, this property's value is DateTime.MinValue.
-
@@ -534,19 +526,18 @@
Gets the value that was specified when this instance was created.
A value that specifies the cache behavior for resources that were obtained using objects.
- as their cache policy level. The property, if not `null`, determines the cache policy in effect for a request. The default policy for the application domain can be set using the property or by settings in the machine or application configuration files. For more information, see [<requestCaching> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/requestcaching-element-network-settings).
-
-
-
-## Examples
- The following code example demonstrates displaying the value of this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSimpleCache/CPP/NCLSimpleCache.cpp" id="Snippet11":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet11":::
-
+ as their cache policy level. The property, if not `null`, determines the cache policy in effect for a request. The default policy for the application domain can be set using the property or by settings in the machine or application configuration files. For more information, see [<requestCaching> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/requestcaching-element-network-settings).
+
+
+
+## Examples
+ The following code example demonstrates displaying the value of this property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet11":::
+
]]>
@@ -595,19 +586,18 @@
Gets the maximum age permitted for a resource returned from the cache.
A value that is set to the maximum age value specified when this instance was created. If no date was specified, this property's value is DateTime.MinValue.
-
@@ -656,19 +646,18 @@
Gets the maximum staleness value that is permitted for a resource returned from the cache.
A value that is set to the maximum staleness value specified when this instance was created. If no date was specified, this property's value is DateTime.MinValue.
-
@@ -717,19 +706,18 @@
Gets the minimum freshness that is permitted for a resource returned from the cache.
A value that specifies the minimum freshness specified when this instance was created. If no date was specified, this property's value is DateTime.MinValue.
-
@@ -773,19 +761,18 @@
Returns a string representation of this instance.
A value that contains the property values for this instance.
-
diff --git a/xml/System.Net.Cache/RequestCacheLevel.xml b/xml/System.Net.Cache/RequestCacheLevel.xml
index 4afc7ee5e82..c5ced645580 100644
--- a/xml/System.Net.Cache/RequestCacheLevel.xml
+++ b/xml/System.Net.Cache/RequestCacheLevel.xml
@@ -42,25 +42,24 @@
Specifies caching behavior for resources obtained using and its derived classes.
- objects. The current setting for a object is available in the property.
-
- This value is the default cache behavior specified in the machine configuration file that ships with the .NET Framework. No entries are taken from caches, added to caches, or removed from caches between the client and server.
-
- The property is used to get or set the default cache policy for instances. The property is used to get or set the default cache policy for a instances. The property is used to get or set the cache policy for a specific request.
+ objects. The current setting for a object is available in the property.
-A copy of a resource is only added to the cache if the response stream for the resource is retrieved and read to the end of the stream. So another request for the same resource could use a cached copy, depending on the default cache policy level for this request.
-
-## Examples
- The following code example creates policy that returns a resource only if it is in the cache.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSimpleCache/CPP/NCLSimpleCache.cpp" id="Snippet13":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet13":::
+ This value is the default cache behavior specified in the machine configuration file that ships with the .NET Framework. No entries are taken from caches, added to caches, or removed from caches between the client and server.
+
+ The property is used to get or set the default cache policy for instances. The property is used to get or set the default cache policy for a instances. The property is used to get or set the cache policy for a specific request.
+
+If the cache behavior is `CacheIfAvailable` or `Revalidate`, a copy of a requested resource is only added to the cache if the response stream for the resource is retrieved and read to the end of the stream. With `CacheIfAvailable`, subsequent requests for the same resource would use a cached copy. With `Revalidate`, subsequent requests for the same resource would use a cached copy if the timestamp for the cached resource is the same as the timestamp of the resource on the server.
+
+A copy of a resource is only added to the cache if the response stream for the resource is retrieved and read to the end of the stream. So another request for the same resource could use a cached copy, depending on the default cache policy level for this request.
+
+## Examples
+ The following code example creates policy that returns a resource only if it is in the cache.
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet13":::
+
]]>
diff --git a/xml/System.Net.Cache/RequestCachePolicy.xml b/xml/System.Net.Cache/RequestCachePolicy.xml
index da0e12c62c6..0c9f5b0866e 100644
--- a/xml/System.Net.Cache/RequestCachePolicy.xml
+++ b/xml/System.Net.Cache/RequestCachePolicy.xml
@@ -43,23 +43,22 @@
Defines an application's caching requirements for resources obtained by using objects.
- property or the application or machine configuration files. For more information, see [<requestCaching> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/requestcaching-element-network-settings).
-
- You can specify the cache policy for an individual request by using the property.
-
- Caching for Web services is not supported.
-
-
-
-## Examples
- The following code example creates a policy with set to , and uses it to set the cache policy of a .
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSimpleCache/CPP/NCLSimpleCache.cpp" id="Snippet13":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet13":::
+ property or the application or machine configuration files. For more information, see [<requestCaching> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/requestcaching-element-network-settings).
+
+ You can specify the cache policy for an individual request by using the property.
+
+ Caching for Web services is not supported.
+
+
+
+## Examples
+ The following code example creates a policy with set to , and uses it to set the cache policy of a .
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet13":::
+
]]>
Cache Management for Network Applications
@@ -115,19 +114,18 @@
Initializes a new instance of the class.
- property to .
-
-
-
-## Examples
- The following example demonstrates calling this constructor.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSimpleCache/CPP/NCLSimpleCache.cpp" id="Snippet11":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet11":::
-
+ property to .
+
+
+
+## Examples
+ The following example demonstrates calling this constructor.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet11":::
+
]]>
Cache Management for Network Applications
@@ -171,21 +169,20 @@
A that specifies the cache behavior for resources obtained using objects.
Initializes a new instance of the class. using the specified cache policy.
- property to `level`.
-
- The value controls whether caching is enabled, and when the cache can be used. For additional information, see the documentation.
-
-
-
-## Examples
- The following code example creates a policy with set to .and uses it to set the cache policy of a .
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSimpleCache/CPP/NCLSimpleCache.cpp" id="Snippet13":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet13":::
-
+ property to `level`.
+
+ The value controls whether caching is enabled, and when the cache can be used. For additional information, see the documentation.
+
+
+
+## Examples
+ The following code example creates a policy with set to .and uses it to set the cache policy of a .
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet13":::
+
]]>
level is not a valid .value.
@@ -236,21 +233,20 @@
Gets the value specified when this instance was constructed.
A value that specifies the cache behavior for resources obtained using objects.
- as their cache policy level. Using the level, the effective cache policy is determined by the current cache policy and the age of the content in the cache. The property, if not `null`, determines the cache policy in effect for a request.
-
- The default policy for the application domain can be set using the or the application or machine configuration file. For more information, see [<requestCaching> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/requestcaching-element-network-settings).
-
-
-
-## Examples
- The following code example creates a policy and sends a request.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSimpleCache/CPP/NCLSimpleCache.cpp" id="Snippet13":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet13":::
-
+ as their cache policy level. Using the level, the effective cache policy is determined by the current cache policy and the age of the content in the cache. The property, if not `null`, determines the cache policy in effect for a request.
+
+ The default policy for the application domain can be set using the or the application or machine configuration file. For more information, see [<requestCaching> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/requestcaching-element-network-settings).
+
+
+
+## Examples
+ The following code example creates a policy and sends a request.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet13":::
+
]]>
Cache Management for Network Applications
@@ -295,14 +291,13 @@
Returns a string representation of this instance.
A containing the for this instance.
- policy and sends a request.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSimpleCache/CPP/NCLSimpleCache.cpp" id="Snippet14":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet14":::
-
+ policy and sends a request.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet14":::
+
]]>
Cache Management for Network Applications
diff --git a/xml/System.Net.Mail/Attachment.xml b/xml/System.Net.Mail/Attachment.xml
index e27a6f16957..45c804fcebe 100644
--- a/xml/System.Net.Mail/Attachment.xml
+++ b/xml/System.Net.Mail/Attachment.xml
@@ -67,7 +67,6 @@
## Examples
The following code example demonstrates attaching a file to an email message.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet6":::
]]>
@@ -137,7 +136,6 @@
## Examples
The following code example demonstrates how to call this constructor.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet13":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet13":::
]]>
@@ -200,7 +198,6 @@
## Examples
The following code example demonstrates how to call this constructor.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet14":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet14":::
]]>
@@ -273,7 +270,6 @@
## Examples
The following code example demonstrates how to call this constructor.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet15":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet15":::
]]>
@@ -386,7 +382,6 @@
## Examples
The following code example demonstrates how to call this constructor.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet12":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet12":::
]]>
@@ -459,7 +454,6 @@
## Examples
The following code example demonstrates how to call this constructor.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet16":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet16":::
]]>
@@ -519,7 +513,6 @@
## Examples
The following code example gets the for an attachment and displays its properties.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet11":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet11":::
]]>
@@ -764,7 +757,6 @@
## Examples
The following code example demonstrates how to display information about an attachment.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet19":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet19":::
]]>
diff --git a/xml/System.Net.Mail/AttachmentCollection.xml b/xml/System.Net.Mail/AttachmentCollection.xml
index 321b66cbb1c..7193fe5e23d 100644
--- a/xml/System.Net.Mail/AttachmentCollection.xml
+++ b/xml/System.Net.Mail/AttachmentCollection.xml
@@ -56,23 +56,22 @@
Stores attachments to be sent as part of an email message.
- class are returned by the and properties.
-
- Use the property to specify copies of an email message in different formats. For example, if you send a message in HTML, you might also want provide a plain text version in case some of the recipients use email readers that cannot display HTML content.
-
- Use the collection returned by the property to add an attachment, such as a file or the contents of a to this .
-
-
-
-## Examples
- The following code example demonstrates how to create and send an email message with an attachment.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet6":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet6":::
+ class are returned by the and properties.
+
+ Use the property to specify copies of an email message in different formats. For example, if you send a message in HTML, you might also want provide a plain text version in case some of the recipients use email readers that cannot display HTML content.
+
+ Use the collection returned by the property to add an attachment, such as a file or the contents of a to this .
+
+
+
+## Examples
+ The following code example demonstrates how to create and send an email message with an attachment.
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet6":::
+
]]>
@@ -159,11 +158,11 @@
Releases all resources used by the .
- method. You do not have to call it in your application.
-
+ method. You do not have to call it in your application.
+
]]>
diff --git a/xml/System.Net.Mail/MailAddress.xml b/xml/System.Net.Mail/MailAddress.xml
index 118959c5818..e2fada79d42 100644
--- a/xml/System.Net.Mail/MailAddress.xml
+++ b/xml/System.Net.Mail/MailAddress.xml
@@ -49,75 +49,64 @@
Represents the address of an electronic mail sender or recipient.
- class is used by the and classes to store address information for email messages.
-
-A mail address is composed of a name, name and optionally, a . The can contain non-ASCII characters if you encode them.
-
+ class is used by the and classes to store address information for email messages.
+
+A mail address is composed of a name, name and optionally, a . The can contain non-ASCII characters if you encode them.
+
The class supports the following mail address formats:
-
-- A simple address format of `user@host`. If a is not set, this is the mail address format generated.
-
-- A standard quoted display name format of `"display name" `. If a is set, this is the format generated.
-
- - Angle brackets are added around the name and name, if these are not included. For example, `"display name" user@host` is changed to `"display name" `.
-
- - Quotes are added around the , if these are not included. For example, `display name ` is changed to `"display name" `.
-
- - Unicode characters are supported in the property.
-
+
+- A simple address format of `user@host`. If a is not set, this is the mail address format generated.
+- A standard quoted display name format of `"display name" `. If a is set, this is the format generated.
+
+ - Angle brackets are added around the name and name, if these are not included. For example, `"display name" user@host` is changed to `"display name" `.
+ - Quotes are added around the , if these are not included. For example, `display name ` is changed to `"display name" `.
+ - Unicode characters are supported in the property.
+
Within these two formats, the following elements are allowed:
-- A name with quotes. For example, `"user name"@host`.
-
-- Consecutive and trailing dots in user names. For example, `user...name..@host`.
-
-- Bracketed domain literals. For example, ``.
-
-- Comments. For example, `(comment)"display name"(comment)<(comment)user(comment)@(comment)domain(comment)>(comment)`. Comments are removed before transmission.
-
+- A name with quotes. For example, `"user name"@host`.
+- Consecutive and trailing dots in user names. For example, `user...name..@host`.
+- Bracketed domain literals. For example, ``.
+- Comments. For example, `(comment)"display name"(comment)<(comment)user(comment)@(comment)domain(comment)>(comment)`. Comments are removed before transmission.
+
A comma is used to separate elements in a list of mail addresses. As a result, a comma should not be used in unquoted display names in a list. The following mail addresses would be allowed:
-
-`"John, Doe" , "Bob, Smith" `
-
-The following mail address would not be allowed:
-
-`John, Doe , Bob, Smith `
-
+
+`"John, Doe" , "Bob, Smith" `
+
+The following mail address would not be allowed:
+
+`John, Doe , Bob, Smith `
+
Quotes can be embedded in a quoted string, but they must be escaped. The following mail addresses would be allowed:
-
-`"John \"Jr\" Doe" `
-
-`"\"John \\\"Jr\\\" Doe\" "`
-
-The following mail address would not be allowed:
-
-`"John "Jr" Doe" `
-
+
+`"John \"Jr\" Doe" `
+
+`"\"John \\\"Jr\\\" Doe\" "`
+
+The following mail address would not be allowed:
+
+`"John "Jr" Doe" `
+
When the username is not quoted, all text between the start of the string (or comma) and the address are considered part of the , including comments. For example:
-
+
`(non comment) unquoted display (non comment) name (non comment) `
-
-Although the class accepts a mail address as valid, other mail servers may not accept the mail address.
-
-The class does not support the following mail address formats:
-
+
+Although the class accepts a mail address as valid, other mail servers may not accept the mail address.
+
+The class does not support the following mail address formats:
+
- Mixed quoted and unquoted display names. For example, `display "name" `.
-
-- Groups, as defined in RFC 2822 Section 3.4 published by the IETF.
-
+- Groups, as defined in RFC 2822 Section 3.4 published by the IETF.
- The obsolete user name formats of `"user"."name"@host`, `user."name"@host` or `"user".name@host`.
-
-
-
-## Examples
-The following code example demonstrates sending an email message by using the , , and classes.
-
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet10":::
-:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet10":::
-
+
+## Examples
+The following code example demonstrates sending an email message by using the , , and classes.
+
+:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet10":::
+
]]>
@@ -176,32 +165,31 @@ The following code example demonstrates sending an email message by using the A that contains an email address.
Initializes a new instance of the class using the specified address.
- "`
-
- White space is permitted between the display name and the angle brackets.
-
- The following table shows the property values for a object constructed using the preceding example address.
-
-|Property|Value|
-|--------------|-----------|
-||`"Tom Smith"`|
-||`"contoso.com"`|
-||`"tsmith"`|
-||`"tsmith@contoso.com"`|
-
-
-
-## Examples
- The following code example uses this constructor to create a object for the recipient of an email message.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet9":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9":::
-
+ "`
+
+ White space is permitted between the display name and the angle brackets.
+
+ The following table shows the property values for a object constructed using the preceding example address.
+
+|Property|Value|
+|--------------|-----------|
+||`"Tom Smith"`|
+||`"contoso.com"`|
+||`"tsmith"`|
+||`"tsmith@contoso.com"`|
+
+
+
+## Examples
+ The following code example uses this constructor to create a object for the recipient of an email message.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9":::
+
]]>
@@ -266,23 +254,22 @@ The following code example demonstrates sending an email message by using the A that contains the display name associated with . This parameter can be .
Initializes a new instance of the class using the specified address and display name.
- , `displayName` overrides the value specified in `address`.
-
-
-
-## Examples
- The following code example uses this constructor to create instances for the sender and recipient of an email message.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet9":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9":::
-
+ , `displayName` overrides the value specified in `address`.
+
+
+
+## Examples
+ The following code example uses this constructor to create instances for the sender and recipient of an email message.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9":::
+
]]>
@@ -290,10 +277,10 @@ The following code example demonstrates sending an email message by using the
is ("").
- is not in a recognized format.
-
- -or-
-
+ is not in a recognized format.
+
+ -or-
+
contains non-ASCII characters.
@@ -347,45 +334,44 @@ The following code example demonstrates sending an email message by using the The that defines the character set used for .
Initializes a new instance of the class using the specified address, display name, and encoding.
- , `displayName` overrides the value specified in `address`.
-
- The method does not check if the `displayName` parameter is valid. This method removes surrounding quotes not displayed by the property. Quotes will be added before transmission, except where or is specified in the `displayNameEncoding` parameter. The encoding specified in the `displayNameEncoding` parameter will be applied to the property before transmission or is specified in the `displayNameEncoding` parameter. is the default encoding if none is specified.
-
- For more information on supported mail address formats, see .
-
-
-
-## Examples
- The following code example uses this constructor to create instances for the sender of an email message.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclMailASync/cpp/mailasync.cpp" id="Snippet2":::
+ , `displayName` overrides the value specified in `address`.
+
+ The method does not check if the `displayName` parameter is valid. This method removes surrounding quotes not displayed by the property. Quotes will be added before transmission, except where or is specified in the `displayNameEncoding` parameter. The encoding specified in the `displayNameEncoding` parameter will be applied to the property before transmission or is specified in the `displayNameEncoding` parameter. is the default encoding if none is specified.
+
+ For more information on supported mail address formats, see .
+
+
+
+## Examples
+ The following code example uses this constructor to create instances for the sender of an email message.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/MailAddress/.ctor/mailasync.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclMailASync/vb/mailasync.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclMailASync/vb/mailasync.vb" id="Snippet2":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
- is ("").
-
- -or-
-
+ is ("").
+
+ -or-
+
is ("").
- is not in a recognized format.
-
- -or-
-
+ is not in a recognized format.
+
+ -or-
+
contains non-ASCII characters.
@@ -427,19 +413,18 @@ The following code example demonstrates sending an email message by using the Gets the email address specified when this instance was created.
A that contains the email address.
- information.
-
-
-
-## Examples
- The following code example displays the address for an email message recipient.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet10":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet10":::
-
+ information.
+
+
+
+## Examples
+ The following code example displays the address for an email message recipient.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet10":::
+
]]>
@@ -488,21 +473,20 @@ The following code example demonstrates sending an email message by using the Gets the display name composed from the display name and address information specified when this instance was created.
A that contains the display name; otherwise, ("") if no display name information was specified when this instance was created.
- method to get the encoded form of the .
-
- Some software programs that are used to read email display the property value instead of, or in addition to, the email address.
-
-
-
-## Examples
- The following code example displays the for the recipient of an email message.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet9":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9":::
-
+ method to get the encoded form of the .
+
+ Some software programs that are used to read email display the property value instead of, or in addition to, the email address.
+
+
+
+## Examples
+ The following code example displays the for the recipient of an email message.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9":::
+
]]>
@@ -599,11 +583,11 @@ The following code example demonstrates sending an email message by using the Returns a hash value for a mail address.
An integer hash value.
- method returns a hash code of the mail address. This value can be used as a key in hash tables.
-
+ method returns a hash code of the mail address. This value can be used as a key in hash tables.
+
]]>
@@ -652,19 +636,18 @@ The following code example demonstrates sending an email message by using the Gets the host portion of the address specified when this instance was created.
A that contains the name of the host computer that accepts email for the property.
-
@@ -708,23 +691,22 @@ The following code example demonstrates sending an email message by using the Returns a string representation of this instance.
A that contains the contents of this .
- property is not `null` and not equal to (""), returns a string composed using the following syntax:
-
- \<@>
-
- If is `null` or is equal to , returns the value of the property.
-
-
-
-## Examples
- The following code example displays the destination of an email message.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet7":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet7":::
-
+ property is not `null` and not equal to (""), returns a string composed using the following syntax:
+
+ \<@>
+
+ If is `null` or is equal to , returns the value of the property.
+
+
+
+## Examples
+ The following code example displays the destination of an email message.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet7":::
+
]]>
@@ -932,19 +914,18 @@ The following code example demonstrates sending an email message by using the Gets the user information from the address specified when this instance was created.
A that contains the user name portion of the .
-
diff --git a/xml/System.Net.Mail/MailAddressCollection.xml b/xml/System.Net.Mail/MailAddressCollection.xml
index 3b30f2dd8f5..8e8d9462c38 100644
--- a/xml/System.Net.Mail/MailAddressCollection.xml
+++ b/xml/System.Net.Mail/MailAddressCollection.xml
@@ -52,21 +52,20 @@
Store email addresses that are associated with an email message.
- , , and properties return instances of this class that are used to hold the respective email addresses.
-
- For details on the mail address formats supported by the class, see the class.
-
-
-
-## Examples
- The following example adds an email address to the that is returned by the property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet9":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9":::
+ , , and properties return instances of this class that are used to hold the respective email addresses.
+
+ For details on the mail address formats supported by the class, see the class.
+
+
+
+## Examples
+ The following example adds an email address to the that is returned by the property.
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9":::
+
]]>
@@ -155,11 +154,11 @@
The email addresses to add to the . Multiple email addresses must be separated with a comma character (",").
Add a list of email addresses to the collection.
- exception is raised.
-
+ exception is raised.
+
]]>
The parameter is null.
@@ -298,19 +297,18 @@
Returns a string representation of the email addresses in this object.
A containing the email addresses in this collection.
- that are returned by the property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet9":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9":::
-
+ that are returned by the property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9":::
+
]]>
diff --git a/xml/System.Net.Mail/MailMessage.xml b/xml/System.Net.Mail/MailMessage.xml
index fcafa90398b..b9803064ad1 100644
--- a/xml/System.Net.Mail/MailMessage.xml
+++ b/xml/System.Net.Mail/MailMessage.xml
@@ -80,35 +80,21 @@
If some mail headers are malformed, they could cause the email message to become corrupted. So any mail header in the headers collection that can be set using a property on the class should only be set using the class property or as a parameter passed when a initializes a object. The following list of mail headers should not be added using the property and any values set for these headers using the property will be discarded or overwritten when the message is sent:
-- Bcc
-
-- Cc
-
-- Content-ID
-
-- Content-Location
-
-- Content-Transfer-Encoding
-
-- Content-Type
-
-- Date
-
-- From
-
-- Importance
-
-- MIME-Version
-
-- Priority
-
-- Reply-To
-
-- Sender
-
-- To
-
-- X-Priority
+- Bcc
+- Cc
+- Content-ID
+- Content-Location
+- Content-Transfer-Encoding
+- Content-Type
+- Date
+- From
+- Importance
+- MIME-Version
+- Priority
+- Reply-To
+- Sender
+- To
+- X-Priority
If the application does not specify an X-Sender header using the property, the class will create one when the message is sent.
@@ -123,7 +109,6 @@
## Examples
The following code example demonstrates creating and sending an email message that includes an attachment.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLMailSync/vb/mail.vb" id="Snippet6":::
@@ -229,12 +214,9 @@
## Remarks
The property is initialized using `from` and the property is initialized using `to`.
-
-
## Examples
The following code example demonstrates calling this constructor.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLMailSync/vb/mail.vb" id="Snippet4":::
@@ -300,7 +282,6 @@
## Examples
The following code example demonstrates calling this constructor.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLMailSync/vb/mail.vb" id="Snippet2":::
@@ -400,7 +381,6 @@
## Examples
The following code example demonstrates calling this constructor.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLMailSync/vb/mail.vb" id="Snippet3":::
@@ -472,7 +452,6 @@
## Examples
The following code example demonstrates creating and sending an email message with a plain text and an HTML alternate view.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLMailSync/vb/mail.vb" id="Snippet5":::
@@ -530,7 +509,6 @@
## Examples
The following code example demonstrates creating and sending an email message with an attachment.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLMailSync/vb/mail.vb" id="Snippet6":::
@@ -588,7 +566,6 @@
## Examples
The following code example demonstrates adding an address to the address collection.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet9":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet9":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLMailSync/vb/mail.vb" id="Snippet9":::
@@ -646,7 +623,6 @@
## Examples
The following code example demonstrates setting the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLMailSync/vb/mail.vb" id="Snippet2":::
@@ -719,7 +695,6 @@
## Examples
The following code example demonstrates creating a mail message that uses UTF8 encoding.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclMailASync/cpp/mailasync.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/MailAddress/.ctor/mailasync.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclMailASync/vb/mailasync.vb" id="Snippet3":::
@@ -818,7 +793,6 @@
## Examples
The following code example demonstrates adding an address to the address collection.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet10":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet10":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLMailSync/vb/mail.vb" id="Snippet10":::
@@ -1060,7 +1034,6 @@
## Examples
The following code example demonstrates setting a value for the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet10":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet10":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLMailSync/vb/mail.vb" id="Snippet10":::
@@ -1113,35 +1086,35 @@
If some mail headers are malformed, they could cause the email message to become corrupted. So any mail header in the headers collection that can be set using a property on the class should only be set using the class property or as a parameter passed when a initializes a object. The following list of mail headers should not be added using the property and any values set for these headers using the property will be discarded or overwritten when the message is sent:
-- Bcc
+- Bcc
-- Cc
+- Cc
-- Content-ID
+- Content-ID
-- Content-Location
+- Content-Location
-- Content-Transfer-Encoding
+- Content-Transfer-Encoding
-- Content-Type
+- Content-Type
-- Date
+- Date
-- From
+- From
-- Importance
+- Importance
-- MIME-Version
+- MIME-Version
-- Priority
+- Priority
-- Reply-To
+- Reply-To
-- Sender
+- Sender
-- To
+- To
-- X-Priority
+- X-Priority
If the application does not specify an X-Sender header using the property, the class will create one when the message is sent.
@@ -1168,7 +1141,6 @@
## Examples
The following code example demonstrates displaying the headers for a mail message.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet24":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet24":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLMailSync/vb/mail.vb" id="Snippet24":::
@@ -1542,7 +1514,6 @@
## Examples
The following code example demonstrates setting the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLMailSync/vb/mail.vb" id="Snippet2":::
@@ -1605,7 +1576,6 @@
## Examples
The following code example demonstrates setting the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclMailASync/cpp/mailasync.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/MailAddress/.ctor/mailasync.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclMailASync/vb/mailasync.vb" id="Snippet3":::
@@ -1665,7 +1635,6 @@
## Examples
The following code example demonstrates setting the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet7":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet7":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLMailSync/vb/mail.vb" id="Snippet7":::
diff --git a/xml/System.Net.Mail/SendCompletedEventHandler.xml b/xml/System.Net.Mail/SendCompletedEventHandler.xml
index fccd470ac3f..b297ef22eaa 100644
--- a/xml/System.Net.Mail/SendCompletedEventHandler.xml
+++ b/xml/System.Net.Mail/SendCompletedEventHandler.xml
@@ -51,20 +51,19 @@
An containing event data.
Represents the method that will handle the event.
- delegate is used to handle events that occur when the class finishes asynchronously sending an email message using the method.
+
+
+
+## Examples
+ The following code example demonstrates sending an email message asynchronously. It uses a to invoke the `SendCompletedCallback` method to handle events.
-## Remarks
- The delegate is used to handle events that occur when the class finishes asynchronously sending an email message using the method.
-
-
-
-## Examples
- The following code example demonstrates sending an email message asynchronously. It uses a to invoke the `SendCompletedCallback` method to handle events.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclMailASync/cpp/mailasync.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/MailAddress/.ctor/mailasync.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclMailASync/vb/mailasync.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclMailASync/vb/mailasync.vb" id="Snippet1":::
+
]]>
diff --git a/xml/System.Net.Mail/SmtpAccess.xml b/xml/System.Net.Mail/SmtpAccess.xml
index 7ca1e320b81..3636041ec4b 100644
--- a/xml/System.Net.Mail/SmtpAccess.xml
+++ b/xml/System.Net.Mail/SmtpAccess.xml
@@ -36,19 +36,18 @@
Specifies the level of access allowed to a Simple Mail Transport Protocol (SMTP) server.
- enumeration is used by the and classes to specify a level of access to an SMTP host computer. The class demands an when sending electronic mail to the SMTP host for delivery.
-
-
-
-## Examples
- The following code example uses the enumeration to create a permission object.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclMailPerms/CPP/mailpermissions.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/SmtpAccess/Overview/mailpermissions.cs" id="Snippet1":::
+ enumeration is used by the and classes to specify a level of access to an SMTP host computer. The class demands an when sending electronic mail to the SMTP host for delivery.
+
+
+
+## Examples
+ The following code example uses the enumeration to create a permission object.
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/SmtpAccess/Overview/mailpermissions.cs" id="Snippet1":::
+
]]>
diff --git a/xml/System.Net.Mail/SmtpClient.xml b/xml/System.Net.Mail/SmtpClient.xml
index 1d0b33a7ad7..9a4c5ffe2ff 100644
--- a/xml/System.Net.Mail/SmtpClient.xml
+++ b/xml/System.Net.Mail/SmtpClient.xml
@@ -114,7 +114,6 @@ To include an attachment with an email message, first create the attachment by u
The following code example demonstrates sending an email message asynchronously.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclMailASync/cpp/mailasync.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/MailAddress/.ctor/mailasync.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclMailASync/vb/mailasync.vb" id="Snippet1":::
@@ -181,7 +180,6 @@ The following code example demonstrates sending an email message asynchronously.
## Examples
The following code example demonstrates sending an email message.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet4":::
For an example of the \ node in the application or machine configuration file, see [<mailSettings> Element (Network Settings)](/dotnet/framework/configure-apps/file-schema/network/mailsettings-element-network-settings).
@@ -241,7 +239,6 @@ The following code example demonstrates sending an email message asynchronously.
## Examples
The following code example demonstrates calling this constructor.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet3":::
]]>
@@ -301,7 +298,6 @@ The following code example demonstrates sending an email message asynchronously.
## Examples
The following code example demonstrates calling this constructor.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet1":::
]]>
@@ -428,7 +424,6 @@ The following code example demonstrates sending an email message asynchronously.
## Examples
The following code example demonstrates setting the credentials used to send an email.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet1":::
]]>
@@ -830,7 +825,6 @@ The following code example demonstrates sending an email message asynchronously.
## Examples
The following code example demonstrates sending an email message by using the host and port specified in an application configuration file.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet7":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet7":::
]]>
@@ -1020,7 +1014,6 @@ The following code example demonstrates sending an email message asynchronously.
## Examples
The following code example demonstrates sending an email message by using the host and port specified in an application configuration file.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet7":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet7":::
]]>
@@ -1108,7 +1101,6 @@ The following code example demonstrates sending an email message asynchronously.
## Examples
The following code example demonstrates using this method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet2":::
]]>
@@ -1375,7 +1367,6 @@ The following code example demonstrates sending an email message asynchronously.
## Examples
The following code example demonstrates calling this method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclMailASync/cpp/mailasync.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/MailAddress/.ctor/mailasync.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclMailASync/vb/mailasync.vb" id="Snippet1":::
@@ -1619,7 +1610,6 @@ The following code example demonstrates sending an email message asynchronously.
## Examples
The following code example demonstrates sending an email message asynchronously. The user has the option to cancel the mail if it has not been sent.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclMailASync/cpp/mailasync.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/MailAddress/.ctor/mailasync.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclMailASync/vb/mailasync.vb" id="Snippet1":::
@@ -1679,7 +1669,6 @@ The following code example demonstrates sending an email message asynchronously.
## Examples
The following code example demonstrates sending an email message asynchronously.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclMailASync/cpp/mailasync.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/MailAddress/.ctor/mailasync.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclMailASync/vb/mailasync.vb" id="Snippet1":::
@@ -2294,7 +2283,6 @@ The following code example demonstrates sending an email message asynchronously.
## Examples
The following code example demonstrates getting and setting the time-out value.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet3":::
]]>
@@ -2359,7 +2347,6 @@ The following code example demonstrates sending an email message asynchronously.
## Examples
The following code example demonstrates using this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet2":::
]]>
diff --git a/xml/System.Net.Mail/SmtpException.xml b/xml/System.Net.Mail/SmtpException.xml
index 8a32b477a61..f1cb0df0a5f 100644
--- a/xml/System.Net.Mail/SmtpException.xml
+++ b/xml/System.Net.Mail/SmtpException.xml
@@ -60,19 +60,18 @@
Represents the exception that is thrown when the is not able to complete a or operation.
- property contains the status code returned by the SMTP server.
-
-
-
-## Examples
- The following code example displays an error message when the exception is thrown.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet27":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet27":::
-
+ property contains the status code returned by the SMTP server.
+
+
+
+## Examples
+ The following code example displays an error message when the exception is thrown.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet27":::
+
]]>
@@ -127,19 +126,18 @@
Initializes a new instance of the class.
- property set to .
-
-
-
-## Examples
- The following code example demonstrates calling this constructor.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet28":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet28":::
-
+ property set to .
+
+
+
+## Examples
+ The following code example demonstrates calling this constructor.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet28":::
+
]]>
@@ -182,19 +180,18 @@
An value.
Initializes a new instance of the class with the specified status code.
- property.
-
-
-
-## Examples
- The following code example demonstrates calling this constructor.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet30":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet30":::
-
+ property.
+
+
+
+## Examples
+ The following code example demonstrates calling this constructor.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet30":::
+
]]>
@@ -238,19 +235,18 @@
A that describes the error that occurred.
Initializes a new instance of the class with the specified error message.
- property.
-
-
-
-## Examples
- The following code example demonstrates calling this constructor.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet29":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet29":::
-
+ property.
+
+
+
+## Examples
+ The following code example demonstrates calling this constructor.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet29":::
+
]]>
@@ -296,19 +292,18 @@
A that describes the error that occurred.
Initializes a new instance of the class with the specified status code and error message.
- property and uses the `message` parameter to initialize the property.
-
-
-
-## Examples
- The following code example demonstrates calling this constructor.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet31":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet31":::
-
+ property and uses the `message` parameter to initialize the property.
+
+
+
+## Examples
+ The following code example demonstrates calling this constructor.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet31":::
+
]]>
@@ -363,11 +358,11 @@
A that contains the source and destination of the serialized stream associated with the new instance.
Initializes a new instance of the class from the specified instances of the and classes.
- interface for the class.
-
+ interface for the class.
+
]]>
@@ -413,21 +408,20 @@
The exception that is the cause of the current exception.
Initializes a new instance of the class with the specified error message and inner exception.
- property and the `innerException` parameter to initialize the property.
-
- If `innerException` is not `null`, the current exception is raised in a catch block that handles `innerException`.
-
-
-
-## Examples
- The following code example demonstrates calling this constructor.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet32":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet32":::
-
+ property and the `innerException` parameter to initialize the property.
+
+ If `innerException` is not `null`, the current exception is raised in a catch block that handles `innerException`.
+
+
+
+## Examples
+ The following code example demonstrates calling this constructor.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet32":::
+
]]>
@@ -485,11 +479,11 @@
A that specifies the destination for this serialization.
Populates a instance with the data needed to serialize the .
- are automatically tracked and serialized by the formatter.
-
+ are automatically tracked and serialized by the formatter.
+
]]>
@@ -542,14 +536,13 @@
Gets the status code returned by an SMTP server when an email message is transmitted.
An value that indicates the error that occurred.
-
diff --git a/xml/System.Net.Mail/SmtpFailedRecipientsException.xml b/xml/System.Net.Mail/SmtpFailedRecipientsException.xml
index bb259a3a8bb..3b4a692f4bf 100644
--- a/xml/System.Net.Mail/SmtpFailedRecipientsException.xml
+++ b/xml/System.Net.Mail/SmtpFailedRecipientsException.xml
@@ -60,19 +60,18 @@
The exception that is thrown when email is sent using an and cannot be delivered to all recipients.
- property contains the exceptions received while attempting to send email. The email might have been successfully delivered to some of the recipients.
-
-
-
-## Examples
- The following code example resends an email message that was not delivered because a mailbox was busy or unavailable.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet27":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet27":::
+ property contains the exceptions received while attempting to send email. The email might have been successfully delivered to some of the recipients.
+
+
+
+## Examples
+ The following code example resends an email message that was not delivered because a mailbox was busy or unavailable.
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet27":::
+
]]>
@@ -217,11 +216,11 @@
A that contains the source of the serialized stream that is associated with the new instance.
Initializes a new instance of the class from the specified instances of the and classes.
- interface for the class.
-
+ interface for the class.
+
]]>
@@ -468,11 +467,11 @@
A that contains the source of the serialized stream that is associated with the new .
Initializes a new instance of the class from the specified and instances.
- interface for the class.
-
+ interface for the class.
+
]]>
diff --git a/xml/System.Net.Mail/SmtpStatusCode.xml b/xml/System.Net.Mail/SmtpStatusCode.xml
index 2303f84f3a0..561eee48d7f 100644
--- a/xml/System.Net.Mail/SmtpStatusCode.xml
+++ b/xml/System.Net.Mail/SmtpStatusCode.xml
@@ -54,7 +54,6 @@
## Examples
The following code example displays an error message to the console when an is thrown.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet23":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet23":::
]]>
diff --git a/xml/System.Net.Mime/ContentDisposition.xml b/xml/System.Net.Mime/ContentDisposition.xml
index 1a42f309af9..88858524da0 100644
--- a/xml/System.Net.Mime/ContentDisposition.xml
+++ b/xml/System.Net.Mime/ContentDisposition.xml
@@ -50,27 +50,26 @@
Represents a MIME protocol Content-Disposition header.
- class accompanies an email message that contains attachments when the email message is sent to its destination. The information in can be used by software that displays email to present the email attachments in the manner intended by the sender.
-
- Email messages are created using instances of the class. Instances of the class are used to add attachments to email messages. To modify the for an attachment, get the instance from the property.
-
- Content to be displayed as part of the message body has the disposition type of . Content that is not displayed but is attached in a separate file has the disposition type of . Use the property to control the disposition type for the attachment associated with an instance of .
-
- For file attachments, you can use the properties of the to set the file size, as well as the date the file was created, last read, and last modified. For all attachments, you can set a recommended file name in the event that the attachment is stored on the receiving computer.
-
- The method returns the Content-Disposition header. The Content-Disposition header is described in RFC 2183 available at [https://www.ietf.org](https://www.ietf.org/).
-
-
-
-## Examples
- The following code example creates an email message with an attachment to be displayed inline.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet12":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet12":::
-
+ class accompanies an email message that contains attachments when the email message is sent to its destination. The information in can be used by software that displays email to present the email attachments in the manner intended by the sender.
+
+ Email messages are created using instances of the class. Instances of the class are used to add attachments to email messages. To modify the for an attachment, get the instance from the property.
+
+ Content to be displayed as part of the message body has the disposition type of . Content that is not displayed but is attached in a separate file has the disposition type of . Use the property to control the disposition type for the attachment associated with an instance of .
+
+ For file attachments, you can use the properties of the to set the file size, as well as the date the file was created, last read, and last modified. For all attachments, you can set a recommended file name in the event that the attachment is stored on the receiving computer.
+
+ The method returns the Content-Disposition header. The Content-Disposition header is described in RFC 2183 available at [https://www.ietf.org](https://www.ietf.org/).
+
+
+
+## Examples
+ The following code example creates an email message with an attachment to be displayed inline.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet12":::
+
]]>
@@ -119,19 +118,18 @@
Initializes a new instance of the class with a of .
- property set to .
-
-
-
-## Examples
- The following code example demonstrates how to call this constructor.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet33":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet33":::
-
+ property set to .
+
+
+
+## Examples
+ The following code example demonstrates how to call this constructor.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet33":::
+
]]>
@@ -174,14 +172,13 @@
A value that contains the disposition.
Initializes a new instance of the class with the specified disposition information.
-
@@ -232,23 +229,22 @@
Gets or sets the creation date for a file attachment.
A value that indicates the file creation date; otherwise, DateTime.MinValue if no date was specified.
- property is used to send time stamp information with a file being sent in an email message. This value sets the Creation-Date parameter in the Content-Disposition header sent with the email.
-
- The class is used to compose an email message. The class is used to attach a file to an email message. To set , get the for the attachment from the property.
-
- The Content-Disposition header is described in RFC 2183 available at [https://www.ietf.org](https://www.ietf.org/).
-
-
-
-## Examples
- The following code example demonstrates how to set this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet6":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet6":::
-
+ property is used to send time stamp information with a file being sent in an email message. This value sets the Creation-Date parameter in the Content-Disposition header sent with the email.
+
+ The class is used to compose an email message. The class is used to attach a file to an email message. To set , get the for the attachment from the property.
+
+ The Content-Disposition header is described in RFC 2183 available at [https://www.ietf.org](https://www.ietf.org/).
+
+
+
+## Examples
+ The following code example demonstrates how to set this property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet6":::
+
]]>
@@ -297,21 +293,20 @@
Gets or sets the disposition type for an email attachment.
A that contains the disposition type. The value is not restricted but is typically one of the values.
- property value can be used by software that displays email to determine the correct way to present the email attachments. attachments are usually displayed when the user opens the email. attachments are usually not opened until the user performs some action, such as clicking an icon that represents the attachment.
-
- The Content-Disposition header is described in RFC 2183 available at [https://www.ietf.org](https://www.ietf.org/).
-
-
-
-## Examples
- The following code example demonstrates how to set the value of this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet24":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet24":::
-
+ property value can be used by software that displays email to determine the correct way to present the email attachments. attachments are usually displayed when the user opens the email. attachments are usually not opened until the user performs some action, such as clicking an icon that represents the attachment.
+
+ The Content-Disposition header is described in RFC 2183 available at [https://www.ietf.org](https://www.ietf.org/).
+
+
+
+## Examples
+ The following code example demonstrates how to set the value of this property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet24":::
+
]]>
The value specified for a set operation is .
@@ -416,23 +411,22 @@
Gets or sets the suggested file name for an email attachment.
A that contains the file name.
- property allows the sender to suggest the name to be used to store an email attachment on the recipient's computer. This name is a suggestion only; the receiving system can ignore it. The name must not include path information; any such information is ignored by the receiving computer.
-
- To remove file name information, you can set this property to `null` or the empty string ("").
-
- The Content-Disposition header is described in RFC 2183 available at [https://www.ietf.org](https://www.ietf.org/).
-
-
-
-## Examples
- The following code example demonstrates how to set the value of this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet11":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet11":::
-
+ property allows the sender to suggest the name to be used to store an email attachment on the recipient's computer. This name is a suggestion only; the receiving system can ignore it. The name must not include path information; any such information is ignored by the receiving computer.
+
+ To remove file name information, you can set this property to `null` or the empty string ("").
+
+ The Content-Disposition header is described in RFC 2183 available at [https://www.ietf.org](https://www.ietf.org/).
+
+
+
+## Examples
+ The following code example demonstrates how to set the value of this property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet11":::
+
]]>
@@ -517,21 +511,20 @@
if content in the attachment is presented inline as part of the email body; otherwise, .
- property sets the disposition type in the Content-Disposition header sent with the email message. The disposition type can be used by software that displays email to determine the correct way to present the email attachments. Attachments with a disposition type of are usually displayed when the user opens the email. Attachments with a disposition type of are usually not opened until the user performs some additional action, such as clicking an icon that represents the attachment.
-
- The Content-Disposition header is described in RFC 2183 available at [https://www.ietf.org](https://www.ietf.org/).
-
-
-
-## Examples
- The following code example demonstrates how to set the value of this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet12":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet12":::
-
+ property sets the disposition type in the Content-Disposition header sent with the email message. The disposition type can be used by software that displays email to determine the correct way to present the email attachments. Attachments with a disposition type of are usually displayed when the user opens the email. Attachments with a disposition type of are usually not opened until the user performs some additional action, such as clicking an icon that represents the attachment.
+
+ The Content-Disposition header is described in RFC 2183 available at [https://www.ietf.org](https://www.ietf.org/).
+
+
+
+## Examples
+ The following code example demonstrates how to set the value of this property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet12":::
+
]]>
@@ -580,23 +573,22 @@
Gets or sets the modification date for a file attachment.
A value that indicates the file modification date; otherwise, DateTime.MinValue if no date was specified.
- property is used to send time stamp information with a file being sent in an email message. This value sets the Modification-Date parameter in the Content-Disposition header sent with the email message.
-
- The class is used to compose an email message. The class is used to attach a file to an email message. To set the property, get the for the attachment using the property.
-
- The Content-Disposition header is described in RFC 2183 available at [https://www.ietf.org](https://www.ietf.org/).
-
-
-
-## Examples
- The following code example demonstrates how to set this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet6":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet6":::
-
+ property is used to send time stamp information with a file being sent in an email message. This value sets the Modification-Date parameter in the Content-Disposition header sent with the email message.
+
+ The class is used to compose an email message. The class is used to attach a file to an email message. To set the property, get the for the attachment using the property.
+
+ The Content-Disposition header is described in RFC 2183 available at [https://www.ietf.org](https://www.ietf.org/).
+
+
+
+## Examples
+ The following code example demonstrates how to set this property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet6":::
+
]]>
@@ -639,21 +631,20 @@
Gets the parameters included in the Content-Disposition header represented by this instance.
A writable that contains parameter name/value pairs.
- property.
-
- The Content-Disposition header is described in RFC 2183, available at [https://www.ietf.org](https://www.ietf.org/).
-
-
-
-## Examples
- The following code example displays the parameters that are sent to the Content-Disposition header.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet6":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet6":::
-
+ property.
+
+ The Content-Disposition header is described in RFC 2183, available at [https://www.ietf.org](https://www.ietf.org/).
+
+
+
+## Examples
+ The following code example displays the parameters that are sent to the Content-Disposition header.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet6":::
+
]]>
@@ -702,23 +693,22 @@
Gets or sets the read date for a file attachment.
A value that indicates the file read date; otherwise, DateTime.MinValue if no date was specified.
- property is used to send time stamp information with a file being sent in an email message. This value sets the Read-Date parameter in the Content-Disposition header sent with the email message.
-
- The class is used to compose an email message. The class is used to attach a file to an email message. To set , get the for the attachment by using the property.
-
- The Content-Disposition header is described in RFC 2183 available at [https://www.ietf.org](https://www.ietf.org/).
-
-
-
-## Examples
- The following code example demonstrates how to set this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet6":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet6":::
-
+ property is used to send time stamp information with a file being sent in an email message. This value sets the Read-Date parameter in the Content-Disposition header sent with the email message.
+
+ The class is used to compose an email message. The class is used to attach a file to an email message. To set , get the for the attachment by using the property.
+
+ The Content-Disposition header is described in RFC 2183 available at [https://www.ietf.org](https://www.ietf.org/).
+
+
+
+## Examples
+ The following code example demonstrates how to set this property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet6":::
+
]]>
@@ -761,21 +751,20 @@
Gets or sets the size of a file attachment.
A that specifies the number of bytes in the file attachment. The default value is -1, which indicates that the file size is unknown.
- property is used to send time stamp information with a file being sent in an email message. The class is used to compose the message. The class is used to attach a file to an email message.
-
- The Content-Disposition header is described in RFC 2183 available at [https://www.ietf.org](https://www.ietf.org/).
-
-
-
-## Examples
- The following code example demonstrates how to get this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet6":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet6":::
-
+ property is used to send time stamp information with a file being sent in an email message. The class is used to compose the message. The class is used to attach a file to an email message.
+
+ The Content-Disposition header is described in RFC 2183 available at [https://www.ietf.org](https://www.ietf.org/).
+
+
+
+## Examples
+ The following code example demonstrates how to get this property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet6":::
+
]]>
@@ -819,21 +808,20 @@
Returns a representation of this instance.
A that contains the property values for this instance.
- method is the Content-Disposition header.
-
- The Content-Disposition header is described in RFC 2183 available at [https://www.ietf.org](https://www.ietf.org/).
-
-
-
-## Examples
- The following code example demonstrates calling this method.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet6":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet6":::
-
+ method is the Content-Disposition header.
+
+ The Content-Disposition header is described in RFC 2183 available at [https://www.ietf.org](https://www.ietf.org/).
+
+
+
+## Examples
+ The following code example demonstrates calling this method.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet6":::
+
]]>
diff --git a/xml/System.Net.Mime/ContentType.xml b/xml/System.Net.Mime/ContentType.xml
index 9e4f465ed76..c0f29383d14 100644
--- a/xml/System.Net.Mime/ContentType.xml
+++ b/xml/System.Net.Mime/ContentType.xml
@@ -49,21 +49,20 @@
Represents a MIME protocol Content-Type header.
- class is used to describe the data contained in an email message in such a way that software that displays email can present the content in an appropriate manner. is used with the class to specify the type of content in the attachment.
-
- The syntax of the Content-Type header is described in RFC 2045 Section 5.1. RFC 2046 provides detailed information about MIME media types and their parameters. These RFCs are available at [https://www.ietf.org](https://www.ietf.org/).
-
-
-
-## Examples
- The following code example sends an email message with an attachment and displays the properties for the attachment.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet6":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet6":::
-
+ class is used to describe the data contained in an email message in such a way that software that displays email can present the content in an appropriate manner. is used with the class to specify the type of content in the attachment.
+
+ The syntax of the Content-Type header is described in RFC 2045 Section 5.1. RFC 2046 provides detailed information about MIME media types and their parameters. These RFCs are available at [https://www.ietf.org](https://www.ietf.org/).
+
+
+
+## Examples
+ The following code example sends an email message with an attachment and displays the properties for the attachment.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet6":::
+
]]>
@@ -114,19 +113,18 @@
Initializes a new default instance of the class.
- property to `"application/octet-stream"`.
-
-
-
-## Examples
- The following code example demonstrates how to call this constructor.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet15":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet15":::
-
+ property to `"application/octet-stream"`.
+
+
+
+## Examples
+ The following code example demonstrates how to call this constructor.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet15":::
+
]]>
@@ -169,19 +167,18 @@
A , for example, "text/plain; charset=us-ascii", that contains the MIME media type, subtype, and optional parameters.
Initializes a new instance of the class using the specified string.
-
@@ -237,25 +234,24 @@
Gets or sets the value of the boundary parameter included in the Content-Type header represented by this instance.
A that contains the value associated with the boundary parameter.
- parameter is "`-----boundary---0`".
-
- `content-type: multipart/mixed; boundary=-----boundary---0`
-
- Set this property to `null` or to remove the boundary information from the header.
-
- The syntax of the Content-Type header is described in RFC 2045 Section 5.1. An in-depth discussion of the boundary parameter is contained in RFC 2046 Section 5.1.1. These RFCs are available at [https://www.ietf.org](https://www.ietf.org/).
-
-
-
-## Examples
- The following code example displays the value of the property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet5":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet5":::
-
+ parameter is "`-----boundary---0`".
+
+ `content-type: multipart/mixed; boundary=-----boundary---0`
+
+ Set this property to `null` or to remove the boundary information from the header.
+
+ The syntax of the Content-Type header is described in RFC 2045 Section 5.1. An in-depth discussion of the boundary parameter is contained in RFC 2046 Section 5.1.1. These RFCs are available at [https://www.ietf.org](https://www.ietf.org/).
+
+
+
+## Examples
+ The following code example displays the value of the property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet5":::
+
]]>
@@ -305,25 +301,24 @@
Gets or sets the value of the charset parameter included in the Content-Type header represented by this instance.
A that contains the value associated with the charset parameter.
- property is "`us-ascii`".
-
- `content-type: application/x-myType; charset=us-ascii`
-
- Set this property to `null` or to remove the charset information from the header.
-
- A grammar that details the syntax of the Content-Type header is described in RFC 2045 Section 5.1. An in-depth discussion of the charset parameter is contained in RFC 2046 Section 4.1.2. These RFCs are available at [https://www.ietf.org](https://www.ietf.org/).
-
-
-
-## Examples
- The following code example displays the value of the property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet5":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet5":::
-
+ property is "`us-ascii`".
+
+ `content-type: application/x-myType; charset=us-ascii`
+
+ Set this property to `null` or to remove the charset information from the header.
+
+ A grammar that details the syntax of the Content-Type header is described in RFC 2045 Section 5.1. An in-depth discussion of the charset parameter is contained in RFC 2046 Section 4.1.2. These RFCs are available at [https://www.ietf.org](https://www.ietf.org/).
+
+
+
+## Examples
+ The following code example displays the value of the property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet5":::
+
]]>
@@ -460,25 +455,24 @@
Gets or sets the media type value included in the Content-Type header represented by this instance.
A that contains the media type and subtype value. This value does not include the semicolon (;) separator that follows the subtype.
- property is `"application/x-myType"`.
-
- `content-type: application/x-myType; name=data.xyz`
-
- Set this property to `null` or to remove the name information from the header.
-
- The syntax of the Content-Type header is described in RFC 2045 Section 5.1. RFC 2046 provides detailed information on MIME media types. These RFCs are available at [https://www.ietf.org](https://www.ietf.org/).
-
-
-
-## Examples
- The following code example sets the value of this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet13":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet13":::
-
+ property is `"application/x-myType"`.
+
+ `content-type: application/x-myType; name=data.xyz`
+
+ Set this property to `null` or to remove the name information from the header.
+
+ The syntax of the Content-Type header is described in RFC 2045 Section 5.1. RFC 2046 provides detailed information on MIME media types. These RFCs are available at [https://www.ietf.org](https://www.ietf.org/).
+
+
+
+## Examples
+ The following code example sets the value of this property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet13":::
+
]]>
The value specified for a set operation is .
@@ -524,25 +518,24 @@
Gets or sets the value of the name parameter included in the Content-Type header represented by this instance.
A that contains the value associated with the name parameter.
- property is `"data.xyz"`.
-
- `content-type: application/x-myType; name=data.xyz`
-
- A grammar that details the syntax of the Content-Type header is described in RFC 2045 Section 5.1, available at [https://www.ietf.org](https://www.ietf.org/).
-
- When specifying content for a as a or , you can use to set the name of the file that stores the content on the recipient's system.
-
-
-
-## Examples
- The following code example sets the value of the property to specify a name for a file being attached as a stream.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet15":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet15":::
-
+ property is `"data.xyz"`.
+
+ `content-type: application/x-myType; name=data.xyz`
+
+ A grammar that details the syntax of the Content-Type header is described in RFC 2045 Section 5.1, available at [https://www.ietf.org](https://www.ietf.org/).
+
+ When specifying content for a as a or , you can use to set the name of the file that stores the content on the recipient's system.
+
+
+
+## Examples
+ The following code example sets the value of the property to specify a name for a file being attached as a stream.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet15":::
+
]]>
@@ -585,23 +578,22 @@
Gets the dictionary that contains the parameters included in the Content-Type header represented by this instance.
A writable that contains name and value pairs.
- object or you can add parameters to the returned by the property.
-
- When adding a parameter entry to the dictionary, the name of the parameter is the entry's key and the value of the parameter is the entry's value.
-
- A grammar that details the syntax of the Content-Type header is described in RFC 2045 Section 5.1. RFC 2046 provides detailed information on MIME media types and their associated parameters. These RFCs are available at [https://www.ietf.org](https://www.ietf.org/).
-
-
-
-## Examples
- The following code example displays the values in the dictionary returned by this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet5":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet5":::
-
+ object or you can add parameters to the returned by the property.
+
+ When adding a parameter entry to the dictionary, the name of the parameter is the entry's key and the value of the parameter is the entry's value.
+
+ A grammar that details the syntax of the Content-Type header is described in RFC 2045 Section 5.1. RFC 2046 provides detailed information on MIME media types and their associated parameters. These RFCs are available at [https://www.ietf.org](https://www.ietf.org/).
+
+
+
+## Examples
+ The following code example displays the values in the dictionary returned by this property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet5":::
+
]]>
@@ -645,21 +637,20 @@
Returns a string representation of this object.
A that contains the current settings for this .
- method contains the string used to create this , if one was specified and no property values have been changed. If no string was specified, or one or more property values have changed since this was created, the value of is a string in the format of a Content-Type header that is composed using the current property values. The string does not include the `"Content-type:"` prefix.
-
- The syntax of the Content-Type header is described in RFC 2045 Section 5.1, available at [https://www.ietf.org](https://www.ietf.org/).
-
-
-
-## Examples
- The following code example displays the string representation of a .
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet13":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet13":::
-
+ method contains the string used to create this , if one was specified and no property values have been changed. If no string was specified, or one or more property values have changed since this was created, the value of is a string in the format of a Content-Type header that is composed using the current property values. The string does not include the `"Content-type:"` prefix.
+
+ The syntax of the Content-Type header is described in RFC 2045 Section 5.1, available at [https://www.ietf.org](https://www.ietf.org/).
+
+
+
+## Examples
+ The following code example displays the string representation of a .
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet13":::
+
]]>
diff --git a/xml/System.Net.Mime/DispositionTypeNames.xml b/xml/System.Net.Mime/DispositionTypeNames.xml
index 267897aa286..c818f55a24f 100644
--- a/xml/System.Net.Mime/DispositionTypeNames.xml
+++ b/xml/System.Net.Mime/DispositionTypeNames.xml
@@ -49,19 +49,18 @@
Supplies the strings used to specify the disposition type for an email attachment.
- property for an email attachment. The information in the class represents the MIME Content-Disposition header. This header is described in RFC 2183 available at [https://www.ietf.org](https://www.ietf.org/).
-
-
-
-## Examples
- The following code example sets the disposition type for an attachment.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet26":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet26":::
+ property for an email attachment. The information in the class represents the MIME Content-Disposition header. This header is described in RFC 2183 available at [https://www.ietf.org](https://www.ietf.org/).
+
+
+
+## Examples
+ The following code example sets the disposition type for an attachment.
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet26":::
+
]]>
@@ -107,14 +106,13 @@
Specifies that the attachment is to be displayed as a file attached to the email message.
-
@@ -160,14 +158,13 @@
Specifies that the attachment is to be displayed as part of the email message body.
-
diff --git a/xml/System.Net.Mime/TransferEncoding.xml b/xml/System.Net.Mime/TransferEncoding.xml
index 51097199c5e..2e5097b8d2e 100644
--- a/xml/System.Net.Mime/TransferEncoding.xml
+++ b/xml/System.Net.Mime/TransferEncoding.xml
@@ -42,23 +42,22 @@
Specifies the Content-Transfer-Encoding header information for an email message attachment.
- enumeration are used with the property.
-
- The Content-Transfer-Encoding header specifies the encoding of the associated message body so that it meets SMTP requirements. SMTP requires data for transport to be in 7-bit US-ASCII characters with lines no longer than 1000 characters.
-
- Content-Transfer-Encoding values are described in detail in RFC 2045 Section 6, available at [https://www.ietf.org](https://www.ietf.org/).
-
-
-
-## Examples
- The following code example displays used by an attachment.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp" id="Snippet21":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet21":::
+ enumeration are used with the property.
+
+ The Content-Transfer-Encoding header specifies the encoding of the associated message body so that it meets SMTP requirements. SMTP requires data for transport to be in 7-bit US-ASCII characters with lines no longer than 1000 characters.
+
+ Content-Transfer-Encoding values are described in detail in RFC 2045 Section 6, available at [https://www.ietf.org](https://www.ietf.org/).
+
+
+
+## Examples
+ The following code example displays used by an attachment.
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Mail/Attachment/Overview/mail.cs" id="Snippet21":::
+
]]>
diff --git a/xml/System.Net.NetworkInformation/DuplicateAddressDetectionState.xml b/xml/System.Net.NetworkInformation/DuplicateAddressDetectionState.xml
index 30c54703a30..bf6aba9bab5 100644
--- a/xml/System.Net.NetworkInformation/DuplicateAddressDetectionState.xml
+++ b/xml/System.Net.NetworkInformation/DuplicateAddressDetectionState.xml
@@ -43,22 +43,21 @@
Specifies the current state of an IP address.
- and classes. Instances of this class are returned when you retrieve the unicast address information for a object.
+
+
+
+## Examples
+ The following code example determines unicast address information.
-## Remarks
- To help ensure that all interfaces on a network have a unique address, the interface host is responsible for running a "duplicate address detection" algorithm on unicast addresses. The purpose of this algorithm is to attempt to prevent non-unique addresses on the network. This process is defined in IETF RFC 1971.
-
- This enumeration is used by the and classes. Instances of this class are returned when you retrieve the unicast address information for a object.
-
-
-
-## Examples
- The following code example determines unicast address information.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet45":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet45":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet45":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet45":::
+
]]>
diff --git a/xml/System.Net.NetworkInformation/IPAddressInformation.xml b/xml/System.Net.NetworkInformation/IPAddressInformation.xml
index e5b907ba255..de763f31e0d 100644
--- a/xml/System.Net.NetworkInformation/IPAddressInformation.xml
+++ b/xml/System.Net.NetworkInformation/IPAddressInformation.xml
@@ -50,20 +50,19 @@
Provides information about a network interface address.
- class.
+
+
+
+## Examples
+ The following code example displays the Domain Name Service (DNS) addresses for the network interfaces on the local computer.
-## Remarks
- You do not create instances of this class; instances are returned by methods in the class.
-
-
-
-## Examples
- The following code example displays the Domain Name Service (DNS) addresses for the network interfaces on the local computer.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet42":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet42":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet42":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet42":::
+
]]>
@@ -109,11 +108,11 @@
Initializes a new instance of the class.
- .
-
+ .
+
]]>
@@ -157,20 +156,19 @@
Gets the Internet Protocol (IP) address.
An instance that contains the IP address of an interface.
-
@@ -221,20 +219,19 @@
if the address can appear in a DNS database; otherwise, .
-
@@ -285,11 +282,11 @@
if the address is transient; otherwise, .
-
diff --git a/xml/System.Net.NetworkInformation/IPGlobalProperties.xml b/xml/System.Net.NetworkInformation/IPGlobalProperties.xml
index 734a58f9379..b33df8c1977 100644
--- a/xml/System.Net.NetworkInformation/IPGlobalProperties.xml
+++ b/xml/System.Net.NetworkInformation/IPGlobalProperties.xml
@@ -50,20 +50,19 @@
Provides information about the network connectivity of the local computer.
-
@@ -109,11 +108,11 @@
Initializes a new instance of the class.
- .
-
+ .
+
]]>
@@ -168,15 +167,15 @@
Begins an asynchronous request to retrieve the stable unicast IP address table on the local computer.
An that references the asynchronous request.
- method allows an application to asynchronously retrieve the list of stable unicast IP addresses. The property can be used to determine if an IP address is an IPv6 Teredo address with the prefix of 2001::/32.
-
- The method also returns non-Teredo addresses and provides a more convenient way to obtain the unicast IP addresses for a system than enumerating all the objects on a local computer and querying the associated IP addresses.
-
+ method allows an application to asynchronously retrieve the list of stable unicast IP addresses. The property can be used to determine if an IP address is an IPv6 Teredo address with the prefix of 2001::/32.
+
+ The method also returns non-Teredo addresses and provides a more convenient way to obtain the unicast IP addresses for a system than enumerating all the objects on a local computer and querying the associated IP addresses.
+
]]>
This method is not implemented on the platform. This method uses the native function that is supported on Windows Vista and later.
@@ -231,19 +230,18 @@
Gets the Dynamic Host Configuration Protocol (DHCP) scope name.
A instance that contains the computer's DHCP scope name.
-
A Win32 function call failed.
@@ -288,14 +286,13 @@
Gets the domain in which the local computer is registered.
A instance that contains the computer's domain name. If the computer does not belong to a domain, returns .
-
A Win32 function call failed.
@@ -342,17 +339,17 @@
Ends a pending asynchronous request to retrieve the stable unicast IP address table on the local computer.
An that stores state information and any user defined data for this asynchronous operation.
- method allows an application to asynchronously retrieve the list of stable unicast IP addresses. The property can be used to determine if an IP address is an IPv6 Teredo address with the prefix of 2001::/32.
-
- The method ends a pending asynchronous request to retrieve the stable unicast IP address table.
-
- The method also returns non-Teredo addresses and provides a more convenient way to obtain the unicast IP addresses for a system than enumerating all the objects on a local computer and querying the associated IP addresses.
-
+ method allows an application to asynchronously retrieve the list of stable unicast IP addresses. The property can be used to determine if an IP address is an IPv6 Teredo address with the prefix of 2001::/32.
+
+ The method ends a pending asynchronous request to retrieve the stable unicast IP address table.
+
+ The method also returns non-Teredo addresses and provides a more convenient way to obtain the unicast IP addresses for a system than enumerating all the objects on a local computer and querying the associated IP addresses.
+
]]>
The call to the native function failed.
@@ -409,21 +406,20 @@
Returns information about the Internet Protocol version 4 (IPv4) and IPv6 Transmission Control Protocol (TCP) connections on the local computer.
A array that contains objects that describe the active TCP connections, or an empty array if no active TCP connections are detected.
- state. You can check the state of a connection by calling .
-
- The TCP protocol is defined in IETF RFC 793. Note that the objects returned by this method reflect the connections as of the time the array is created. This information is not updated dynamically.
-
-
-
-## Examples
- The following example displays endpoint information for active TCP connections.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet17":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet17":::
-
+ state. You can check the state of a connection by calling .
+
+ The TCP protocol is defined in IETF RFC 793. Note that the objects returned by this method reflect the connections as of the time the array is created. This information is not updated dynamically.
+
+
+
+## Examples
+ The following example displays endpoint information for active TCP connections.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet17":::
+
]]>
The Win32 function failed.
@@ -475,21 +471,20 @@
Returns endpoint information about the Internet Protocol version 4 (IPv4) and IPv6 Transmission Control Protocol (TCP) listeners on the local computer.
A array that contains objects that describe the active TCP listeners, or an empty array, if no active TCP listeners are detected.
- state.
-
- The TCP protocol is defined in IETF RFC 793. Note that the objects returned by this method reflect the connections as of the time the array is created. This information is not updated dynamically.
-
-
-
-## Examples
- The following code example displays endpoint information for active TCP listeners.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet18":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet18":::
-
+ state.
+
+ The TCP protocol is defined in IETF RFC 793. Note that the objects returned by this method reflect the connections as of the time the array is created. This information is not updated dynamically.
+
+
+
+## Examples
+ The following code example displays endpoint information for active TCP listeners.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet18":::
+
]]>
The Win32 function failed.
@@ -541,21 +536,20 @@
Returns information about the Internet Protocol version 4 (IPv4) and IPv6 User Datagram Protocol (UDP) listeners on the local computer.
An array that contains objects that describe the UDP listeners, or an empty array if no UDP listeners are detected.
-
The call to the Win32 function failed.
@@ -607,21 +601,20 @@
Provides Internet Control Message Protocol (ICMP) version 4 statistical data for the local computer.
An object that provides ICMP version 4 traffic statistics for the local computer.
- class documentation. Note that the object returned by this method reflects the statistics as of the time the object is created. This information is not updated dynamically.
-
-
-
-## Examples
- The following example displays the current ICMPv4 statistics.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet6":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet6":::
-
+ class documentation. Note that the object returned by this method reflects the statistics as of the time the object is created. This information is not updated dynamically.
+
+
+
+## Examples
+ The following example displays the current ICMPv4 statistics.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet6":::
+
]]>
The Win32 function failed.
@@ -673,23 +666,22 @@
Provides Internet Control Message Protocol (ICMP) version 6 statistical data for the local computer.
An object that provides ICMP version 6 traffic statistics for the local computer.
- class documentation. Note that the object returned by this method reflects the statistics as of the time the object is created. This information is not updated dynamically.
-
-
-
-## Examples
- The following example displays the current ICMPv6 statistics.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet7":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet7":::
-
+ class documentation. Note that the object returned by this method reflects the statistics as of the time the object is created. This information is not updated dynamically.
+
+
+
+## Examples
+ The following example displays the current ICMPv6 statistics.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet7":::
+
]]>
The Win32 function failed.
@@ -746,19 +738,18 @@
Gets an object that provides information about the local computer's network connectivity and traffic statistics.
A object that contains information about the local computer.
- class.
-
-
-
-## Examples
- The following code example displays information about the local computer.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet15":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet15":::
-
+ class.
+
+
+
+## Examples
+ The following code example displays information about the local computer.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet15":::
+
]]>
@@ -803,21 +794,20 @@
Provides Internet Protocol version 4 (IPv4) statistical data for the local computer.
An object that provides IPv4 traffic statistics for the local computer.
- class documentation. Note that the object returned by this method reflects the statistics as of the time the object is created. This information is not updated dynamically.
-
-
-
-## Examples
- The following code example displays IP statistics for the local computer.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet1":::
-
+ class documentation. Note that the object returned by this method reflects the statistics as of the time the object is created. This information is not updated dynamically.
+
+
+
+## Examples
+ The following code example displays IP statistics for the local computer.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet1":::
+
]]>
The call to the Win32 function failed.
@@ -881,21 +871,20 @@
Provides Internet Protocol version 6 (IPv6) statistical data for the local computer.
An object that provides IPv6 traffic statistics for the local computer.
- class documentation. Note that the object returned by this method reflects the statistics as of the time the object is created. This information is not updated dynamically.
-
-
-
-## Examples
- The following code example displays IP statistics for the local computer.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet1":::
-
+ class documentation. Note that the object returned by this method reflects the statistics as of the time the object is created. This information is not updated dynamically.
+
+
+
+## Examples
+ The following code example displays IP statistics for the local computer.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet1":::
+
]]>
The call to the Win32 function failed.
@@ -948,21 +937,20 @@
Provides Transmission Control Protocol/Internet Protocol version 4 (TCP/IPv4) statistical data for the local computer.
A object that provides TCP/IPv4 traffic statistics for the local computer.
- class documentation. Note that the object returned by this method reflects the statistics as of the time the object is created. This information is not updated dynamically.
-
-
-
-## Examples
- The following example displays the TCP/IP statistics for the local computer.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet2":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet2":::
-
+ class documentation. Note that the object returned by this method reflects the statistics as of the time the object is created. This information is not updated dynamically.
+
+
+
+## Examples
+ The following example displays the TCP/IP statistics for the local computer.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet2":::
+
]]>
The call to the Win32 function failed.
@@ -1014,21 +1002,20 @@
Provides Transmission Control Protocol/Internet Protocol version 6 (TCP/IPv6) statistical data for the local computer.
A object that provides TCP/IPv6 traffic statistics for the local computer.
- class documentation. Note that the object returned by this method reflects the statistics as of the time the object is created. This information is not updated dynamically.
-
-
-
-## Examples
- The following example displays the TCP/IP statistics for the local computer.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet2":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet2":::
-
+ class documentation. Note that the object returned by this method reflects the statistics as of the time the object is created. This information is not updated dynamically.
+
+
+
+## Examples
+ The following example displays the TCP/IP statistics for the local computer.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet2":::
+
]]>
The call to the Win32 function failed.
@@ -1081,21 +1068,20 @@
Provides User Datagram Protocol/Internet Protocol version 4 (UDP/IPv4) statistical data for the local computer.
A object that provides UDP/IPv4 traffic statistics for the local computer.
- class documentation. Note that the object returned by this method reflects the statistics as of the time the object is created. This information is not updated dynamically.
-
-
-
-## Examples
- The following example displays the UDP/IP statistics for the local computer.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet3":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet3":::
-
+ class documentation. Note that the object returned by this method reflects the statistics as of the time the object is created. This information is not updated dynamically.
+
+
+
+## Examples
+ The following example displays the UDP/IP statistics for the local computer.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet3":::
+
]]>
The call to the Win32 function GetUdpStatistics failed.
@@ -1147,21 +1133,20 @@
Provides User Datagram Protocol/Internet Protocol version 6 (UDP/IPv6) statistical data for the local computer.
A object that provides UDP/IPv6 traffic statistics for the local computer.
- class documentation. Note that the object returned by this method reflects the statistics as of the time the object is created. This information is not updated dynamically.
-
-
-
-## Examples
- The following example displays the UDP/IP statistics for the local computer.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet3":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet3":::
-
+ class documentation. Note that the object returned by this method reflects the statistics as of the time the object is created. This information is not updated dynamically.
+
+
+
+## Examples
+ The following example displays the UDP/IP statistics for the local computer.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet3":::
+
]]>
The call to the Win32 function failed.
@@ -1206,15 +1191,15 @@
Retrieves the stable unicast IP address table on the local computer.
A that contains a list of stable unicast IP addresses on the local computer.
- method will allow an application to retrieve the list of stable unicast IP addresses. The property can be used to determine if an IP address is an IPv6 Teredo address with the prefix of 2001::/32.
-
- The method also returns non-Teredo addresses and provides a more convenient way to obtain the unicast IP addresses for a system than enumerating all the objects on a local computer and querying the associated IP addresses.
-
+ method will allow an application to retrieve the list of stable unicast IP addresses. The property can be used to determine if an IP address is an IPv6 Teredo address with the prefix of 2001::/32.
+
+ The method also returns non-Teredo addresses and provides a more convenient way to obtain the unicast IP addresses for a system than enumerating all the objects on a local computer and querying the associated IP addresses.
+
]]>
The call to the native function failed.
@@ -1266,15 +1251,15 @@
Retrieves the stable unicast IP address table on the local computer as an asynchronous operation.
The task object representing the asynchronous operation.
- method will allow an application to retrieve the list of stable unicast IP addresses as asynchronous operation. The property can be used to determine if an IP address is an IPv6 Teredo address with the prefix of 2001::/32.
-
- The method also returns non-Teredo addresses and provides a more convenient way to obtain the unicast IP addresses for a system than enumerating all the objects on a local computer and querying the associated IP addresses.
-
+ method will allow an application to retrieve the list of stable unicast IP addresses as asynchronous operation. The property can be used to determine if an IP address is an IPv6 Teredo address with the prefix of 2001::/32.
+
+ The method also returns non-Teredo addresses and provides a more convenient way to obtain the unicast IP addresses for a system than enumerating all the objects on a local computer and querying the associated IP addresses.
+
This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by .
]]>
@@ -1327,21 +1312,20 @@
Gets the host name for the local computer.
A instance that contains the computer's NetBIOS name.
-
A Win32 function call failed.
@@ -1393,19 +1377,18 @@
if the local computer is a WINS proxy; otherwise, .
-
A Win32 function call failed.
@@ -1450,19 +1433,18 @@
Gets the Network Basic Input/Output System (NetBIOS) node type of the local computer.
A value.
- class overview.
-
-
-
-## Examples
- The following code example displays network information for the local computer.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet15":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet15":::
-
+ class overview.
+
+
+
+## Examples
+ The following code example displays network information for the local computer.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet15":::
+
]]>
A Win32 function call failed.
diff --git a/xml/System.Net.NetworkInformation/IPGlobalStatistics.xml b/xml/System.Net.NetworkInformation/IPGlobalStatistics.xml
index 746e8456739..57dd4a535de 100644
--- a/xml/System.Net.NetworkInformation/IPGlobalStatistics.xml
+++ b/xml/System.Net.NetworkInformation/IPGlobalStatistics.xml
@@ -44,23 +44,22 @@
Provides Internet Protocol (IP) statistical data.
- and methods to return IP traffic information.
-
- The Internet protocol is used to move IP packets from a source computer to a destination computer. IP also handles dividing a packet that is too large into multiple packets that are small enough for transport, in a process known as fragmentation.
-
- The properties in this class correlate to the Management Information Base objects for IP defined in IETF RFC 2011.
-
-
-
-## Examples
- The following code example displays IP statistics.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet1":::
-
+ and methods to return IP traffic information.
+
+ The Internet protocol is used to move IP packets from a source computer to a destination computer. IP also handles dividing a packet that is too large into multiple packets that are small enough for transport, in a process known as fragmentation.
+
+ The properties in this class correlate to the Management Information Base objects for IP defined in IETF RFC 2011.
+
+
+
+## Examples
+ The following code example displays IP statistics.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet1":::
+
]]>
@@ -106,11 +105,11 @@
Initializes a new instance of the class.
- .
-
+ .
+
]]>
@@ -160,20 +159,19 @@
Gets the default time-to-live (TTL) value for Internet Protocol (IP) packets.
An value that specifies the TTL.
-
@@ -223,20 +221,19 @@
Gets a value that specifies whether Internet Protocol (IP) packet forwarding is enabled.
A value that specifies whether packet forwarding is enabled.
-
@@ -280,13 +277,13 @@
Gets the number of network interfaces.
An value containing the number of network interfaces for the address family used to obtain this instance.
-
@@ -330,13 +327,13 @@
Gets the number of Internet Protocol (IP) addresses assigned to the local computer.
An value that indicates the number of IP addresses assigned to the address family (Internet Protocol version 4 or Internet Protocol version 6) described by this object.
- , this property returns the number of IPv4 addresses assigned to the local computer. Similarly, if this instance was obtained by calling , this property returns the number of IPv6 addresses assigned to the local computer.
-
+ , this property returns the number of IPv4 addresses assigned to the local computer. Similarly, if this instance was obtained by calling , this property returns the number of IPv6 addresses assigned to the local computer.
+
]]>
@@ -433,20 +430,19 @@
Gets the number of outbound Internet Protocol (IP) packets.
An value that specifies the total number of outgoing packets.
-
@@ -496,20 +492,19 @@
Gets the number of routes that have been discarded from the routing table.
An value that specifies the total number of valid routes that have been discarded.
-
@@ -559,20 +554,19 @@
Gets the number of transmitted Internet Protocol (IP) packets that have been discarded.
An value that specifies the total number of outgoing packets that have been discarded.
-
@@ -622,20 +616,19 @@
Gets the number of Internet Protocol (IP) packets for which the local computer could not determine a route to the destination address.
An value that specifies the number of packets that could not be sent because a route could not be found.
-
@@ -685,20 +678,19 @@
Gets the number of Internet Protocol (IP) packets that could not be fragmented.
An value that specifies the total number of packets that required fragmentation but had the "Don't Fragment" bit set.
-
@@ -748,20 +740,19 @@
Gets the number of Internet Protocol (IP) packets that required reassembly.
An value that specifies the total number of packet reassemblies required.
-
@@ -811,20 +802,19 @@
Gets the number of Internet Protocol (IP) packets that were not successfully reassembled.
An value that specifies the total number of packets that could not be reassembled.
-
@@ -874,20 +864,19 @@
Gets the maximum amount of time within which all fragments of an Internet Protocol (IP) packet must arrive.
An value that specifies the maximum number of milliseconds within which all fragments of a packet must arrive to avoid being discarded.
-
@@ -937,20 +926,19 @@
Gets the number of Internet Protocol (IP) packets fragmented.
An value that specifies the total number of fragmented packets.
-
@@ -1000,20 +988,19 @@
Gets the number of Internet Protocol (IP) packets reassembled.
An value that specifies the total number of fragmented packets that have been successfully reassembled.
-
@@ -1063,20 +1050,19 @@
Gets the number of Internet Protocol (IP) packets received.
An value that specifies the total number of IP packets received.
-
@@ -1126,20 +1112,19 @@
Gets the number of Internet Protocol (IP) packets delivered.
An value that specifies the total number of IP packets delivered.
-
@@ -1189,20 +1174,19 @@
Gets the number of Internet Protocol (IP) packets that have been received and discarded.
An value that specifies the total number of incoming packets that have been discarded.
-
@@ -1252,20 +1236,19 @@
Gets the number of Internet Protocol (IP) packets forwarded.
An value that specifies the total number of forwarded packets.
-
@@ -1315,20 +1298,19 @@
Gets the number of Internet Protocol (IP) packets with address errors that were received.
An value that specifies the total number of IP packets received with errors in the address portion of the header.
-
@@ -1378,20 +1360,19 @@
Gets the number of Internet Protocol (IP) packets with header errors that were received.
An value that specifies the total number of IP packets received and discarded due to errors in the header.
-
@@ -1441,20 +1422,19 @@
Gets the number of Internet Protocol (IP) packets received on the local machine with an unknown protocol in the header.
An value that indicates the total number of IP packets received with an unknown protocol.
-
diff --git a/xml/System.Net.NetworkInformation/IPInterfaceProperties.xml b/xml/System.Net.NetworkInformation/IPInterfaceProperties.xml
index d85efc8d377..76beac4f75e 100644
--- a/xml/System.Net.NetworkInformation/IPInterfaceProperties.xml
+++ b/xml/System.Net.NetworkInformation/IPInterfaceProperties.xml
@@ -50,21 +50,20 @@
Provides information about network interfaces that support Internet Protocol version 4 (IPv4) or Internet Protocol version 6 (IPv6).
- method.
-
- To access IPv4-specific properties, use the object returned by the method. To access IPv6-specific properties, use the object returned by the method.
-
-
-
-## Examples
- The following code example displays address information.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet8":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet8":::
+ method.
+
+ To access IPv4-specific properties, use the object returned by the method. To access IPv6-specific properties, use the object returned by the method.
+
+
+
+## Examples
+ The following code example displays address information.
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet8":::
+
]]>
@@ -110,11 +109,11 @@
Initializes a new instance of the class.
- .
-
+ .
+
]]>
@@ -164,20 +163,19 @@
Gets the anycast IP addresses assigned to this interface.
An that contains the anycast addresses for this interface.
-
@@ -243,20 +241,19 @@
Gets the addresses of Dynamic Host Configuration Protocol (DHCP) servers for this interface.
An that contains the address information for DHCP servers, or an empty array if no servers are found.
-
@@ -306,20 +303,19 @@
Gets the addresses of Domain Name System (DNS) servers for this interface.
A that contains the DNS server addresses.
-
@@ -369,20 +365,19 @@
Gets the Domain Name System (DNS) suffix associated with this interface.
A that contains the DNS suffix for this interface, or if there is no DNS suffix for the interface.
- , and must resolve the unqualified host name "www", the FQDN to query is "www.contoso.com".
-
-
-
-## Examples
- The following code example displays the DNS suffix.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet41":::
+ , and must resolve the unqualified host name "www", the FQDN to query is "www.contoso.com".
+
+
+
+## Examples
+ The following code example displays the DNS suffix.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet41":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet41":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet41":::
+
]]>
@@ -432,20 +427,19 @@
Gets the IPv4 network gateway addresses for this interface.
An that contains the address information for network gateways, or an empty array if no gateways are found.
-
@@ -490,10 +484,10 @@
Provides Internet Protocol version 4 (IPv4) configuration data for this network interface.
An object that contains IPv4 configuration data.
- class documentation. Note that the object returned by the method reflects the configuration as of the time the object is created. This information is not updated dynamically.
+ class documentation. Note that the object returned by the method reflects the configuration as of the time the object is created. This information is not updated dynamically.
A is thrown if the interface does not support the IPv4 protocol, therefore it's recommended to check IPv4 support calling on the originating instance before querying the IPv4 properties.
]]>
@@ -541,12 +535,12 @@
Provides Internet Protocol version 6 (IPv6) configuration data for this network interface.
An object that contains IPv6 configuration data.
- documentation. Note that the object returned by the method reflects the configuration as of the time the object is created. This information is not updated dynamically.
+ documentation. Note that the object returned by the method reflects the configuration as of the time the object is created. This information is not updated dynamically.
A is thrown if the interface does not support the IPv6 protocol, therefore it's recommended to check IPv6 support calling on the originating instance before querying the IPv6 properties.
-
+
]]>
The interface does not support the IPv6 protocol.
@@ -614,20 +608,19 @@
if NetBt is configured to use DNS name resolution on this interface; otherwise, .
-
@@ -678,20 +671,19 @@
if this interface is configured to automatically register a mapping between its dynamic IP address and static domain names; otherwise, .
-
@@ -735,20 +727,19 @@
Gets the multicast addresses assigned to this interface.
An that contains the multicast addresses for this interface.
-
@@ -792,20 +783,19 @@
Gets the unicast addresses assigned to this interface.
An that contains the unicast addresses for this interface.
-
@@ -871,11 +861,11 @@
Gets the addresses of Windows Internet Name Service (WINS) servers.
An that contains the address information for WINS servers, or an empty array if no servers are found.
-
diff --git a/xml/System.Net.NetworkInformation/IPStatus.xml b/xml/System.Net.NetworkInformation/IPStatus.xml
index 45ca0e8b967..564e5fb03a5 100644
--- a/xml/System.Net.NetworkInformation/IPStatus.xml
+++ b/xml/System.Net.NetworkInformation/IPStatus.xml
@@ -43,23 +43,22 @@
Reports the status of sending an Internet Control Message Protocol (ICMP) echo message to a computer.
- class uses the values in this enumeration to set the property. The class returns objects when you call the or methods to check whether you can reach a computer across the network.
-
+ class uses the values in this enumeration to set the property. The class returns objects when you call the or methods to check whether you can reach a computer across the network.
+
> [!WARNING]
-> The DestinationProhibited and DestinationProtocolUnreachable enumeration values have the same numeric value. This is possible because DestinationProhibited applies only to IPv6 and DestinationProtocolUnreachable applies only to IPv4.
-
-
-
-## Examples
- The following code example sends an ICMP echo message and checks the status.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclPingSync/CPP/syncping.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.cs" id="Snippet1":::
- :::code language="fsharp" source="~/snippets/fsharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.fs" id="Snippet1":::
+> The DestinationProhibited and DestinationProtocolUnreachable enumeration values have the same numeric value. This is possible because DestinationProhibited applies only to IPv6 and DestinationProtocolUnreachable applies only to IPv4.
+
+
+
+## Examples
+ The following code example sends an ICMP echo message and checks the status.
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.cs" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.fs" id="Snippet1":::
+
]]>
diff --git a/xml/System.Net.NetworkInformation/IPv4InterfaceProperties.xml b/xml/System.Net.NetworkInformation/IPv4InterfaceProperties.xml
index 328c80eb628..54dd3029ea4 100644
--- a/xml/System.Net.NetworkInformation/IPv4InterfaceProperties.xml
+++ b/xml/System.Net.NetworkInformation/IPv4InterfaceProperties.xml
@@ -44,22 +44,21 @@
Provides information about network interfaces that support Internet Protocol version 4 (IPv4).
- method.
+
+ For IPV6 properties, see .
+
+
+
+## Examples
+ The following code example gets an object and displays its data.
-## Remarks
- This class provides access to configuration and address information for network interfaces that support IPv4. You do not create instances of this class; they are returned by the method.
-
- For IPV6 properties, see .
-
-
-
-## Examples
- The following code example gets an object and displays its data.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet48":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet48":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet48":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet48":::
+
]]>
@@ -105,11 +104,11 @@
Initializes a new instance of the class.
- .
-
+ .
+
]]>
@@ -153,20 +152,19 @@
Gets the index of the network interface associated with the Internet Protocol version 4 (IPv4) address.
An that contains the index of the IPv4 interface.
- object and displays its data.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet48":::
+ object and displays its data.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet48":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet48":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet48":::
+
]]>
@@ -217,20 +215,19 @@
if the interface uses an APIPA address; otherwise, .
- object and displays its data.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet48":::
+ object and displays its data.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet48":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet48":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet48":::
+
]]>
@@ -281,20 +278,19 @@
if the interface uses APIPA; otherwise, .
- object and displays its data.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet48":::
+ object and displays its data.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet48":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet48":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet48":::
+
]]>
@@ -345,20 +341,19 @@
if the interface is configured to obtain an IP address from a DHCP server; otherwise, .
- object and displays its data.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet48":::
+ object and displays its data.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet48":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet48":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet48":::
+
]]>
@@ -413,20 +408,19 @@
if this interface routes packets; otherwise .
- object and displays its data.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet48":::
+ object and displays its data.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet48":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet48":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet48":::
+
]]>
@@ -470,20 +464,19 @@
Gets the maximum transmission unit (MTU) for this network interface.
An value that specifies the MTU.
- object and displays its data.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet48":::
+ object and displays its data.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet48":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet48":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet48":::
+
]]>
@@ -538,20 +531,19 @@
if the interface uses WINS; otherwise, .
- object and displays its data.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet48":::
+ object and displays its data.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet48":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet48":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet48":::
+
]]>
diff --git a/xml/System.Net.NetworkInformation/IPv6InterfaceProperties.xml b/xml/System.Net.NetworkInformation/IPv6InterfaceProperties.xml
index 6d3cb7bec78..74d16e7de5c 100644
--- a/xml/System.Net.NetworkInformation/IPv6InterfaceProperties.xml
+++ b/xml/System.Net.NetworkInformation/IPv6InterfaceProperties.xml
@@ -44,22 +44,21 @@
Provides information about network interfaces that support Internet Protocol version 6 (IPv6).
- method.
-
- For IPV4 properties, see .
-
-
-
-## Examples
- The following code example gets an object and displays its data.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet49":::
+ method.
+
+ For IPV4 properties, see .
+
+
+
+## Examples
+ The following code example gets an object and displays its data.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet49":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet49":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet49":::
+
]]>
@@ -105,11 +104,11 @@
Initializes a new instance of the class.
- .
-
+ .
+
]]>
@@ -215,20 +214,19 @@
Gets the index of the network interface associated with an Internet Protocol version 6 (IPv6) address.
An value that contains the index of the network interface for IPv6 address.
- object and displays its data.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet49":::
+ object and displays its data.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet49":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet49":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet49":::
+
]]>
@@ -272,20 +270,19 @@
Gets the maximum transmission unit (MTU) for this network interface.
An value that specifies the MTU.
- object and displays its data.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet49":::
+ object and displays its data.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet49":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet49":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet49":::
+
]]>
diff --git a/xml/System.Net.NetworkInformation/IcmpV4Statistics.xml b/xml/System.Net.NetworkInformation/IcmpV4Statistics.xml
index 4b4dfd5e5e7..4a4358c1d81 100644
--- a/xml/System.Net.NetworkInformation/IcmpV4Statistics.xml
+++ b/xml/System.Net.NetworkInformation/IcmpV4Statistics.xml
@@ -44,21 +44,20 @@
Provides Internet Control Message Protocol for IPv4 (ICMPv4) statistical data for the local computer.
- method to return ICMPv4 traffic information.
-
-
-
-## Examples
- The following example displays the current ICMPv4 statistics.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet6":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet6":::
-
+ method to return ICMPv4 traffic information.
+
+
+
+## Examples
+ The following example displays the current ICMPv4 statistics.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet6":::
+
]]>
@@ -104,11 +103,11 @@
Initializes a new instance of the class.
- .
-
+ .
+
]]>
@@ -152,20 +151,19 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Address Mask Reply messages that were received.
An value that specifies the total number of Address Mask Reply messages that were received.
-
@@ -209,20 +207,19 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Address Mask Reply messages that were sent.
An value that specifies the total number of Address Mask Reply messages that were sent.
-
@@ -266,20 +263,19 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Address Mask Request messages that were received.
An value that specifies the total number of Address Mask Request messages that were received.
-
@@ -323,20 +319,19 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Address Mask Request messages that were sent.
An value that specifies the total number of Address Mask Request messages that were sent.
-
@@ -380,28 +375,27 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) messages that were received because of a packet having an unreachable address in its destination.
An value that specifies the total number of Destination Unreachable messages that were received.
-
@@ -445,26 +439,25 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) messages that were sent because of a packet having an unreachable address in its destination.
An value that specifies the total number of Destination Unreachable messages sent.
-
@@ -508,20 +501,19 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Echo Reply messages that were received.
An value that specifies the total number of number of ICMP Echo Reply messages that were received.
-
@@ -565,20 +557,19 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Echo Reply messages that were sent.
An value that specifies the total number of number of ICMP Echo Reply messages that were sent.
-
@@ -622,20 +613,19 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Echo Request messages that were received.
An value that specifies the total number of number of ICMP Echo Request messages that were received.
-
@@ -679,20 +669,19 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Echo Request messages that were sent.
An value that specifies the total number of number of ICMP Echo Request messages that were sent.
-
@@ -754,15 +743,14 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) error messages that were received.
An value that specifies the total number of ICMP error messages that were received.
-
@@ -824,15 +812,14 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) error messages that were sent.
An value that specifies the total number of number of ICMP error messages that were sent.
-
@@ -894,20 +881,19 @@
Gets the number of Internet Control Message Protocol messages that were received.
An value that specifies the total number of ICMPv4 messages that were received.
-
@@ -969,20 +955,19 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) messages that were sent.
An value that specifies the total number of ICMPv4 messages that were sent.
-
@@ -1026,20 +1011,19 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Parameter Problem messages that were received.
An value that specifies the total number of ICMP Parameter Problem messages that were received.
-
@@ -1083,20 +1067,19 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Parameter Problem messages that were sent.
An value that specifies the total number of ICMP Parameter Problem messages that were sent.
-
@@ -1140,20 +1123,19 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Redirect messages that were received.
An value that specifies the total number of ICMP Redirect messages that were received.
-
@@ -1197,20 +1179,19 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Redirect messages that were sent.
An value that specifies the total number of ICMP Redirect messages that were sent.
-
@@ -1254,20 +1235,19 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Source Quench messages that were received.
An value that specifies the total number of Source Quench messages that were received.
-
@@ -1311,20 +1291,19 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Source Quench messages that were sent.
An value that specifies the total number of Source Quench messages that were sent.
-
@@ -1368,20 +1347,19 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Time Exceeded messages that were received.
An value that specifies the total number of ICMP Time Exceeded messages that were received.
-
@@ -1425,20 +1403,19 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Time Exceeded messages that were sent.
An value that specifies the total number of ICMP Time Exceeded messages that were sent.
-
@@ -1482,20 +1459,19 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Timestamp Reply messages that were received.
An value that specifies the total number of Timestamp Reply messages that were received.
-
@@ -1539,20 +1515,19 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Timestamp Reply messages that were sent.
An value that specifies the total number of Timestamp Reply messages that were sent.
-
@@ -1596,20 +1571,19 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Timestamp Request messages that were received.
An value that specifies the total number of Timestamp Request messages that were received.
-
@@ -1653,20 +1627,19 @@
Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Timestamp Request messages that were sent.
An value that specifies the total number of Timestamp Request messages that were sent.
-
diff --git a/xml/System.Net.NetworkInformation/IcmpV6Statistics.xml b/xml/System.Net.NetworkInformation/IcmpV6Statistics.xml
index 08c6ec3d62d..bb8634a70c6 100644
--- a/xml/System.Net.NetworkInformation/IcmpV6Statistics.xml
+++ b/xml/System.Net.NetworkInformation/IcmpV6Statistics.xml
@@ -44,21 +44,20 @@
Provides Internet Control Message Protocol for Internet Protocol version 6 (ICMPv6) statistical data for the local computer.
- method to return ICMPV6 traffic information.
-
- The properties in this class correlate to the Management Information Base objects for ICMPv6 defined in IETF RFC 2466. ICMPv6 is defined in RFC 2463.
-
-
-
-## Examples
- The following example displays the current ICMPv6 statistics.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet7":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet7":::
-
+ method to return ICMPV6 traffic information.
+
+ The properties in this class correlate to the Management Information Base objects for ICMPv6 defined in IETF RFC 2466. ICMPv6 is defined in RFC 2463.
+
+
+
+## Examples
+ The following example displays the current ICMPv6 statistics.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet7":::
+
]]>
@@ -104,11 +103,11 @@
Initializes a new instance of the class.
- .
-
+ .
+
]]>
@@ -152,28 +151,27 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) messages received because of a packet having an unreachable address in its destination.
An value that specifies the total number of Destination Unreachable messages received.
-
@@ -217,28 +215,27 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) messages sent because of a packet having an unreachable address in its destination.
An value that specifies the total number of Destination Unreachable messages sent.
-
@@ -282,20 +279,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Echo Reply messages received.
An value that specifies the total number of number of ICMP Echo Reply messages received.
-
@@ -339,20 +335,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Echo Reply messages sent.
An value that specifies the total number of number of ICMP Echo Reply messages sent.
-
@@ -396,20 +391,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Echo Request messages received.
An value that specifies the total number of number of ICMP Echo Request messages received.
-
@@ -453,20 +447,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Echo Request messages sent.
An value that specifies the total number of number of ICMP Echo Request messages sent.
-
@@ -528,15 +521,14 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) error messages received.
An value that specifies the total number of ICMP error messages received.
-
@@ -598,15 +590,14 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) error messages sent.
An value that specifies the total number of ICMP error messages sent.
-
@@ -650,20 +641,19 @@
Gets the number of Internet Group management Protocol (IGMP) Group Membership Query messages received.
An value that specifies the total number of Group Membership Query messages received.
-
@@ -707,20 +697,19 @@
Gets the number of Internet Group management Protocol (IGMP) Group Membership Query messages sent.
An value that specifies the total number of Group Membership Query messages sent.
-
@@ -764,20 +753,19 @@
Gets the number of Internet Group Management Protocol (IGMP) Group Membership Reduction messages received.
An value that specifies the total number of Group Membership Reduction messages received.
-
@@ -821,20 +809,19 @@
Gets the number of Internet Group Management Protocol (IGMP) Group Membership Reduction messages sent.
An value that specifies the total number of Group Membership Reduction messages sent.
-
@@ -878,20 +865,19 @@
Gets the number of Internet Group Management Protocol (IGMP) Group Membership Report messages received.
An value that specifies the total number of Group Membership Report messages received.
-
@@ -935,20 +921,19 @@
Gets the number of Internet Group Management Protocol (IGMP) Group Membership Report messages sent.
An value that specifies the total number of Group Membership Report messages sent.
-
@@ -1010,20 +995,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) messages received.
An value that specifies the total number of ICMPv6 messages received.
-
@@ -1085,20 +1069,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) messages sent.
An value that specifies the total number of ICMPv6 messages sent.
-
@@ -1142,20 +1125,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Neighbor Advertisement messages received.
An value that specifies the total number of ICMP Neighbor Advertisement messages received.
-
@@ -1199,20 +1181,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Neighbor Advertisement messages sent.
An value that specifies the total number of Neighbor Advertisement messages sent.
-
@@ -1256,20 +1237,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Neighbor Solicitation messages received.
An value that specifies the total number of Neighbor Solicitation messages received.
-
@@ -1313,20 +1293,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Neighbor Solicitation messages sent.
An value that specifies the total number of Neighbor Solicitation messages sent.
-
@@ -1370,20 +1349,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Packet Too Big messages received.
An value that specifies the total number of ICMP Packet Too Big messages received.
-
@@ -1427,20 +1405,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Packet Too Big messages sent.
An value that specifies the total number of ICMP Packet Too Big messages sent.
-
@@ -1484,20 +1461,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Parameter Problem messages received.
An value that specifies the total number of ICMP Parameter Problem messages received.
-
@@ -1541,20 +1517,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Parameter Problem messages sent.
An value that specifies the total number of ICMP Parameter Problem messages sent.
-
@@ -1598,20 +1573,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Redirect messages received.
An value that specifies the total number of ICMP Redirect messages received.
-
@@ -1655,20 +1629,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Redirect messages sent.
An value that specifies the total number of ICMP Redirect messages sent.
-
@@ -1712,20 +1685,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Router Advertisement messages received.
An value that specifies the total number of Router Advertisement messages received.
-
@@ -1769,20 +1741,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Router Advertisement messages sent.
An value that specifies the total number of Router Advertisement messages sent.
-
@@ -1826,20 +1797,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Router Solicitation messages received.
An value that specifies the total number of Router Solicitation messages received.
-
@@ -1883,20 +1853,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Router Solicitation messages sent.
An value that specifies the total number of Router Solicitation messages sent.
-
@@ -1940,20 +1909,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Time Exceeded messages received.
An value that specifies the total number of ICMP Time Exceeded messages received.
-
@@ -1997,20 +1965,19 @@
Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Time Exceeded messages sent.
An value that specifies the total number of ICMP Time Exceeded messages sent.
-
diff --git a/xml/System.Net.NetworkInformation/NetworkChange.xml b/xml/System.Net.NetworkInformation/NetworkChange.xml
index d6767ccbaff..644b5592ef3 100644
--- a/xml/System.Net.NetworkInformation/NetworkChange.xml
+++ b/xml/System.Net.NetworkInformation/NetworkChange.xml
@@ -64,22 +64,21 @@
Allows applications to receive notification when the Internet Protocol (IP) address of a network interface, also called a network card or adapter, changes.
- class provides address change notification by raising events. An interface address can change for many reasons, such as a disconnected network cable, moving out of range of a wireless Local Area Network, or hardware failure.
+
+ To receive notification, you must identify your application's event handlers, which are one or more methods that perform your application-specific tasks each time the event is raised. To have a object call your event-handling methods when a event occurs, you must associate the methods with a delegate, and add this delegate to the event.
+
+
+
+## Examples
+ The following code example listens for address changes and displays the status of network interfaces when a event occurs.
-## Remarks
- The class provides address change notification by raising events. An interface address can change for many reasons, such as a disconnected network cable, moving out of range of a wireless Local Area Network, or hardware failure.
-
- To receive notification, you must identify your application's event handlers, which are one or more methods that perform your application-specific tasks each time the event is raised. To have a object call your event-handling methods when a event occurs, you must associate the methods with a delegate, and add this delegate to the event.
-
-
-
-## Examples
- The following code example listens for address changes and displays the status of network interfaces when a event occurs.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclNetAddressChanged1/CPP/changed.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/NetworkChange/Overview/changed.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclNetAddressChanged1/VB/changed.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclNetAddressChanged1/VB/changed.vb" id="Snippet1":::
+
]]>
@@ -183,20 +182,19 @@
Occurs when the IP address of a network interface changes.
- class raises events when the address of a network interface, also called a network card or adapter, changes.
-
- To have a object call an event-handling method when a event occurs, you must associate the method with a delegate, and add this delegate to this event.
-
-## Examples
- The following code example listens for address changes and displays the status of network interfaces when a event occurs.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclNetAddressChanged1/CPP/changed.cpp" id="Snippet1":::
+ class raises events when the address of a network interface, also called a network card or adapter, changes.
+
+ To have a object call an event-handling method when a event occurs, you must associate the method with a delegate, and add this delegate to this event.
+
+## Examples
+ The following code example listens for address changes and displays the status of network interfaces when a event occurs.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/NetworkChange/Overview/changed.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclNetAddressChanged1/VB/changed.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclNetAddressChanged1/VB/changed.vb" id="Snippet1":::
+
]]>
@@ -252,13 +250,13 @@
Occurs when the availability of the network changes.
- class raises events when the availability of the network changes. The network is available when at least one network interface is marked "up" and is not a tunnel or loopback interface.
-
- To have a object call an event-handling method when a event occurs, you must associate the method with a delegate, and add this delegate to this event.
-
+ class raises events when the availability of the network changes. The network is available when at least one network interface is marked "up" and is not a tunnel or loopback interface.
+
+ To have a object call an event-handling method when a event occurs, you must associate the method with a delegate, and add this delegate to this event.
+
]]>
diff --git a/xml/System.Net.NetworkInformation/NetworkInformationAccess.xml b/xml/System.Net.NetworkInformation/NetworkInformationAccess.xml
index 525cd613424..9ed99aff52d 100644
--- a/xml/System.Net.NetworkInformation/NetworkInformationAccess.xml
+++ b/xml/System.Net.NetworkInformation/NetworkInformationAccess.xml
@@ -38,20 +38,19 @@
Specifies permission to access information about network interfaces and traffic statistics.
- class to specify the level of access to information that the permission object controls.
+
+
+
+## Examples
+ The following code example creates a permission that controls Read access to network information.
-## Remarks
- This enumeration is used with the class to specify the level of access to information that the permission object controls.
-
-
-
-## Examples
- The following code example creates a permission that controls Read access to network information.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclNetworkInfoPerms/CPP/NclNetworkInfoPerms.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/NetworkInformationAccess/Overview/permissionexample.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclNetworkInfoPerms/VB/permissionexample.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclNetworkInfoPerms/VB/permissionexample.vb" id="Snippet3":::
+
]]>
diff --git a/xml/System.Net.NetworkInformation/NetworkInterface.xml b/xml/System.Net.NetworkInformation/NetworkInterface.xml
index a129824fea6..bffc6dfc1fd 100644
--- a/xml/System.Net.NetworkInformation/NetworkInterface.xml
+++ b/xml/System.Net.NetworkInformation/NetworkInterface.xml
@@ -71,7 +71,6 @@
## Examples
The following code example displays information about interfaces.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet12":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet12":::
]]>
@@ -186,7 +185,6 @@
## Examples
The following code example displays a summary for all interfaces on the local computer.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet16":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet16":::
]]>
@@ -256,7 +254,6 @@
## Examples
The following code example displays Domain Name Service (DNS) configuration information for the local computer's network adapters.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet41":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet41":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet41":::
@@ -322,7 +319,6 @@
## Examples
The following code example displays information for the local computer's network adapters that support IPv4.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet48":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet48":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet48":::
@@ -555,7 +551,6 @@
## Examples
The following code example displays the physical addresses of all interfaces on the local computer.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet51":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet51":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet51":::
@@ -722,7 +717,6 @@
## Examples
The following code example displays a summary for all interfaces on the local computer.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet51":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet51":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet51":::
@@ -846,7 +840,6 @@
## Examples
The following code example displays a summary for all interfaces on the local computer.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet16":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet16":::
]]>
@@ -912,7 +905,6 @@
## Examples
The following example displays type information for all interfaces on the local computer.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet51":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet51":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet51":::
@@ -975,7 +967,6 @@
## Examples
The following code example displays a summary for all interfaces on the local computer.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet16":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet16":::
]]>
@@ -1037,7 +1028,6 @@
## Examples
The following code example demonstrates displaying the speed of interfaces on the local computer.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet13":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet13":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet13":::
@@ -1101,7 +1091,6 @@
## Examples
The following code example displays statistics for IPV4 interfaces on the local computer.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet48":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet48":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet48":::
@@ -1165,7 +1154,6 @@
## Examples
The following code example displays a summary for all interfaces on the local computer.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet51":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet51":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet51":::
diff --git a/xml/System.Net.NetworkInformation/NetworkInterfaceComponent.xml b/xml/System.Net.NetworkInformation/NetworkInterfaceComponent.xml
index 1eb0c008bc4..874cb069e08 100644
--- a/xml/System.Net.NetworkInformation/NetworkInterfaceComponent.xml
+++ b/xml/System.Net.NetworkInformation/NetworkInterfaceComponent.xml
@@ -43,20 +43,19 @@
Specifies the Internet Protocol versions that are supported by a network interface.
- method to specify the Internet Protocol version supported by a network interface.
+
+
+
+## Examples
+ The following code example checks whether a network interface supports IPv4.
-## Remarks
- The values in this enumeration are used by the method to specify the Internet Protocol version supported by a network interface.
-
-
-
-## Examples
- The following code example checks whether a network interface supports IPv4.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet48":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet48":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet48":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet48":::
+
]]>
diff --git a/xml/System.Net.NetworkInformation/OperationalStatus.xml b/xml/System.Net.NetworkInformation/OperationalStatus.xml
index 53e0cd95945..f084598bffe 100644
--- a/xml/System.Net.NetworkInformation/OperationalStatus.xml
+++ b/xml/System.Net.NetworkInformation/OperationalStatus.xml
@@ -43,19 +43,18 @@
Specifies the operational state of a network interface.
- property.
-
-
-
-## Examples
- The following code example displays a summary for all interfaces on the local computer.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet16":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet16":::
+ property.
+
+
+
+## Examples
+ The following code example displays a summary for all interfaces on the local computer.
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet16":::
+
]]>
diff --git a/xml/System.Net.NetworkInformation/PhysicalAddress.xml b/xml/System.Net.NetworkInformation/PhysicalAddress.xml
index 9ece14df547..8348e2499c0 100644
--- a/xml/System.Net.NetworkInformation/PhysicalAddress.xml
+++ b/xml/System.Net.NetworkInformation/PhysicalAddress.xml
@@ -62,7 +62,6 @@
## Examples
The following code example displays the physical addresses of all interfaces on the local computer.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLPhysicalAddress/CPP/NCLPhysicalAddress.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/PhysicalAddress/Overview/physaddresstester.cs" id="Snippet2":::
]]>
@@ -120,7 +119,6 @@
## Examples
The following code example creates a new object.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLPhysicalAddress/CPP/NCLPhysicalAddress.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/PhysicalAddress/Overview/physaddresstester.cs" id="Snippet4":::
]]>
@@ -184,7 +182,6 @@
## Examples
The following code example compares two instances.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLPhysicalAddress/CPP/NCLPhysicalAddress.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/PhysicalAddress/Overview/physaddresstester.cs" id="Snippet3":::
]]>
@@ -236,7 +233,6 @@
## Examples
The following code example calls this method to retrieve the address of a and formats the address for display.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLPhysicalAddress/CPP/NCLPhysicalAddress.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/PhysicalAddress/Overview/physaddresstester.cs" id="Snippet2":::
]]>
@@ -333,7 +329,6 @@
## Examples
The following code example demonstrates using this field to test the result of parsing an address.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLPhysicalAddress/CPP/NCLPhysicalAddress.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/PhysicalAddress/Overview/physaddresstester.cs" id="Snippet5":::
]]>
@@ -487,7 +482,6 @@ In .NET Framework and .NET Core 3.1 and earlier, an address that contains `f0-e1
## Examples
The following code example creates a instance by calling the method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLPhysicalAddress/CPP/NCLPhysicalAddress.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/PhysicalAddress/Overview/physaddresstester.cs" id="Snippet5":::
]]>
@@ -541,7 +535,6 @@ In .NET Framework and .NET Core 3.1 and earlier, an address that contains `f0-e1
## Examples
The following code example demonstrates displaying the address in a instance.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLPhysicalAddress/CPP/NCLPhysicalAddress.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/PhysicalAddress/Overview/physaddresstester.cs" id="Snippet3":::
]]>
diff --git a/xml/System.Net.NetworkInformation/Ping.xml b/xml/System.Net.NetworkInformation/Ping.xml
index 0193f17021a..9f403805f34 100644
--- a/xml/System.Net.NetworkInformation/Ping.xml
+++ b/xml/System.Net.NetworkInformation/Ping.xml
@@ -108,13 +108,11 @@
## Examples
The following code example demonstrates using the class synchronously.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclPingSync/CPP/syncping.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.fs" id="Snippet1":::
The following code example demonstrates using the class asynchronously.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclPingAsync/CPP/asyncping.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Overview/asyncping.cs" id="Snippet1":::
]]>
@@ -165,7 +163,6 @@
## Examples
The following code example demonstrates creating a instance. The complete example is available in the class overview.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclPingAsync/CPP/asyncping.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Overview/asyncping.cs" id="Snippet2":::
]]>
@@ -371,7 +368,6 @@
## Examples
The following code example demonstrates specifying a callback method for the event. The complete example is available in the class overview.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclPingAsync/CPP/asyncping.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Overview/asyncping.cs" id="Snippet2":::
]]>
@@ -450,7 +446,6 @@
## Examples
The following code example demonstrates calling this method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLPingSampler/CPP/pingtest.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Send/pingtest.cs" id="Snippet3":::
]]>
@@ -516,7 +511,6 @@
## Examples
The following code example demonstrates calling this method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLPingSampler/CPP/pingtest.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Send/pingtest.cs" id="Snippet2":::
]]>
@@ -739,7 +733,6 @@
## Examples
The following code example demonstrates how to call this method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLPingSampler/CPP/pingtest.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Send/pingtest.cs" id="Snippet6":::
]]>
@@ -914,7 +907,6 @@
## Examples
The following code example demonstrates how to call this method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLPingSampler/CPP/pingtest.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Send/pingtest.cs" id="Snippet5":::
]]>
@@ -1063,7 +1055,6 @@
## Examples
The following code example demonstrates how to call this method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLPingSampler/CPP/pingtest.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Send/pingtest.cs" id="Snippet4":::
]]>
@@ -1779,12 +1770,10 @@
The following code example requires the following namespaces:
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLPingSampler/CPP/pingtest.cpp" id="Snippet0":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Send/pingtest.cs" id="Snippet0":::
The following code example sends an ICMP echo message asynchronously.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLPingSampler/CPP/pingtest.cpp" id="Snippet7":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Send/pingtest.cs" id="Snippet7":::
]]>
@@ -1887,7 +1876,6 @@
## Examples
The following code example demonstrates how to call this method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclPingAsync/CPP/asyncping.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Overview/asyncping.cs" id="Snippet1":::
]]>
diff --git a/xml/System.Net.NetworkInformation/PingCompletedEventArgs.xml b/xml/System.Net.NetworkInformation/PingCompletedEventArgs.xml
index 8e16baff8b3..62b4785447d 100644
--- a/xml/System.Net.NetworkInformation/PingCompletedEventArgs.xml
+++ b/xml/System.Net.NetworkInformation/PingCompletedEventArgs.xml
@@ -49,19 +49,18 @@
Provides data for the event.
- method that is called when a call completes. The methods send an Internet Control Message Protocol (ICMP) echo request asynchronously and wait for a corresponding ICMP echo reply message. The property contains the results of the ICMP echo request.
-
-
-
-## Examples
- The following code example demonstrates sending an ICMP echo request asynchronously.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclPingAsync/CPP/asyncping.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Overview/asyncping.cs" id="Snippet1":::
+ method that is called when a call completes. The methods send an Internet Control Message Protocol (ICMP) echo request asynchronously and wait for a corresponding ICMP echo reply message. The property contains the results of the ICMP echo request.
+
+
+
+## Examples
+ The following code example demonstrates sending an ICMP echo request asynchronously.
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Overview/asyncping.cs" id="Snippet1":::
+
]]>
@@ -111,19 +110,18 @@
Gets an object that contains data that describes an attempt to send an Internet Control Message Protocol (ICMP) echo request message and receive a corresponding ICMP echo reply message.
A object that describes the results of the ICMP echo request.
- is not , you should not use the values that are returned by the , , and properties. The and properties will return zero, and the property will return `null`.
-
-
-
-## Examples
- The following code example implements a method that is used to respond to a event. For the complete example, see the class overview.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclPingAsync/CPP/asyncping.cpp" id="Snippet4":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Overview/asyncping.cs" id="Snippet4":::
-
+ is not , you should not use the values that are returned by the , , and properties. The and properties will return zero, and the property will return `null`.
+
+
+
+## Examples
+ The following code example implements a method that is used to respond to a event. For the complete example, see the class overview.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Overview/asyncping.cs" id="Snippet4":::
+
]]>
diff --git a/xml/System.Net.NetworkInformation/PingCompletedEventHandler.xml b/xml/System.Net.NetworkInformation/PingCompletedEventHandler.xml
index 312088a3583..ca6dbed4f61 100644
--- a/xml/System.Net.NetworkInformation/PingCompletedEventHandler.xml
+++ b/xml/System.Net.NetworkInformation/PingCompletedEventHandler.xml
@@ -51,19 +51,18 @@
A object that contains the event data.
Represents the method that will handle the event of a object.
- call is available to the method invoked by this delegate in the property.
-
-
-
-## Examples
- The following code example demonstrates specifying a to respond to a event.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclPingAsync/CPP/asyncping.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Overview/asyncping.cs" id="Snippet1":::
+ call is available to the method invoked by this delegate in the property.
+
+
+
+## Examples
+ The following code example demonstrates specifying a to respond to a event.
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Overview/asyncping.cs" id="Snippet1":::
+
]]>
diff --git a/xml/System.Net.NetworkInformation/PingOptions.xml b/xml/System.Net.NetworkInformation/PingOptions.xml
index c080292c1ae..b9d24f7b5c4 100644
--- a/xml/System.Net.NetworkInformation/PingOptions.xml
+++ b/xml/System.Net.NetworkInformation/PingOptions.xml
@@ -44,28 +44,27 @@
Used to control how data packets are transmitted.
- class provides the and properties to control how Internet Control Message Protocol (ICMP) echo request packets are transmitted.
-
- The property specifies the Time to Live for packets sent by the class. This value indicates the number of routing nodes that can forward a packet before it is discarded. Setting this option is useful if you want to test the number of forwards, also known as hops, are required to send a packet from a source computer to a destination computer.
-
- The property controls whether data sent to a remote host can be divided into multiple packets. This option is useful if you want to test the maximum transmission unit (MTU) of the routers and gateways used to transmit the packet.
-
- Instances of the class are passed to the and methods, and the class returns instances of via the property.
-
- For a list of initial property values for an instance of , see the constructor.
-
-
-
-## Examples
- The following code example uses the , and classes to send an ICMP echo request to the host specified on the command line.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclPingSync/CPP/syncping.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.cs" id="Snippet1":::
- :::code language="fsharp" source="~/snippets/fsharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.fs" id="Snippet1":::
+ class provides the and properties to control how Internet Control Message Protocol (ICMP) echo request packets are transmitted.
+
+ The property specifies the Time to Live for packets sent by the class. This value indicates the number of routing nodes that can forward a packet before it is discarded. Setting this option is useful if you want to test the number of forwards, also known as hops, are required to send a packet from a source computer to a destination computer.
+
+ The property controls whether data sent to a remote host can be divided into multiple packets. This option is useful if you want to test the maximum transmission unit (MTU) of the routers and gateways used to transmit the packet.
+
+ Instances of the class are passed to the and methods, and the class returns instances of via the property.
+
+ For a list of initial property values for an instance of , see the constructor.
+
+
+
+## Examples
+ The following code example uses the , and classes to send an ICMP echo request to the host specified on the command line.
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.cs" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.fs" id="Snippet1":::
+
]]>
@@ -115,27 +114,26 @@
Initializes a new instance of the class.
- .
-
-|Property|Initial Value|
-|--------------|-------------------|
-||128|
-||`false`|
-
- You can set the properties to new values before calling or .
-
-
-
-## Examples
- The following code example demonstrates calling this constructor.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclPingSync/CPP/syncping.cpp" id="Snippet2":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.cs" id="Snippet2":::
- :::code language="fsharp" source="~/snippets/fsharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.fs" id="Snippet2":::
-
+ .
+
+|Property|Initial Value|
+|--------------|-------------------|
+||128|
+||`false`|
+
+ You can set the properties to new values before calling or .
+
+
+
+## Examples
+ The following code example demonstrates calling this constructor.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.cs" id="Snippet2":::
+ :::code language="fsharp" source="~/snippets/fsharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.fs" id="Snippet2":::
+
]]>
@@ -182,19 +180,18 @@
to prevent data sent to the remote host from being fragmented; otherwise, .
Initializes a new instance of the class and sets the Time to Live and fragmentation values.
-
@@ -251,19 +248,18 @@
if the data cannot be sent in multiple packets; otherwise . The default is .
- class can be divided into multiple packets. This option is useful if you want to test the maximum transmission unit (MTU) of the routers and gateways used to transmit the packet. If this property is `true` and the data sent to the remote host is larger then the MTU of a gateway or router between the sender and the remote host, the ping operation fails with status .
-
-
-
-## Examples
- The following code example demonstrates setting the value of this property using a constructor, and then displaying the value.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclPingAsync/CPP/asyncping.cpp" id="Snippet3":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Overview/asyncping.cs" id="Snippet3":::
-
+ class can be divided into multiple packets. This option is useful if you want to test the maximum transmission unit (MTU) of the routers and gateways used to transmit the packet. If this property is `true` and the data sent to the remote host is larger then the MTU of a gateway or router between the sender and the remote host, the ping operation fails with status .
+
+
+
+## Examples
+ The following code example demonstrates setting the value of this property using a constructor, and then displaying the value.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Overview/asyncping.cs" id="Snippet3":::
+
]]>
@@ -313,19 +309,18 @@
Gets or sets the number of routing nodes that can forward the data before it is discarded.
An value that specifies the number of times the data packets can be forwarded. The default is 128.
- constructor, and then displaying the value.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclPingAsync/CPP/asyncping.cpp" id="Snippet3":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Overview/asyncping.cs" id="Snippet3":::
-
+ constructor, and then displaying the value.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Overview/asyncping.cs" id="Snippet3":::
+
]]>
The value specified for a set operation is less than or equal to zero.
diff --git a/xml/System.Net.NetworkInformation/PingReply.xml b/xml/System.Net.NetworkInformation/PingReply.xml
index 2b1cec646a7..4601e5052f6 100644
--- a/xml/System.Net.NetworkInformation/PingReply.xml
+++ b/xml/System.Net.NetworkInformation/PingReply.xml
@@ -50,24 +50,23 @@
Provides information about the status and data resulting from a or operation.
- class attempts to send an Internet Control Message Protocol (ICMP) echo request to a remote computer and receive information back from the computer via an ICMP echo reply message. The class uses instances of the class to return information about the operation, such as its status and the time taken to send the request and receive the reply.
-
- The methods return instances of the class directly. The methods return a in the method's parameter. The is accessed through the property.
-
- If the value of is not , you should not use the values returned by the , or properties. The property will return zero, the property will return an empty array, and the property will return `null`.
-
-
-
-## Examples
- The following code example demonstrates using class to send an ICMP echo request synchronously and display the response.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclPingSync/CPP/syncping.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.cs" id="Snippet1":::
- :::code language="fsharp" source="~/snippets/fsharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.fs" id="Snippet1":::
-
+ class attempts to send an Internet Control Message Protocol (ICMP) echo request to a remote computer and receive information back from the computer via an ICMP echo reply message. The class uses instances of the class to return information about the operation, such as its status and the time taken to send the request and receive the reply.
+
+ The methods return instances of the class directly. The methods return a in the method's parameter. The is accessed through the property.
+
+ If the value of is not , you should not use the values returned by the , or properties. The property will return zero, the property will return an empty array, and the property will return `null`.
+
+
+
+## Examples
+ The following code example demonstrates using class to send an ICMP echo request synchronously and display the response.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.cs" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.fs" id="Snippet1":::
+
]]>
@@ -117,19 +116,18 @@
Gets the address of the host that sends the Internet Control Message Protocol (ICMP) echo reply.
An containing the destination for the ICMP echo message.
- returned by any of the overloads can originate from a malicious remote computer. Do not connect to the remote computer using this address. Use DNS to determine the IP address of the machine to which you want to connect.
-
-
-
-## Examples
- The following code example sends an ICMP echo request synchronously and displays the value of this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLPingSampler/CPP/pingtest.cpp" id="Snippet2":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Send/pingtest.cs" id="Snippet2":::
-
+ returned by any of the overloads can originate from a malicious remote computer. Do not connect to the remote computer using this address. Use DNS to determine the IP address of the machine to which you want to connect.
+
+
+
+## Examples
+ The following code example sends an ICMP echo request synchronously and displays the value of this property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Send/pingtest.cs" id="Snippet2":::
+
]]>
@@ -179,21 +177,20 @@
Gets the buffer of data received in an Internet Control Message Protocol (ICMP) echo reply message.
A array containing the data received in an ICMP echo reply message, or an empty array, if no reply was received.
- option, can be used to discover the maximum transmission unit for the network path between the source and destination computers. For additional information, see "Traceroute" in RFC 1574, Section 3.2, available at [https://www.ietf.org](https://www.ietf.org).
-
- The default buffer used with and contains 32 bytes of data.
-
-
-
-## Examples
- The following code example sends an ICMP echo request synchronously and displays the size of the buffer returned by this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLPingSampler/CPP/pingtest.cpp" id="Snippet4":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Send/pingtest.cs" id="Snippet4":::
-
+ option, can be used to discover the maximum transmission unit for the network path between the source and destination computers. For additional information, see "Traceroute" in RFC 1574, Section 3.2, available at [https://www.ietf.org](https://www.ietf.org).
+
+ The default buffer used with and contains 32 bytes of data.
+
+
+
+## Examples
+ The following code example sends an ICMP echo request synchronously and displays the size of the buffer returned by this property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Send/pingtest.cs" id="Snippet4":::
+
]]>
@@ -244,21 +241,20 @@
Gets the options used to transmit the reply to an Internet Control Message Protocol (ICMP) echo request.
A object that contains the Time to Live (TTL) and the fragmentation directive used for transmitting the reply if is ; otherwise, .
- value specified in the ICMP echo request controls packet fragmentation. If is `true` and the packet size exceeds the maximum transmission unit of the network path taken by the packet, the packet is discarded and the error is returned.
-
-
-
-## Examples
- The following code example sends an ICMP echo request synchronously and displays the values stored in the object returned by this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLPingSampler/CPP/pingtest.cpp" id="Snippet3":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Send/pingtest.cs" id="Snippet3":::
-
+ value specified in the ICMP echo request controls packet fragmentation. If is `true` and the packet size exceeds the maximum transmission unit of the network path taken by the packet, the packet is discarded and the error is returned.
+
+
+
+## Examples
+ The following code example sends an ICMP echo request synchronously and displays the values stored in the object returned by this property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Send/pingtest.cs" id="Snippet3":::
+
]]>
@@ -308,19 +304,18 @@
Gets the number of milliseconds taken to send an Internet Control Message Protocol (ICMP) echo request and receive the corresponding ICMP echo reply message.
An that specifies the round trip time, in milliseconds.
- time is reported as 0, which is also a valid value when the request succeeds. You must check the to determine whether the value returned by this property should be ignored.
-
-
-
-## Examples
- The following code example sends an ICMP echo request synchronously and displays the size of the buffer returned by this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLPingSampler/CPP/pingtest.cpp" id="Snippet4":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Send/pingtest.cs" id="Snippet4":::
-
+ time is reported as 0, which is also a valid value when the request succeeds. You must check the to determine whether the value returned by this property should be ignored.
+
+
+
+## Examples
+ The following code example sends an ICMP echo request synchronously and displays the size of the buffer returned by this property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Send/pingtest.cs" id="Snippet4":::
+
]]>
@@ -370,20 +365,19 @@
Gets the status of an attempt to send an Internet Control Message Protocol (ICMP) echo request and receive the corresponding ICMP echo reply message.
An value indicating the result of the request.
- is not , you should not use the values returned by the , or properties. The and properties will return zero, and the property will return `null`.
-
-
-
-## Examples
- The following code example demonstrates using class to send an ICMP echo request synchronously and display the response.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclPingSync/CPP/syncping.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.cs" id="Snippet1":::
- :::code language="fsharp" source="~/snippets/fsharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.fs" id="Snippet1":::
-
+ is not , you should not use the values returned by the , or properties. The and properties will return zero, and the property will return `null`.
+
+
+
+## Examples
+ The following code example demonstrates using class to send an ICMP echo request synchronously and display the response.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.cs" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.fs" id="Snippet1":::
+
]]>
diff --git a/xml/System.Net.NetworkInformation/PrefixOrigin.xml b/xml/System.Net.NetworkInformation/PrefixOrigin.xml
index 0d21b77166b..bcba9bb5455 100644
--- a/xml/System.Net.NetworkInformation/PrefixOrigin.xml
+++ b/xml/System.Net.NetworkInformation/PrefixOrigin.xml
@@ -43,22 +43,21 @@
Specifies how an IP address network prefix was located.
- and classes. Instances of this class are returned when you retrieve the address information for a object.
+
+
+
+## Examples
+ The following code example displays prefix and suffix information for unicast addresses.
-## Remarks
- IP addresses are divided into two parts: the prefix and the suffix. The address prefix identifies the network portion of an IP address, and the address suffix identifies the host portion. Prefixes are assigned by global authorities, and suffixes are assigned by local system administrators.
-
- This enumeration is used by the and classes. Instances of this class are returned when you retrieve the address information for a object.
-
-
-
-## Examples
- The following code example displays prefix and suffix information for unicast addresses.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet45":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet45":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet45":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet45":::
+
]]>
diff --git a/xml/System.Net.NetworkInformation/SuffixOrigin.xml b/xml/System.Net.NetworkInformation/SuffixOrigin.xml
index bffe64a9cb8..029adada13a 100644
--- a/xml/System.Net.NetworkInformation/SuffixOrigin.xml
+++ b/xml/System.Net.NetworkInformation/SuffixOrigin.xml
@@ -43,22 +43,21 @@
Specifies how an IP address host suffix was located.
- class. Instances of this class are returned when you retrieve the unicast address information for a object.
+
+
+
+## Examples
+ The following code example displays prefix and suffix information for unicast addresses.
-## Remarks
- IP addresses are divided into two parts: the prefix and the suffix. The address prefix identifies the network portion of an IP address, and the address suffix identifies the host portion. Prefixes are assigned by global authorities, and suffixes are assigned by local system administrators.
-
- This enumeration is used by the class. Instances of this class are returned when you retrieve the unicast address information for a object.
-
-
-
-## Examples
- The following code example displays prefix and suffix information for unicast addresses.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet45":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet45":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet45":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet45":::
+
]]>
diff --git a/xml/System.Net.NetworkInformation/TcpConnectionInformation.xml b/xml/System.Net.NetworkInformation/TcpConnectionInformation.xml
index c154cfe36f5..58c0123612a 100644
--- a/xml/System.Net.NetworkInformation/TcpConnectionInformation.xml
+++ b/xml/System.Net.NetworkInformation/TcpConnectionInformation.xml
@@ -50,20 +50,19 @@
Provides information about the Transmission Control Protocol (TCP) connections on the local computer.
-
@@ -109,11 +108,11 @@
Initializes a new instance of the class.
- class.
-
+ class.
+
]]>
@@ -157,15 +156,14 @@
Gets the local endpoint of a Transmission Control Protocol (TCP) connection.
An instance that contains the IP address and port on the local computer.
-
@@ -209,11 +207,11 @@
Gets the remote endpoint of a Transmission Control Protocol (TCP) connection.
An instance that contains the IP address and port on the remote computer.
- of this connection is , the remote endpoint is not established, and has all zeros for its IP address.
-
+ of this connection is , the remote endpoint is not established, and has all zeros for its IP address.
+
]]>
@@ -257,11 +255,11 @@
Gets the state of this Transmission Control Protocol (TCP) connection.
One of the enumeration values.
- enumeration documentation.
-
+ enumeration documentation.
+
]]>
diff --git a/xml/System.Net.NetworkInformation/TcpState.xml b/xml/System.Net.NetworkInformation/TcpState.xml
index 36c85e45e26..9b1b0f3a044 100644
--- a/xml/System.Net.NetworkInformation/TcpState.xml
+++ b/xml/System.Net.NetworkInformation/TcpState.xml
@@ -43,20 +43,19 @@
Specifies the states of a Transmission Control Protocol (TCP) connection.
- property. TCP is a transport layer protocol responsible for reliably sending and receiving data packets. The TCP states in this enumeration are defined in IETF RFC 793 available at [https://www.ietf.org](https://www.ietf.org/).
+
+
+
+## Examples
+ The following code example counts the established TCP connections.
-## Remarks
- This enumeration defines valid values for the property. TCP is a transport layer protocol responsible for reliably sending and receiving data packets. The TCP states in this enumeration are defined in IETF RFC 793 available at [https://www.ietf.org](https://www.ietf.org/).
-
-
-
-## Examples
- The following code example counts the established TCP connections.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet2":::
+
]]>
diff --git a/xml/System.Net.NetworkInformation/TcpStatistics.xml b/xml/System.Net.NetworkInformation/TcpStatistics.xml
index 4bb31bc0091..b8eabbd36de 100644
--- a/xml/System.Net.NetworkInformation/TcpStatistics.xml
+++ b/xml/System.Net.NetworkInformation/TcpStatistics.xml
@@ -44,21 +44,20 @@
Provides Transmission Control Protocol (TCP) statistical data.
- and methods, to give applications access to TCP traffic information.
-
- The information in this class correlates to the management information objects described in [https://www.ietf.org/rfc/rfc2012.txt](https://www.ietf.org/rfc/rfc2012.txt).
-
-
-
-## Examples
- The following code example displays the TCP statistics for the specified address family.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet2":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet2":::
-
+ and methods, to give applications access to TCP traffic information.
+
+ The information in this class correlates to the management information objects described in [https://www.ietf.org/rfc/rfc2012.txt](https://www.ietf.org/rfc/rfc2012.txt).
+
+
+
+## Examples
+ The following code example displays the TCP statistics for the specified address family.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet2":::
+
]]>
@@ -104,11 +103,11 @@
Initializes a new instance of the class.
- class.
-
+ class.
+
]]>
@@ -152,20 +151,19 @@
Gets the number of accepted Transmission Control Protocol (TCP) connection requests.
An value that specifies the total number of TCP connection requests accepted.
-
@@ -209,20 +207,19 @@
Gets the number of Transmission Control Protocol (TCP) connection requests made by clients.
An value that specifies the total number of TCP connections initiated by clients.
-
@@ -266,15 +263,14 @@
Specifies the total number of Transmission Control Protocol (TCP) connections established.
An value that specifies the total number of connections established.
-
@@ -318,20 +314,19 @@
Gets the number of current Transmission Control Protocol (TCP) connections.
An value that specifies the total number of current TCP connections.
-
@@ -375,15 +370,14 @@
Gets the number of Transmission Control Protocol (TCP) errors received.
An value that specifies the total number of TCP errors received.
-
@@ -427,20 +421,19 @@
Gets the number of failed Transmission Control Protocol (TCP) connection attempts.
An value that specifies the total number of failed TCP connection attempts.
-
@@ -484,20 +477,19 @@
Gets the maximum number of supported Transmission Control Protocol (TCP) connections.
An value that specifies the total number of TCP connections that can be supported.
-
@@ -541,20 +533,19 @@
Gets the maximum retransmission time-out value for Transmission Control Protocol (TCP) segments.
An value that specifies the maximum number of milliseconds permitted by a TCP implementation for the retransmission time-out value.
- value and the value.
-
-
-
-## Examples
- The following code example displays time-out and maximum connection information.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet5":::
+ value and the value.
+
+
+
+## Examples
+ The following code example displays time-out and maximum connection information.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet5":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet5":::
+
]]>
@@ -598,20 +589,19 @@
Gets the minimum retransmission time-out value for Transmission Control Protocol (TCP) segments.
An value that specifies the minimum number of milliseconds permitted by a TCP implementation for the retransmission time-out value.
- value and the value.
-
-
-
-## Examples
- The following code example displays time-out and maximum connection information.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp" id="Snippet5":::
+ value and the value.
+
+
+
+## Examples
+ The following code example displays time-out and maximum connection information.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/DuplicateAddressDetectionState/Overview/networkexamples.cs" id="Snippet5":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLNetInfo2/VB/networkexamples.vb" id="Snippet5":::
+
]]>
@@ -655,20 +645,19 @@
Gets the number of RST packets received by Transmission Control Protocol (TCP) connections.
An value that specifies the total number of reset TCP connections.
-
@@ -712,20 +701,19 @@
Gets the number of Transmission Control Protocol (TCP) segments sent with the reset flag set.
An value that specifies the total number of TCP segments sent with the reset flag set.
-
@@ -769,20 +757,19 @@
Gets the number of Transmission Control Protocol (TCP) segments received.
An value that specifies the total number of TCP segments received.
-
@@ -826,20 +813,19 @@
Gets the number of Transmission Control Protocol (TCP) segments re-sent.
An value that specifies the total number of TCP segments retransmitted.
-
@@ -883,20 +869,19 @@
Gets the number of Transmission Control Protocol (TCP) segments sent.
An value that specifies the total number of TCP segments sent.
-
diff --git a/xml/System.Net.NetworkInformation/UdpStatistics.xml b/xml/System.Net.NetworkInformation/UdpStatistics.xml
index 223c7515be3..96f7d814bb6 100644
--- a/xml/System.Net.NetworkInformation/UdpStatistics.xml
+++ b/xml/System.Net.NetworkInformation/UdpStatistics.xml
@@ -44,21 +44,20 @@
Provides User Datagram Protocol (UDP) statistical data.
- and methods to give applications access to UDP traffic information.
-
- The information in this class correlates to the management information objects described in [https://www.ietf.org/rfc/rfc2013.txt](https://www.ietf.org/rfc/rfc2013.txt).
-
-
-
-## Examples
- The following code example displays the UDP statistics for the specified address family.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet3":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet3":::
+ and methods to give applications access to UDP traffic information.
+
+ The information in this class correlates to the management information objects described in [https://www.ietf.org/rfc/rfc2013.txt](https://www.ietf.org/rfc/rfc2013.txt).
+
+
+
+## Examples
+ The following code example displays the UDP statistics for the specified address family.
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet3":::
+
]]>
@@ -104,11 +103,11 @@
Initializes a new instance of the class.
- .
-
+ .
+
]]>
@@ -152,19 +151,18 @@
Gets the number of User Datagram Protocol (UDP) datagrams that were received.
An value that specifies the total number of datagrams that were delivered to UDP users.
-
@@ -208,14 +206,13 @@
Gets the number of User Datagram Protocol (UDP) datagrams that were sent.
An value that specifies the total number of datagrams that were sent.
-
@@ -259,19 +256,18 @@
Gets the number of User Datagram Protocol (UDP) datagrams that were received and discarded because of port errors.
An value that specifies the total number of received UDP datagrams that were discarded because there was no listening application at the destination port.
- property.
-
-
-
-## Examples
- The following code example displays the UDP statistics for the specified Internet Protocol version.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet3":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet3":::
-
+ property.
+
+
+
+## Examples
+ The following code example displays the UDP statistics for the specified Internet Protocol version.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet3":::
+
]]>
@@ -315,19 +311,18 @@
Gets the number of User Datagram Protocol (UDP) datagrams that were received and discarded because of errors other than bad port information.
An value that specifies the total number of received UDP datagrams that could not be delivered for reasons other than the lack of an application at the destination port.
- property.
-
-
-
-## Examples
- The following code example displays the UDP statistics for the specified Internet Protocol version.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet3":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet3":::
-
+ property.
+
+
+
+## Examples
+ The following code example displays the UDP statistics for the specified Internet Protocol version.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet3":::
+
]]>
@@ -371,19 +366,18 @@
Gets the number of local endpoints that are listening for User Datagram Protocol (UDP) datagrams.
An value that specifies the total number of sockets that are listening for UDP datagrams.
- and classes to create UDP listener applications.
-
-
-
-## Examples
- The following code example displays the UDP statistics for the specified Internet Protocol version.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp" id="Snippet3":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet3":::
-
+ and classes to create UDP listener applications.
+
+
+
+## Examples
+ The following code example displays the UDP statistics for the specified Internet Protocol version.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IcmpV4Statistics/Overview/netinfo.cs" id="Snippet3":::
+
]]>
diff --git a/xml/System.Net.Security/AuthenticationLevel.xml b/xml/System.Net.Security/AuthenticationLevel.xml
index e4dc8572ae5..30645c854fa 100644
--- a/xml/System.Net.Security/AuthenticationLevel.xml
+++ b/xml/System.Net.Security/AuthenticationLevel.xml
@@ -43,22 +43,21 @@
Specifies client requirements for authentication and impersonation when using the class and derived classes to request a resource.
- property.
-
+ property.
+
> [!NOTE]
-> The MutualAuthRequired and MutualAuthRequested values are relevant for Kerberos authentication. Kerberos authentication can be supported directly, or can be used if the Negotiate security protocol is used to select the actual security protocol. For more information about authentication protocols, see [Internet Authentication](/dotnet/framework/network-programming/internet-authentication).
-
-
-
-## Examples
- The following code example demonstrates setting the authentication flags for a request.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCredPolicy/CPP/NCLCredPolicy.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/IntranetZoneCredentialPolicy/Overview/websample.cs" id="Snippet1":::
+> The MutualAuthRequired and MutualAuthRequested values are relevant for Kerberos authentication. Kerberos authentication can be supported directly, or can be used if the Negotiate security protocol is used to select the actual security protocol. For more information about authentication protocols, see [Internet Authentication](/dotnet/framework/network-programming/internet-authentication).
+
+
+
+## Examples
+ The following code example demonstrates setting the authentication flags for a request.
+ :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/IntranetZoneCredentialPolicy/Overview/websample.cs" id="Snippet1":::
+
]]>
diff --git a/xml/System.Net.Security/LocalCertificateSelectionCallback.xml b/xml/System.Net.Security/LocalCertificateSelectionCallback.xml
index c23a0bca54c..fc74d63a05f 100644
--- a/xml/System.Net.Security/LocalCertificateSelectionCallback.xml
+++ b/xml/System.Net.Security/LocalCertificateSelectionCallback.xml
@@ -74,24 +74,22 @@
Selects the local Secure Sockets Layer (SSL) certificate used for authentication.
An used for establishing an SSL connection.
- class. The class is used to help secure information exchanged between a client and server. The client and server use this delegate to select a certificate to be used for authentication.
-
-
-
-## Examples
- The following code example demonstrates a method implementation for this delegate.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslClientAsync/CPP/NclSslClientAsync.cpp" id="Snippet2":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Security/LocalCertificateSelectionCallback/Overview/clientasync.cs" id="Snippet2":::
-
- The following code example demonstrates creating an instance of this delegate.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslClientAsync/CPP/NclSslClientAsync.cpp" id="Snippet6":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Security/LocalCertificateSelectionCallback/Overview/clientasync.cs" id="Snippet6":::
+ class. The class is used to help secure information exchanged between a client and server. The client and server use this delegate to select a certificate to be used for authentication.
+
+
+
+## Examples
+ The following code example demonstrates a method implementation for this delegate.
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Security/LocalCertificateSelectionCallback/Overview/clientasync.cs" id="Snippet2":::
+
+ The following code example demonstrates creating an instance of this delegate.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Security/LocalCertificateSelectionCallback/Overview/clientasync.cs" id="Snippet6":::
+
]]>
diff --git a/xml/System.Net.Security/RemoteCertificateValidationCallback.xml b/xml/System.Net.Security/RemoteCertificateValidationCallback.xml
index 1d100bccf0b..1b50332b90a 100644
--- a/xml/System.Net.Security/RemoteCertificateValidationCallback.xml
+++ b/xml/System.Net.Security/RemoteCertificateValidationCallback.xml
@@ -65,26 +65,24 @@
Verifies the remote Secure Sockets Layer (SSL) certificate used for authentication.
A value that determines whether the specified certificate is accepted for authentication.
- value returned by the method invoked by this delegate determines whether the authentication is allowed to succeed.
-
- This delegate is used with the class.
-
-
-
-## Examples
- The following code example implements a method that is invoked by an instance of the class. If there are validation errors, this method displays them and returns `false`, which prevents communication with the unauthenticated server.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslClientSync/CPP/clientsync.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Security/RemoteCertificateValidationCallback/Overview/clientsync.cs" id="Snippet1":::
-
- The following code example creates the delegate using the method defined in the preceding code example.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslClientSync/CPP/clientsync.cpp" id="Snippet4":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Security/RemoteCertificateValidationCallback/Overview/clientsync.cs" id="Snippet4":::
-
+ value returned by the method invoked by this delegate determines whether the authentication is allowed to succeed.
+
+ This delegate is used with the class.
+
+
+
+## Examples
+ The following code example implements a method that's invoked by an instance of the class. If there are validation errors, this method displays them and returns `false`, which prevents communication with the unauthenticated server.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Security/RemoteCertificateValidationCallback/Overview/clientsync.cs" id="Snippet1":::
+
+ The following code example creates the delegate using the method defined in the preceding code example.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Security/RemoteCertificateValidationCallback/Overview/clientsync.cs" id="Snippet4":::
+
]]>
diff --git a/xml/System.Net.Security/SslStream.xml b/xml/System.Net.Security/SslStream.xml
index c66e2cf4fdc..97c1624af16 100644
--- a/xml/System.Net.Security/SslStream.xml
+++ b/xml/System.Net.Security/SslStream.xml
@@ -98,13 +98,11 @@
## Examples
The following code example demonstrates creating an that uses the class to communicate with clients.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet0":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet0":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet0":::
The following code example demonstrates creating a that uses the class to communicate with a server.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslClientSync/CPP/clientsync.cpp" id="Snippet0":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/RemoteCertificateValidationCallback/Overview/clientsync.cs" id="Snippet0":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslClientSync/VB/clientsync.vb" id="Snippet0":::
@@ -262,7 +260,6 @@
## Examples
The following code example demonstrates calling this constructor.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet1":::
@@ -363,7 +360,6 @@
## Examples
The following code example creates an and initiates the client portion of the authentication.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslClientSync/CPP/clientsync.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/RemoteCertificateValidationCallback/Overview/clientsync.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslClientSync/VB/clientsync.vb" id="Snippet4":::
@@ -464,7 +460,6 @@
## Examples
The following code example demonstrates calling this constructor. This example is part of a larger example provided for the class.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslClientAsync/CPP/NclSslClientAsync.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/LocalCertificateSelectionCallback/Overview/clientasync.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslClientAsync/VB/clientasync.vb" id="Snippet6":::
@@ -2487,18 +2482,15 @@
## Examples
The following code example demonstrates starting an asynchronous read operation.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslClientAsync/CPP/NclSslClientAsync.cpp" id="Snippet8":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/LocalCertificateSelectionCallback/Overview/clientasync.cs" id="Snippet8":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslClientAsync/VB/clientasync.vb" id="Snippet8":::
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslClientAsync/CPP/NclSslClientAsync.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/LocalCertificateSelectionCallback/Overview/clientasync.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslClientAsync/VB/clientasync.vb" id="Snippet4":::
The following method is called when the read completes.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslClientAsync/CPP/NclSslClientAsync.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/LocalCertificateSelectionCallback/Overview/clientasync.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslClientAsync/VB/clientasync.vb" id="Snippet5":::
@@ -2596,7 +2588,6 @@
## Examples
The following code example demonstrates calling this method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerAsync/CPP/NclSslServerAsync.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/BeginWrite/serverasync.cs" id="Snippet5":::
]]>
@@ -2671,7 +2662,6 @@
## Examples
The following code example demonstrates displaying the value of this property.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet5":::
@@ -2783,7 +2773,6 @@
## Examples
The following code example demonstrates displaying the value of this property.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet5":::
@@ -2843,7 +2832,6 @@
## Examples
The following code example demonstrates displaying the value of this property.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet5":::
@@ -2901,7 +2889,6 @@
## Examples
The following code example demonstrates displaying the value of this property.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet5":::
@@ -2966,7 +2953,6 @@
## Examples
The following code example displays the cryptography settings for the specified stream.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet3":::
@@ -3048,7 +3034,6 @@
## Examples
The following code example displays the cryptography settings for the specified stream.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet3":::
@@ -3335,7 +3320,6 @@
## Examples
The following code example demonstrates ending an asynchronous read operation.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslClientAsync/CPP/NclSslClientAsync.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/LocalCertificateSelectionCallback/Overview/clientasync.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslClientAsync/VB/clientasync.vb" id="Snippet5":::
@@ -3408,7 +3392,6 @@ Authentication has not occurred.
## Examples
The following code example demonstrates ending an asynchronous write operation.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerAsync/CPP/NclSslServerAsync.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/BeginWrite/serverasync.cs" id="Snippet4":::
]]>
@@ -3512,7 +3495,6 @@ Authentication has not occurred.
## Examples
The following code example demonstrates calling this method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslClientSync/CPP/clientsync.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/RemoteCertificateValidationCallback/Overview/clientsync.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslClientSync/VB/clientsync.vb" id="Snippet5":::
@@ -3622,7 +3604,6 @@ Authentication has not occurred.
## Examples
The following code example displays the cryptography settings for the specified stream.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet3":::
@@ -3686,7 +3667,6 @@ Authentication has not occurred.
## Examples
The following code example displays the cryptography settings for the specified stream.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet3":::
@@ -3744,7 +3724,6 @@ Authentication has not occurred.
## Examples
The following code example demonstrates displaying the value of this property.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet4":::
@@ -3802,7 +3781,6 @@ Authentication has not occurred.
## Examples
The following code example demonstrates displaying the value of this property.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet4":::
@@ -3860,7 +3838,6 @@ Authentication has not occurred.
## Examples
The following code example demonstrates displaying the value of this property.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet4":::
@@ -3922,7 +3899,6 @@ Authentication has not occurred.
## Examples
The following code example demonstrates displaying the value of this property.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet4":::
@@ -3980,7 +3956,6 @@ Authentication has not occurred.
## Examples
The following code example demonstrates displaying the value of this property.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet4":::
@@ -4045,7 +4020,6 @@ Authentication has not occurred.
## Examples
The following code example displays the cryptography settings for the specified stream.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet3":::
@@ -4118,7 +4092,6 @@ Authentication has not occurred.
## Examples
The following code example displays the cryptography settings for the specified stream.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet3":::
@@ -4226,7 +4199,6 @@ Authentication has not occurred.
## Examples
The following code example demonstrates displaying the certificate returned by this property.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet6":::
@@ -4473,7 +4445,6 @@ This property gets the cipher suite that is going to be used in the communicatio
## Examples
The following code example demonstrates reading from an .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslClientSync/CPP/clientsync.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/RemoteCertificateValidationCallback/Overview/clientsync.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslClientSync/VB/clientsync.vb" id="Snippet6":::
@@ -4719,7 +4690,6 @@ This property gets the cipher suite that is going to be used in the communicatio
## Examples
The following code example demonstrates setting the value of this property.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet1":::
@@ -4779,7 +4749,6 @@ If the property is accessed, the remote certificate will not be disposed when th
## Examples
The following code example demonstrates displaying the certificate returned by this property.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet6":::
@@ -4982,7 +4951,6 @@ If the property is accessed, the remote certificate will not be disposed when th
## Examples
The following example displays the security properties of the specified stream.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet3":::
@@ -5128,7 +5096,6 @@ If the property is accessed, the remote certificate will not be disposed when th
## Examples
The following code example demonstrates writing to an authenticated .
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet1":::
@@ -5389,7 +5356,6 @@ The class does not support multiple simulta
## Examples
The following code example demonstrates setting the value of this property.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Security/SslStream/Overview/serversync.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NclSslServerSync/VB/serversync.vb" id="Snippet1":::
diff --git a/xml/System.Net.Sockets/AddressFamily.xml b/xml/System.Net.Sockets/AddressFamily.xml
index 90afd8f909c..b67cdb2bf89 100644
--- a/xml/System.Net.Sockets/AddressFamily.xml
+++ b/xml/System.Net.Sockets/AddressFamily.xml
@@ -48,20 +48,19 @@
Specifies the addressing scheme that an instance of the class can use.
- member specifies the addressing scheme that a will use to resolve an address. For example, InterNetwork indicates that an IP version 4 address is expected when a connects to an endpoint.
+
+
+
+## Examples
+ The following example creates a using the InterNetwork .
-## Remarks
- An member specifies the addressing scheme that a will use to resolve an address. For example, InterNetwork indicates that an IP version 4 address is expected when a connects to an endpoint.
-
-
-
-## Examples
- The following example creates a using the InterNetwork .
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Send_Receive/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/AddressFamily/Overview/source.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Send_Receive/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Send_Receive/VB/source.vb" id="Snippet1":::
+
]]>
diff --git a/xml/System.Net.Sockets/IOControlCode.xml b/xml/System.Net.Sockets/IOControlCode.xml
index 6f84473c5dc..5956ff4d3c4 100644
--- a/xml/System.Net.Sockets/IOControlCode.xml
+++ b/xml/System.Net.Sockets/IOControlCode.xml
@@ -43,19 +43,18 @@
Specifies the IO control codes supported by the method.
- enumeration provides named values for specifying socket operational modes. These values are the control codes passed to the Windows Sockets 2 (Winsock 2) `WSAIoctl` function.
-
-
-
-## Examples
- The following code example calls the method with a DataToRead parameter value and compares the result with accessing the. property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSocketIoControl1/CPP/iocontrolcode.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/IOControlCode/Overview/iocontrolcode.cs" id="Snippet1":::
+ enumeration provides named values for specifying socket operational modes. These values are the control codes passed to the Windows Sockets 2 (Winsock 2) `WSAIoctl` function.
+
+
+
+## Examples
+ The following code example calls the method with a DataToRead parameter value and compares the result with accessing the. property.
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/IOControlCode/Overview/iocontrolcode.cs" id="Snippet1":::
+
]]>
diff --git a/xml/System.Net.Sockets/IPv6MulticastOption.xml b/xml/System.Net.Sockets/IPv6MulticastOption.xml
index 88ee31bea94..d7ee73dad0a 100644
--- a/xml/System.Net.Sockets/IPv6MulticastOption.xml
+++ b/xml/System.Net.Sockets/IPv6MulticastOption.xml
@@ -56,7 +56,6 @@
## Examples
The following example creates an object.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient.JoinMulticastGroup/CPP/joinmulticastgroup.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/IPv6MulticastOption/Overview/joinmulticastgroup.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.UdpClient.JoinMulticastGroup/VB/joinmulticastgroup.vb" id="Snippet4":::
@@ -119,7 +118,6 @@
## Examples
The following example creates an object.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient.JoinMulticastGroup/CPP/joinmulticastgroup.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/IPv6MulticastOption/Overview/joinmulticastgroup.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.UdpClient.JoinMulticastGroup/VB/joinmulticastgroup.vb" id="Snippet4":::
@@ -181,7 +179,6 @@
## Examples
The following example creates an object.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient.JoinMulticastGroup/CPP/joinmulticastgroup.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/IPv6MulticastOption/Overview/joinmulticastgroup.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.UdpClient.JoinMulticastGroup/VB/joinmulticastgroup.vb" id="Snippet5":::
@@ -248,7 +245,6 @@
## Examples
The following example creates an object.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient.JoinMulticastGroup/CPP/joinmulticastgroup.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/IPv6MulticastOption/Overview/joinmulticastgroup.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.UdpClient.JoinMulticastGroup/VB/joinmulticastgroup.vb" id="Snippet4":::
@@ -314,7 +310,6 @@
## Examples
The following example creates an object.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient.JoinMulticastGroup/CPP/joinmulticastgroup.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/IPv6MulticastOption/Overview/joinmulticastgroup.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.UdpClient.JoinMulticastGroup/VB/joinmulticastgroup.vb" id="Snippet4":::
diff --git a/xml/System.Net.Sockets/LingerOption.xml b/xml/System.Net.Sockets/LingerOption.xml
index 17a9720e2c7..5fc7c54d04f 100644
--- a/xml/System.Net.Sockets/LingerOption.xml
+++ b/xml/System.Net.Sockets/LingerOption.xml
@@ -45,22 +45,21 @@
Specifies whether a will remain connected after a call to the or methods and the length of time it will remain connected, if data remains to be sent.
- or method. If you want to specify the amount of time that the will attempt to transmit unsent data after closing, create a with the `enable` parameter set to `true`, and the `seconds` parameter set to the desired amount of time. The `seconds` parameter is used to indicate how long you would like the to remain connected before timing out. If you do not want the to stay connected for any length of time after closing, create a instance with the `enable` parameter set to `true` and the `seconds` parameter set to zero. In this case, the will close immediately and any unsent data will be lost. Once created, pass the to the method. If you are sending and receiving data with a , then set the instance in the property.
+
+ The IP stack computes the default IP protocol time-out period to use based on the round trip time of the connection. In most cases, the time-out computed by the stack is more relevant than one defined by an application. This is the default behavior for a when the property is not set and for a when the property is not set.
+
+
+
+## Examples
+ The following example sets a previously created to linger one second after calling the method.
-## Remarks
- There may still be data available in the outgoing network buffer after an application calls the or method. If you want to specify the amount of time that the will attempt to transmit unsent data after closing, create a with the `enable` parameter set to `true`, and the `seconds` parameter set to the desired amount of time. The `seconds` parameter is used to indicate how long you would like the to remain connected before timing out. If you do not want the to stay connected for any length of time after closing, create a instance with the `enable` parameter set to `true` and the `seconds` parameter set to zero. In this case, the will close immediately and any unsent data will be lost. Once created, pass the to the method. If you are sending and receiving data with a , then set the instance in the property.
-
- The IP stack computes the default IP protocol time-out period to use based on the round trip time of the connection. In most cases, the time-out computed by the stack is more relevant than one defined by an application. This is the default behavior for a when the property is not set and for a when the property is not set.
-
-
-
-## Examples
- The following example sets a previously created to linger one second after calling the method.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic LingerOption Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/LingerOption/Overview/source.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic LingerOption Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic LingerOption Example/VB/source.vb" id="Snippet1":::
+
]]>
@@ -108,32 +107,31 @@
The number of seconds to remain connected after the method is called.
Initializes a new instance of the class.
- . Use the `enable` parameter to specify whether you would like the to continue transmitting unsent data after the close method is called. Use the `seconds` parameter to indicate how long you would like the to attempt transferring unsent data before timing out. If you specify `true` for the `enable` parameter and 0 for the `seconds` parameter, the will attempt to send data until there is no data left in the outgoing network buffer. If you specify `false` for the `enable` parameter, the will close immediately and any unsent data will be lost.
-
- The following table describes the behavior on the and methods based on the possible values of the `enable` and `seconds` parameters when an T:System.Net.Sockets.LingerOption instance is created and set in the or property.
-
-|`enable`|`seconds`|Behavior|
-|--------------|---------------|--------------|
-|`false` (disabled), the default value|The time-out is not applicable, (default).|Attempts to send pending data for a connection-oriented socket (TCP, for example) until the default IP protocol time-out expires.|
-|`true` (enabled)|A nonzero time-out|Attempts to send pending data until the specified time-out expires, and if the attempt fails, then Winsock resets the connection.|
-|`true` (enabled)|A zero timeout.|Discards any pending data. For connection-oriented socket (TCP, for example), Winsock resets the connection.|
-
- The IP stack computes the default IP protocol time-out period to use based on the round trip time of the connection. In most cases, the time-out computed by the stack is more relevant than one defined by an application. This is the default behavior for a socket when the property is not set.
-
- When the property stored in the property is set greater than the default IP protocol time-out, the default IP protocol time-out will still apply and override.
-
-
-
-## Examples
- The following example sets a previously created to linger one second after calling the method.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic LingerOption Example/CPP/source.cpp" id="Snippet1":::
+ . Use the `enable` parameter to specify whether you would like the to continue transmitting unsent data after the close method is called. Use the `seconds` parameter to indicate how long you would like the to attempt transferring unsent data before timing out. If you specify `true` for the `enable` parameter and 0 for the `seconds` parameter, the will attempt to send data until there is no data left in the outgoing network buffer. If you specify `false` for the `enable` parameter, the will close immediately and any unsent data will be lost.
+
+ The following table describes the behavior on the and methods based on the possible values of the `enable` and `seconds` parameters when an T:System.Net.Sockets.LingerOption instance is created and set in the or property.
+
+|`enable`|`seconds`|Behavior|
+|--------------|---------------|--------------|
+|`false` (disabled), the default value|The time-out is not applicable, (default).|Attempts to send pending data for a connection-oriented socket (TCP, for example) until the default IP protocol time-out expires.|
+|`true` (enabled)|A nonzero time-out|Attempts to send pending data until the specified time-out expires, and if the attempt fails, then Winsock resets the connection.|
+|`true` (enabled)|A zero timeout.|Discards any pending data. For connection-oriented socket (TCP, for example), Winsock resets the connection.|
+
+ The IP stack computes the default IP protocol time-out period to use based on the round trip time of the connection. In most cases, the time-out computed by the stack is more relevant than one defined by an application. This is the default behavior for a socket when the property is not set.
+
+ When the property stored in the property is set greater than the default IP protocol time-out, the default IP protocol time-out will still apply and override.
+
+
+
+## Examples
+ The following example sets a previously created to linger one second after calling the method.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/LingerOption/Overview/source.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic LingerOption Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic LingerOption Example/VB/source.vb" id="Snippet1":::
+
]]>
@@ -189,23 +187,23 @@
if the should linger after is called; otherwise, .
- property to determine whether the will linger after closing. Change this value to `true` or `false` and pass the altered to the method or set the or property.to disable or enable lingering.
-
- The following table describes the behavior for the possible values of the property and the property stored in the property.
-
-|`enable`|`seconds`|Behavior|
-|--------------|---------------|--------------|
-|`false` (disabled), the default value|The time-out is not applicable, (default).|Attempts to send pending data for a connection-oriented socket (TCP, for example) until the default IP protocol time-out expires.|
-|`true` (enabled)|A nonzero time-out|Attempts to send pending data until the specified time-out expires, and if the attempt fails, then Winsock resets the connection.|
-|`true` (enabled)|A zero timeout.|Discards any pending data. For connection-oriented socket (TCP, for example), Winsock resets the connection.|
-
- The IP stack computes the default IP protocol time-out period to use based on the round trip time of the connection. In most cases, the time-out computed by the stack is more relevant than one defined by an application. This is the default behavior for a socket when the property is not set.
-
- When the property stored in the property is set greater than the default IP protocol time-out, the default IP protocol time-out will still apply and override.
-
+ property to determine whether the will linger after closing. Change this value to `true` or `false` and pass the altered to the method or set the or property.to disable or enable lingering.
+
+ The following table describes the behavior for the possible values of the property and the property stored in the property.
+
+|`enable`|`seconds`|Behavior|
+|--------------|---------------|--------------|
+|`false` (disabled), the default value|The time-out is not applicable, (default).|Attempts to send pending data for a connection-oriented socket (TCP, for example) until the default IP protocol time-out expires.|
+|`true` (enabled)|A nonzero time-out|Attempts to send pending data until the specified time-out expires, and if the attempt fails, then Winsock resets the connection.|
+|`true` (enabled)|A zero timeout.|Discards any pending data. For connection-oriented socket (TCP, for example), Winsock resets the connection.|
+
+ The IP stack computes the default IP protocol time-out period to use based on the round trip time of the connection. In most cases, the time-out computed by the stack is more relevant than one defined by an application. This is the default behavior for a socket when the property is not set.
+
+ When the property stored in the property is set greater than the default IP protocol time-out, the default IP protocol time-out will still apply and override.
+
]]>
@@ -318,34 +316,33 @@
Gets or sets the amount of time to remain connected after calling the method if data remains to be sent.
The amount of time, in seconds, to remain connected after calling .
- will attempt to transfer unsent data before timing out. You can also set this value to the desired time-out period, in seconds.
-
- If the property is `true`, and you set to 0, the discards any pending data to send in the outgoing network buffer. If you change this value, you must pass the altered instance to the method or set the or property.
-
- The following table describes the behavior for the possible values of the property and the property stored in the property.
-
-|`enable`|`seconds`|Behavior|
-|--------------|---------------|--------------|
-|`false` (disabled), the default value|The time-out is not applicable, (default).|Attempts to send pending data for a connection-oriented socket (TCP, for example) until the default IP protocol time-out expires.|
-|`true` (enabled)|A nonzero time-out|Attempts to send pending data until the specified time-out expires, and if the attempt fails, then Winsock resets the connection.|
-|`true` (enabled)|A zero timeout.|Discards any pending data. For connection-oriented socket (TCP, for example), Winsock resets the connection.|
-
- The IP stack computes the default IP protocol time-out period to use based on the round trip time of the connection. In most cases, the time-out computed by the stack is more relevant than one defined by an application. This is the default behavior for a socket when the property is not set.
-
- When the property stored in the property is set greater than the default IP protocol time-out, the default IP protocol time-out will still apply and override.
-
-
-
-## Examples
- The following example displays the value of this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Socket_Options/CPP/source.cpp" id="Snippet2":::
+ will attempt to transfer unsent data before timing out. You can also set this value to the desired time-out period, in seconds.
+
+ If the property is `true`, and you set to 0, the discards any pending data to send in the outgoing network buffer. If you change this value, you must pass the altered instance to the method or set the or property.
+
+ The following table describes the behavior for the possible values of the property and the property stored in the property.
+
+|`enable`|`seconds`|Behavior|
+|--------------|---------------|--------------|
+|`false` (disabled), the default value|The time-out is not applicable, (default).|Attempts to send pending data for a connection-oriented socket (TCP, for example) until the default IP protocol time-out expires.|
+|`true` (enabled)|A nonzero time-out|Attempts to send pending data until the specified time-out expires, and if the attempt fails, then Winsock resets the connection.|
+|`true` (enabled)|A zero timeout.|Discards any pending data. For connection-oriented socket (TCP, for example), Winsock resets the connection.|
+
+ The IP stack computes the default IP protocol time-out period to use based on the round trip time of the connection. In most cases, the time-out computed by the stack is more relevant than one defined by an application. This is the default behavior for a socket when the property is not set.
+
+ When the property stored in the property is set greater than the default IP protocol time-out, the default IP protocol time-out will still apply and override.
+
+
+
+## Examples
+ The following example displays the value of this property.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/LingerOption/LingerTime/source.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Socket_Options/VB/source.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Socket_Options/VB/source.vb" id="Snippet2":::
+
]]>
diff --git a/xml/System.Net.Sockets/MulticastOption.xml b/xml/System.Net.Sockets/MulticastOption.xml
index 3a5519e2fc2..6c542d6192c 100644
--- a/xml/System.Net.Sockets/MulticastOption.xml
+++ b/xml/System.Net.Sockets/MulticastOption.xml
@@ -67,11 +67,9 @@
## Examples
The following examples join the default IP interface to an IP multicast group. They assume the IP multicast group address in the range 224.0.0.0 to 239.255.255.255.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.MulticastOptionListener/CPP/listener.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/MulticastOption/Overview/listener.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.MulticastOptionListener/VB/listener.vb" id="Snippet1":::
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.MulticastOptionSender/CPP/sender.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/MulticastOption/Overview/sender.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.MulticastOptionSender/VB/sender.vb" id="Snippet1":::
@@ -233,7 +231,6 @@
## Examples
The following example creates a object.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.MulticastOptionListener/CPP/listener.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/MulticastOption/Overview/listener.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.MulticastOptionListener/VB/listener.vb" id="Snippet2":::
@@ -305,7 +302,6 @@
## Examples
The following example displays the value of this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.MulticastOptionListener/CPP/listener.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/MulticastOption/Overview/listener.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.MulticastOptionListener/VB/listener.vb" id="Snippet3":::
@@ -421,7 +417,6 @@
## Examples
The following example displays the value of this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.MulticastOptionListener/CPP/listener.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/MulticastOption/Overview/listener.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.MulticastOptionListener/VB/listener.vb" id="Snippet3":::
diff --git a/xml/System.Net.Sockets/NetworkStream.xml b/xml/System.Net.Sockets/NetworkStream.xml
index 0ff7743e677..33bee7908ed 100644
--- a/xml/System.Net.Sockets/NetworkStream.xml
+++ b/xml/System.Net.Sockets/NetworkStream.xml
@@ -1674,7 +1674,6 @@ There is a failure reading from the network.
## Examples
In the following code example, the `CanCommunicate` property checks the property to determine if the is readable.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NetworkStream_Protected_Members/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/NetworkStream/Readable/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NetworkStream_Protected_Members/VB/source.vb" id="Snippet1":::
@@ -2083,7 +2082,6 @@ There is a failure reading from the network.
## Examples
The following code example retrieves the underlying to verify an active connection.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NetworkStream_Protected_Members/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/NetworkStream/Readable/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NetworkStream_Protected_Members/VB/source.vb" id="Snippet1":::
@@ -2256,7 +2254,6 @@ This method starts at the specified `offset` and sends `count` bytes from the co
## Examples
The following code example checks to see whether the is writable. If it is, then is used to write a small message.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NetworkStream_Synch_SendAndReceive/CPP/source.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/NetworkStream/Overview/source.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NetworkStream_Synch_SendAndReceive/VB/source.vb" id="Snippet3":::
@@ -2349,7 +2346,6 @@ There was a failure while writing to the network.
## Examples
In the following code example, the `CanCommunicate` property checks the property to determine if the is writable.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NetworkStream_Protected_Members/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/NetworkStream/Readable/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NetworkStream_Protected_Members/VB/source.vb" id="Snippet1":::
@@ -2607,7 +2603,6 @@ There was a failure while writing to the network.
## Examples
The following code example sets the write time-out for a network stream to 10 milliseconds.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclTcpServerSync/cpp/tcplistener.cpp" id="Snippet0":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/NetworkStream/WriteTimeout/tcplistener.cs" id="Snippet0":::
]]>
diff --git a/xml/System.Net.Sockets/SelectMode.xml b/xml/System.Net.Sockets/SelectMode.xml
index 884fb1f4871..45e01bd067e 100644
--- a/xml/System.Net.Sockets/SelectMode.xml
+++ b/xml/System.Net.Sockets/SelectMode.xml
@@ -44,20 +44,19 @@
Defines the polling modes for the method.
- enumeration defines the polling modes that can be passed to the method. Use the SelectRead value to determine if a listening has incoming connection requests. Use the SelectWrite value to determine if a is writeable. Use the SelectError value to determine if there is an error condition present on the . For explanations of writeability, readability, and the presence of error conditions, see the method.
+
+
+
+## Examples
+ The following example checks the status of a using all three enumeration values. A call to using the SelectWrite enumerated value should return `true`.
-## Remarks
- The enumeration defines the polling modes that can be passed to the method. Use the SelectRead value to determine if a listening has incoming connection requests. Use the SelectWrite value to determine if a is writeable. Use the SelectError value to determine if there is an error condition present on the . For explanations of writeability, readability, and the presence of error conditions, see the method.
-
-
-
-## Examples
- The following example checks the status of a using all three enumeration values. A call to using the SelectWrite enumerated value should return `true`.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/SelectModeExample/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/SelectMode/Overview/source.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/SelectModeExample/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/SelectModeExample/VB/source.vb" id="Snippet1":::
+
]]>
diff --git a/xml/System.Net.Sockets/Socket.xml b/xml/System.Net.Sockets/Socket.xml
index 2785c34b69f..72c02214c2a 100644
--- a/xml/System.Net.Sockets/Socket.xml
+++ b/xml/System.Net.Sockets/Socket.xml
@@ -334,7 +334,6 @@ This method populates the instance with data ga
## Examples
The following code example demonstrates how to create an instance of the class.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Send_Receive/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/AddressFamily/Overview/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Send_Receive/VB/source.vb" id="Snippet1":::
@@ -411,7 +410,6 @@ This method populates the instance with data ga
## Examples
The following code example accepts a simple connection.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Accept Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Accept/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic Socket.Accept Example/VB/source.vb" id="Snippet1":::
@@ -771,7 +769,6 @@ This method populates the instance with data ga
## Examples
The following code example displays the , , and to the console.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Socket_Options/CPP/source.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/LingerOption/LingerTime/source.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Socket_Options/VB/source.vb" id="Snippet3":::
@@ -838,7 +835,6 @@ This method populates the instance with data ga
## Examples
The following code example compares the results of calling IOControl with FIONREAD and the Available property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSocketIoControl/CPP/iocontrolserver.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Available/iocontrolserver.cs" id="Snippet1":::
]]>
@@ -3337,7 +3333,6 @@ This method populates the instance with data ga
## Examples
The following code example binds a using the specified local endpoint.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Bind Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Bind/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic Socket.Bind Example/VB/source.vb" id="Snippet1":::
@@ -3554,7 +3549,6 @@ This method populates the instance with data ga
## Examples
The following code example closes a .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Close Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Close/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic Socket.Close Example/VB/source.vb" id="Snippet1":::
@@ -3628,7 +3622,6 @@ This method populates the instance with data ga
## Examples
The following code example demonstrates how to close a .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Close Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Close/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic Socket.Close Example/VB/source.vb" id="Snippet1":::
@@ -3717,7 +3710,6 @@ This method populates the instance with data ga
## Examples
The following code example connects to a remote endpoint and then verifies the connection.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Connect Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Connect/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic Socket.Connect Example/VB/source.vb" id="Snippet1":::
@@ -3807,7 +3799,6 @@ This method populates the instance with data ga
## Examples
The following code example connects to a remote endpoint and then verifies the connection.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.Socket.BeginConnect/CPP/beginconnect.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/BeginConnect/beginconnect.cs" id="Snippet4":::
]]>
@@ -3890,7 +3881,6 @@ This method populates the instance with data ga
## Examples
The following code example connects to a remote endpoint and then verifies the connection.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.Socket.BeginConnect/CPP/beginconnect.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/BeginConnect/beginconnect.cs" id="Snippet5":::
]]>
@@ -3975,7 +3965,6 @@ This method populates the instance with data ga
## Examples
The following code example connects to a remote endpoint and then verifies the connection.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.Socket.BeginConnect/CPP/beginconnect.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/BeginConnect/beginconnect.cs" id="Snippet6":::
]]>
@@ -4666,7 +4655,6 @@ This method populates the instance with data ga
## Examples
The following code example connects to a remote endpoint, checks the property, and checks the current state of the connection.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Connect Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Connect/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic Socket.Connect Example/VB/source.vb" id="Snippet1":::
@@ -4739,7 +4727,6 @@ This method populates the instance with data ga
## Examples
The following code example creates a socket for synchronous communication and sends some data to a remote host. It then calls , to stop the send and receive activity, and , to close the socket connection.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSocketEnhancements/CPP/nclsocketenhancements.cpp" id="Snippet12":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/BeginAccept/nclsocketenhancements.cs" id="Snippet12":::
]]>
@@ -5044,7 +5031,6 @@ This method populates the instance with data ga
## Examples
The following code example demonstrates the use of the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/SocketPropertyTester/CPP/class1.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/DontFragment/class1.cs" id="Snippet2":::
]]>
@@ -5230,7 +5216,6 @@ Duplication of the socket reference failed.
## Examples
The following code example demonstrates the use of the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/SocketPropertyTester/CPP/class1.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/DontFragment/class1.cs" id="Snippet2":::
]]>
@@ -6395,7 +6380,6 @@ Duplication of the socket reference failed.
## Examples
The following code example demonstrates the use of the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/SocketPropertyTester/CPP/class1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/DontFragment/class1.cs" id="Snippet1":::
]]>
@@ -6628,7 +6612,6 @@ In general, the `GetSocketOption` method should be used whenever getting a and time-out values and displays them to the console.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Socket_Options/CPP/source.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/LingerOption/LingerTime/source.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Socket_Options/VB/source.vb" id="Snippet2":::
@@ -6710,7 +6693,6 @@ In general, the `GetSocketOption` method should be used whenever getting a and time-out values and displays them to the console.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Socket_Options/CPP/source.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/LingerOption/LingerTime/source.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Socket_Options/VB/source.vb" id="Snippet2":::
@@ -6794,7 +6776,6 @@ In general, the `GetSocketOption` method should be used whenever getting a and time-out values and displays them to the console.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Socket_Options/CPP/source.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/LingerOption/LingerTime/source.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Socket_Options/VB/source.vb" id="Snippet2":::
@@ -6933,7 +6914,6 @@ In general, the `GetSocketOption` method should be used whenever getting a
@@ -7011,7 +6991,6 @@ In general, the `GetSocketOption` method should be used whenever getting a with and the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSocketIoControl1/CPP/iocontrolcode.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/IOControlCode/Overview/iocontrolcode.cs" id="Snippet1":::
]]>
@@ -7074,7 +7053,6 @@ In general, the `GetSocketOption` method should be used whenever getting a property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/SocketPropertyTester/CPP/class1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/DontFragment/class1.cs" id="Snippet1":::
]]>
@@ -7162,7 +7140,6 @@ In general, the `GetSocketOption` method should be used whenever getting a property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/SocketPropertyTester/CPP/class1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/DontFragment/class1.cs" id="Snippet1":::
]]>
@@ -7282,7 +7259,6 @@ The maximum length of the pending connections queue is determined automatically.
## Examples
The following code example uses to listen for incoming connections.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Listen Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Listen/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic Socket.Listen Example/VB/source.vb" id="Snippet1":::
@@ -7364,7 +7340,6 @@ The maximum length of the pending connections queue is determined automatically.
## Examples
The following code example retrieves and displays the local and remote endpoints.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Socket_Options/CPP/source.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/LingerOption/LingerTime/source.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Socket_Options/VB/source.vb" id="Snippet4":::
@@ -7430,7 +7405,6 @@ The maximum length of the pending connections queue is determined automatically.
## Examples
The following code example demonstrates the use of the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/SocketPropertyTester/CPP/class1.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/DontFragment/class1.cs" id="Snippet2":::
]]>
@@ -7498,7 +7472,6 @@ The maximum length of the pending connections queue is determined automatically.
## Examples
The following code example demonstrates the use of the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/SocketPropertyTester/CPP/class1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/DontFragment/class1.cs" id="Snippet1":::
]]>
@@ -7717,7 +7690,6 @@ The maximum length of the pending connections queue is determined automatically.
## Examples
The following code example creates a socket, connects to a server, and uses to check the status of the socket.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/SelectModeExample/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/SelectMode/Overview/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/SelectModeExample/VB/source.vb" id="Snippet1":::
@@ -7834,7 +7806,6 @@ The maximum length of the pending connections queue is determined automatically.
## Examples
The following code example displays the , , and to the console.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Socket_Options/CPP/source.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/LingerOption/LingerTime/source.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Socket_Options/VB/source.vb" id="Snippet3":::
@@ -7925,7 +7896,6 @@ The maximum length of the pending connections queue is determined automatically.
## Examples
The following code example receives data on a connected .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Sync_Send_Receive/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Receive/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Sync_Send_Receive/VB/source.vb" id="Snippet1":::
@@ -8177,7 +8147,6 @@ This member outputs trace information when you enable network tracing in your ap
## Examples
The following code example specifies a data buffer, and for receiving data on a connected .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Sync_Send_Receive/CPP/source.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Receive/source.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Sync_Send_Receive/VB/source.vb" id="Snippet2":::
@@ -8276,7 +8245,6 @@ This member outputs trace information when you enable network tracing in your ap
## Examples
The following code example demonstrates how to receive data on a connected .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.Socketgenerics/CPP/sendgeneric.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Receive/sendgeneric.cs" id="Snippet2":::
]]>
@@ -8454,7 +8422,6 @@ This member outputs trace information when you enable network tracing in your ap
## Examples
The following receives the data found into `buffer`, and specifies for .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Send_Receive/CPP/source.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/AddressFamily/Overview/source.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Send_Receive/VB/source.vb" id="Snippet4":::
@@ -8724,7 +8691,6 @@ If you're using a connectionless , .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Sync_Send_Receive/CPP/source.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Receive/source.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Sync_Send_Receive/VB/source.vb" id="Snippet4":::
@@ -9284,7 +9250,6 @@ If you're using a connectionless , property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/SocketPropertyTester/CPP/class1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/DontFragment/class1.cs" id="Snippet1":::
]]>
@@ -9385,7 +9350,6 @@ If you're using a connectionless , , are passed to the method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Sync_Send_Receive/CPP/source.cpp" id="Snippet10":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Receive/source.cs" id="Snippet10":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Sync_Send_Receive/VB/source.vb" id="Snippet10":::
@@ -9756,7 +9719,6 @@ If you're using a connectionless , are passed to the method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Sync_Send_Receive/CPP/source.cpp" id="Snippet11":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Receive/source.cs" id="Snippet11":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Sync_Send_Receive/VB/source.vb" id="Snippet11":::
@@ -9876,7 +9838,6 @@ If you're using a connectionless , are passed to the method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Sync_Send_Receive/CPP/source.cpp" id="Snippet12":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Receive/source.cs" id="Snippet12":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Sync_Send_Receive/VB/source.vb" id="Snippet12":::
@@ -10811,7 +10772,6 @@ You must call the Bind method before performing this operation.
## Examples
The following code example demonstrates the use of the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/SocketPropertyTester/CPP/class1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/DontFragment/class1.cs" id="Snippet1":::
]]>
@@ -10887,7 +10847,6 @@ You must call the Bind method before performing this operation.
## Examples
The following code example retrieves and displays the local and remote endpoints.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Socket_Options/CPP/source.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/LingerOption/LingerTime/source.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Socket_Options/VB/source.vb" id="Snippet4":::
@@ -11024,7 +10983,6 @@ You must call the Bind method before performing this operation.
## Examples
The following code example uses to determine which listening sockets have a connection request.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Select/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Select/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Select/VB/source.vb" id="Snippet1":::
@@ -11171,7 +11129,6 @@ You must call the Bind method before performing this operation.
## Examples
The following code example demonstrates sending data on a connected .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Sync_Send_Receive/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Receive/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Sync_Send_Receive/VB/source.vb" id="Snippet1":::
@@ -11427,7 +11384,6 @@ This member outputs trace information when you enable network tracing in your ap
## Examples
The following code example demonstrates sending data on a connected .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Sync_Send_Receive/CPP/source.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Receive/source.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Sync_Send_Receive/VB/source.vb" id="Snippet2":::
@@ -11667,7 +11623,6 @@ This member outputs trace information when you enable network tracing in your ap
The following code example sends the data found in buffer, and specifies for .
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Sync_Send_Receive/CPP/source.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Receive/source.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Sync_Send_Receive/VB/source.vb" id="Snippet3":::
@@ -11935,7 +11890,6 @@ This member outputs trace information when you enable network tracing in your ap
## Examples
The following code example specifies the data buffer, an offset, a size, and for sending data to a connected .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Sync_Send_Receive/CPP/source.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Receive/source.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Sync_Send_Receive/VB/source.vb" id="Snippet4":::
@@ -12053,7 +12007,6 @@ This member outputs trace information when you enable network tracing in your ap
## Examples
The following code example specifies the data buffer, an offset, a size, and for sending data to a connected .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Sync_Send_Receive/CPP/source.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Receive/source.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Sync_Send_Receive/VB/source.vb" id="Snippet4":::
@@ -12508,7 +12461,6 @@ This member outputs trace information when you enable network tracing in your ap
## Examples
The following code example demonstrates the use of the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/SocketPropertyTester/CPP/class1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/DontFragment/class1.cs" id="Snippet1":::
]]>
@@ -12595,7 +12547,6 @@ This member outputs trace information when you enable network tracing in your ap
## Examples
The following code example creates and connects a socket and then sends a file to the remote host. The file "test.txt" is located in the root directory of the local machine.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSocketEnhancements/CPP/nclsocketenhancements.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/BeginAccept/nclsocketenhancements.cs" id="Snippet3":::
]]>
@@ -12682,7 +12633,6 @@ This member outputs trace information when you enable network tracing in your ap
## Examples
The following code example creates and connects a socket. The file "test.txt" is located in the root directory of the local machine. In this example, we create a prebuffer and postbuffer of data and send them to the remote host with the file. The default are used.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSocketEnhancements/CPP/nclsocketenhancements.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/BeginAccept/nclsocketenhancements.cs" id="Snippet4":::
]]>
@@ -12996,7 +12946,6 @@ This member outputs trace information when you enable network tracing in your ap
## Examples
The following code example demonstrates the use of the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/SocketPropertyTester/CPP/class1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/DontFragment/class1.cs" id="Snippet1":::
]]>
@@ -13087,7 +13036,6 @@ This member outputs trace information when you enable network tracing in your ap
## Examples
The following code example sends a connectionless datagram to the specified remote host.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Sync_Send_Receive/CPP/source.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Receive/source.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Sync_Send_Receive/VB/source.vb" id="Snippet5":::
@@ -13233,7 +13181,6 @@ This member outputs trace information when you enable network tracing in your ap
## Examples
The following code example sends a connectionless datagram to the specified remote host. are passed to the method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Sync_Send_Receive/CPP/source.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Receive/source.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Sync_Send_Receive/VB/source.vb" id="Snippet6":::
@@ -13440,7 +13387,6 @@ This member outputs trace information when you enable network tracing in your ap
## Examples
The following code example sends a connectionless datagram to the specified remote host. The size and are passed to the method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Sync_Send_Receive/CPP/source.cpp" id="Snippet7":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Receive/source.cs" id="Snippet7":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Sync_Send_Receive/VB/source.vb" id="Snippet7":::
@@ -13540,7 +13486,6 @@ This member outputs trace information when you enable network tracing in your ap
## Examples
The following code example sends a connectionless datagram to the specified remote host. The offset, size, and are passed to the method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Sync_Send_Receive/CPP/source.cpp" id="Snippet8":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Receive/source.cs" id="Snippet8":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Sync_Send_Receive/VB/source.vb" id="Snippet8":::
@@ -14180,7 +14125,6 @@ The
@@ -14253,7 +14197,6 @@ The and time-out values.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Socket_Options/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/LingerOption/LingerTime/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Socket_Options/VB/source.vb" id="Snippet1":::
@@ -14396,7 +14339,6 @@ The and time-out values.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Socket_Options/CPP/source.cpp" id="Snippet0":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/LingerOption/LingerTime/source.cs" id="Snippet0":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Socket_Options/VB/source.vb" id="Snippet0":::
@@ -14470,7 +14412,6 @@ The and time out values.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Socket_Options/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/LingerOption/LingerTime/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Socket_Options/VB/source.vb" id="Snippet1":::
@@ -14568,7 +14509,6 @@ The to disable the .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Close Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/Close/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic Socket.Close Example/VB/source.vb" id="Snippet1":::
@@ -14637,7 +14577,6 @@ The , , and to the console.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Socket_Options/CPP/source.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/LingerOption/LingerTime/source.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Socket_Options/VB/source.vb" id="Snippet3":::
@@ -14883,7 +14822,6 @@ Call IDisposable.Dispose when you are finished using the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/SocketPropertyTester/CPP/class1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/DontFragment/class1.cs" id="Snippet1":::
]]>
diff --git a/xml/System.Net.Sockets/SocketFlags.xml b/xml/System.Net.Sockets/SocketFlags.xml
index d13a8be3d98..67205df41c8 100644
--- a/xml/System.Net.Sockets/SocketFlags.xml
+++ b/xml/System.Net.Sockets/SocketFlags.xml
@@ -50,15 +50,14 @@
Specifies socket send and receive behaviors.
-
diff --git a/xml/System.Net.Sockets/SocketOptionLevel.xml b/xml/System.Net.Sockets/SocketOptionLevel.xml
index 16789e6c848..79c48091ec8 100644
--- a/xml/System.Net.Sockets/SocketOptionLevel.xml
+++ b/xml/System.Net.Sockets/SocketOptionLevel.xml
@@ -44,22 +44,21 @@
Defines socket option levels for the and methods.
- enumeration defines the socket option levels that can be passed to the and methods. enumerated values are grouped by .
+
+ **Note** To use IPv6 on Windows XP, install Advance Networking Pack for Windows XP.
+
+
+
+## Examples
+ The following example uses this enumeration to set socket options.
-## Remarks
- The enumeration defines the socket option levels that can be passed to the and methods. enumerated values are grouped by .
-
- **Note** To use IPv6 on Windows XP, install Advance Networking Pack for Windows XP.
-
-
-
-## Examples
- The following example uses this enumeration to set socket options.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Socket_Options/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/LingerOption/LingerTime/source.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Socket_Options/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Socket_Options/VB/source.vb" id="Snippet1":::
+
]]>
diff --git a/xml/System.Net.Sockets/SocketOptionName.xml b/xml/System.Net.Sockets/SocketOptionName.xml
index 1f22cc68d9c..31bf4944d3c 100644
--- a/xml/System.Net.Sockets/SocketOptionName.xml
+++ b/xml/System.Net.Sockets/SocketOptionName.xml
@@ -44,20 +44,19 @@
Defines configuration option names.
- enumeration defines the name of each configuration option. Sockets can be configured with the method.
+
+
+
+## Examples
+ The following code example uses this enumeration to set socket options.
-## Remarks
- The enumeration defines the name of each configuration option. Sockets can be configured with the method.
-
-
-
-## Examples
- The following code example uses this enumeration to set socket options.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Socket_Socket_Options/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/LingerOption/LingerTime/source.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Socket_Options/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Socket_Socket_Options/VB/source.vb" id="Snippet1":::
+
]]>
diff --git a/xml/System.Net.Sockets/SocketType.xml b/xml/System.Net.Sockets/SocketType.xml
index a859939a659..b63ac46cc65 100644
--- a/xml/System.Net.Sockets/SocketType.xml
+++ b/xml/System.Net.Sockets/SocketType.xml
@@ -49,23 +49,22 @@
Specifies the type of socket that an instance of the class represents.
- can send and receive data, it must first be created using an , a , and a . The enumeration provides several options for defining the type of that you intend to open.
-
+ can send and receive data, it must first be created using an , a , and a . The enumeration provides several options for defining the type of that you intend to open.
+
> [!NOTE]
-> sometimes implicitly indicates which is used within an . For example, when the is , the is always . When the is , the is always . If you try to create a with an incompatible combination, throws a .
-
-
+> sometimes implicitly indicates which is used within an . For example, when the is , the is always . When the is , the is always . If you try to create a with an incompatible combination, throws a .
+
+
+
+## Examples
+ The following example uses as a parameter to the constructor.
-## Examples
- The following example uses as a parameter to the constructor.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/SelectModeExample/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/SelectMode/Overview/source.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/SelectModeExample/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/SelectModeExample/VB/source.vb" id="Snippet1":::
+
]]>
diff --git a/xml/System.Net.Sockets/TcpClient.xml b/xml/System.Net.Sockets/TcpClient.xml
index 3b06e968c43..fcee1a20104 100644
--- a/xml/System.Net.Sockets/TcpClient.xml
+++ b/xml/System.Net.Sockets/TcpClient.xml
@@ -74,7 +74,6 @@
## Examples
The following code example establishes a `TcpClient` connection.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.TcpClient/CPP/tcpclient.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpClient/Overview/tcpclient.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.TcpClient/VB/tcpclient.vb" id="Snippet1":::
@@ -156,7 +155,6 @@
## Examples
The following code example demonstrates how to use the parameterless constructor to create a new .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpClient/.ctor/source.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet4":::
@@ -219,7 +217,6 @@
## Examples
The following code example demonstrates how to create an instance of the class using a local endpoint.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpClient/.ctor/source.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet2":::
@@ -282,7 +279,6 @@
## Examples
The following code example demonstrates how to create an instance of the class.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet15":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpClient/.ctor/source.cs" id="Snippet15":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet15":::
@@ -354,7 +350,6 @@
## Examples
The following code example demonstrates how to create an instance of the class using a host name and port number.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpClient/.ctor/source.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet3":::
@@ -480,7 +475,6 @@ The `Available` property is a way to determine whether data is queued for readin
## Examples
The following code example shows the use of the `Available` property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.TcpClient1/CPP/newtcpclient.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpClient/Available/newtcpclient.cs" id="Snippet1":::
]]>
@@ -876,7 +870,6 @@ The `Available` property is a way to determine whether data is queued for readin
## Examples
The following code example demonstrates closing a by calling the `Close` method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLTcpClientSync/CPP/tcpclient.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/NetworkStream/ReadTimeout/tcpclient.cs" id="Snippet1":::
]]>
@@ -952,7 +945,6 @@ The `Available` property is a way to determine whether data is queued for readin
## Examples
The following code example uses an to connect with a remote host.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet7":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpClient/.ctor/source.cs" id="Snippet7":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet7":::
@@ -1027,7 +1019,6 @@ The `Available` property is a way to determine whether data is queued for readin
## Examples
The following code example uses an IP Address and port number to connect with a remote host.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpClient/.ctor/source.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet6":::
@@ -1102,7 +1093,6 @@ The `Available` property is a way to determine whether data is queued for readin
## Examples
The following code example uses an IP Address and port number to connect with a remote host.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.TcpClient1/CPP/newtcpclient.cpp" id="Snippet8":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpClient/Available/newtcpclient.cs" id="Snippet8":::
]]>
@@ -1178,7 +1168,6 @@ The `Available` property is a way to determine whether data is queued for readin
## Examples
The following code example uses the host name and port number to connect with a remote host.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpClient/.ctor/source.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet5":::
@@ -1772,7 +1761,6 @@ The `Available` property is a way to determine whether data is queued for readin
## Examples
The following code example connects to a remote endpoint and then verifies the connection.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.TcpClient1/CPP/newtcpclient.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpClient/Available/newtcpclient.cs" id="Snippet2":::
]]>
@@ -1995,7 +1983,6 @@ The `Available` property is a way to determine whether data is queued for readin
## Examples
The following code example creates a and gets and sets the value of the `ExclusiveAddressUse` property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.TcpClient1/CPP/newtcpclient.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpClient/Available/newtcpclient.cs" id="Snippet3":::
]]>
@@ -2118,7 +2105,6 @@ The `GetStream` method returns a that yo
## Examples
The following code example uses `GetStream` to obtain the underlying . After obtaining the , it sends and receives using its and methods.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet14":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpClient/.ctor/source.cs" id="Snippet14":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet14":::
@@ -2207,7 +2193,6 @@ The `GetStream` method returns a that yo
## Examples
The following code example sets and gets the sockets linger time.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet12":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpClient/.ctor/source.cs" id="Snippet12":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet12":::
@@ -2269,7 +2254,6 @@ The `GetStream` method returns a that yo
## Examples
The following code example disables the delay. It then checks the value of `NoDelay` to verify that the property was successfully set.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet13":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpClient/.ctor/source.cs" id="Snippet13":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet13":::
@@ -2337,7 +2321,6 @@ The `GetStream` method returns a that yo
## Examples
The following code example sets and gets the receive buffer size.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet8":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpClient/.ctor/source.cs" id="Snippet8":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet8":::
@@ -2408,7 +2391,6 @@ The `GetStream` method returns a that yo
## Examples
The following code example sets and gets the receive time out.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet10":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpClient/.ctor/source.cs" id="Snippet10":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet10":::
@@ -2478,7 +2460,6 @@ The `GetStream` method returns a that yo
## Examples
The following code example sets and gets the send buffer size.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet9":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpClient/.ctor/source.cs" id="Snippet9":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet9":::
@@ -2546,7 +2527,6 @@ The `GetStream` method returns a that yo
## Examples
The following code example sets and gets the `SendTimeout` value.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet11":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpClient/.ctor/source.cs" id="Snippet11":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet11":::
diff --git a/xml/System.Net.Sockets/TcpListener.xml b/xml/System.Net.Sockets/TcpListener.xml
index 8ad677a7659..c5a1c8549d9 100644
--- a/xml/System.Net.Sockets/TcpListener.xml
+++ b/xml/System.Net.Sockets/TcpListener.xml
@@ -60,29 +60,28 @@
Listens for connections from TCP network clients.
- class provides simple methods that listen for and accept incoming connection requests in blocking synchronous mode. You can use either a or a to connect with a . Create a using an , a Local IP address and port number, or just a port number. Specify for the local IP address and 0 for the local port number if you want the underlying service provider to assign those values for you. If you choose to do this, you can use the property to identify the assigned information, after the socket has connected.
-
- Use the method to begin listening for incoming connection requests. will queue incoming connections until you either call the method or it has queued . Use either or to pull a connection from the incoming connection request queue. These two methods will block. If you want to avoid blocking, you can use the method first to determine if connection requests are available in the queue.
-
- Call the method to close the .
-
+ class provides simple methods that listen for and accept incoming connection requests in blocking synchronous mode. You can use either a or a to connect with a . Create a using an , a Local IP address and port number, or just a port number. Specify for the local IP address and 0 for the local port number if you want the underlying service provider to assign those values for you. If you choose to do this, you can use the property to identify the assigned information, after the socket has connected.
+
+ Use the method to begin listening for incoming connection requests. will queue incoming connections until you either call the method or it has queued . Use either or to pull a connection from the incoming connection request queue. These two methods will block. If you want to avoid blocking, you can use the method first to determine if connection requests are available in the queue.
+
+ Call the method to close the .
+
> [!NOTE]
-> The method does not close any accepted connections. You are responsible for closing these separately.
-
-
-
-## Examples
- The following code example creates a .
+> The method does not close any accepted connections. You are responsible for closing these separately.
+
+
+
+## Examples
+ The following code example creates a .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.TcpListener/CPP/tcpserver.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpListener/Overview/tcpserver.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.TcpListener/VB/tcpserver.vb" id="Snippet1":::
-
- See for a client example.
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.TcpListener/VB/tcpserver.vb" id="Snippet1":::
+
+ See for a client example.
+
]]>
@@ -155,24 +154,23 @@
The port on which to listen for incoming connection attempts.
Initializes a new instance of the class that listens on the specified port.
- or constructors.
-
- This constructor allows you to specify the port number on which to listen for incoming connection attempts. With this constructor, the underlying service provider assigns the most appropriate network address. If you do not care which local port is used, you can specify 0 for the port number. In this case, the service provider will assign an available ephemeral port number. If you use this approach, you can discover what local network address and port number has been assigned by using the property.
-
- Call the method to begin listening for incoming connection attempts.
-
-
-
-## Examples
- The following code example creates a using a local port number.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic TcpListener.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet3":::
+ or constructors.
+
+ This constructor allows you to specify the port number on which to listen for incoming connection attempts. With this constructor, the underlying service provider assigns the most appropriate network address. If you do not care which local port is used, you can specify 0 for the port number. In this case, the service provider will assign an available ephemeral port number. If you use this approach, you can discover what local network address and port number has been assigned by using the property.
+
+ Call the method to begin listening for incoming connection attempts.
+
+
+
+## Examples
+ The following code example creates a using a local port number.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpListener/.ctor/source.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic TcpListener.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic TcpListener.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet3":::
+
]]>
@@ -220,27 +218,26 @@
An that represents the local endpoint to which to bind the listener .
Initializes a new instance of the class with the specified local endpoint.
- using the desired local IP address and port number. Pass this to the constructor as the `localEP` parameter.
-
- If you do not care which local address is assigned, you can create an using as the address parameter, and the underlying service provider will assign the most appropriate network address. This might help simplify your application if you have multiple network interfaces. If you do not care which local port is used, you can create an using 0 for the port number. In this case, the service provider will assign an available ephemeral port number. If you use this approach, you can discover what local network address and port number has been assigned by using the property.
-
- Call the method to begin listening for incoming connection attempts.
-
+ using the desired local IP address and port number. Pass this to the constructor as the `localEP` parameter.
+
+ If you do not care which local address is assigned, you can create an using as the address parameter, and the underlying service provider will assign the most appropriate network address. This might help simplify your application if you have multiple network interfaces. If you do not care which local port is used, you can create an using 0 for the port number. In this case, the service provider will assign an available ephemeral port number. If you use this approach, you can discover what local network address and port number has been assigned by using the property.
+
+ Call the method to begin listening for incoming connection attempts.
+
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
-
-
-## Examples
- The following code example creates an instance of the class using the local endpoint.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic TcpListener.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet1":::
+> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
+
+
+## Examples
+ The following code example creates an instance of the class using the local endpoint.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpListener/.ctor/source.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic TcpListener.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic TcpListener.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet1":::
+
]]>
@@ -291,25 +288,24 @@
The port on which to listen for incoming connection attempts.
Initializes a new instance of the class that listens for incoming connection attempts on the specified local IP address and port number.
- using the desired local address. Pass this to the constructor as the `localaddr` parameter. If you do not care which local address is assigned, specify for the `localaddr` parameter, and the underlying service provider will assign the most appropriate network address. This might help simplify your application if you have multiple network interfaces. If you do not care which local port is used, you can specify 0 for the port number. In this case, the service provider will assign an available port number between 1024 and 65535. If you use this approach, you can discover what local network address and port number has been assigned by using the property.
-
- Call the method to begin listening for incoming connection attempts.
-
+ using the desired local address. Pass this to the constructor as the `localaddr` parameter. If you do not care which local address is assigned, specify for the `localaddr` parameter, and the underlying service provider will assign the most appropriate network address. This might help simplify your application if you have multiple network interfaces. If you do not care which local port is used, you can specify 0 for the port number. In this case, the service provider will assign an available port number between 1024 and 65535. If you use this approach, you can discover what local network address and port number has been assigned by using the property.
+
+ Call the method to begin listening for incoming connection attempts.
+
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
-
-
-## Examples
- The following code example creates an instance of the class using a local IP address and port number.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic TcpListener.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet2":::
+> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
+
+
+## Examples
+ The following code example creates an instance of the class using a local IP address and port number.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpListener/.ctor/source.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic TcpListener.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic TcpListener.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet2":::
+
]]>
@@ -360,25 +356,24 @@
Accepts a pending connection request.
A used to send and receive data.
- is a blocking method that returns a that you can use to send and receive data. If you want to avoid blocking, use the method to determine if connection requests are available in the incoming connection queue.
-
- The returned is initialized with the IP address and port number of the remote host. You can use any of the and methods available in the class to communicate with the remote host. When you are finished using the , be sure to call its method. If your application is relatively simple, consider using the method rather than the method. provides you with simple methods for sending and receiving data over a network in blocking synchronous mode.
-
+ is a blocking method that returns a that you can use to send and receive data. If you want to avoid blocking, use the method to determine if connection requests are available in the incoming connection queue.
+
+ The returned is initialized with the IP address and port number of the remote host. You can use any of the and methods available in the class to communicate with the remote host. When you are finished using the , be sure to call its method. If your application is relatively simple, consider using the method rather than the method. provides you with simple methods for sending and receiving data over a network in blocking synchronous mode.
+
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
-
-
-## Examples
- In the following code example, the method is used to return a . This is used to communicate with the newly connected client.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic TcpListener.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet4":::
+> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
+
+
+## Examples
+ In the following code example, the method is used to return a . This is used to communicate with the newly connected client.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpListener/.ctor/source.cs" id="Snippet4":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic TcpListener.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic TcpListener.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet4":::
+
]]>
The listener has not been started with a call to .
@@ -426,16 +421,16 @@
Accepts a pending connection request as an asynchronous operation.
The task object representing the asynchronous operation. The property on the task object returns a used to send and receive data.
- object will complete after the socket connection has been accepted.
-
- The returned in is initialized with the IP address and port number of the remote host. You can use any of the and methods available in the class to communicate with the remote host. When you are finished using the , be sure to call its method. If your application is relatively simple, consider using the method rather than the method. provides you with simple methods for sending and receiving data over a network in blocking synchronous mode.
-
+ object will complete after the socket connection has been accepted.
+
+ The returned in is initialized with the IP address and port number of the remote host. You can use any of the and methods available in the class to communicate with the remote host. When you are finished using the , be sure to call its method. If your application is relatively simple, consider using the method rather than the method. provides you with simple methods for sending and receiving data over a network in blocking synchronous mode.
+
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
+> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by .
]]>
@@ -482,16 +477,16 @@
Accepts a pending connection request as a cancellable asynchronous operation.
The task object representing the asynchronous operation. The property on the task object returns a used to send and receive data.
- object will complete after the socket connection has been accepted.
-
- The returned in is initialized with the IP address and port number of the remote host. You can use any of the and methods available in the class to communicate with the remote host. When you are finished using the , be sure to call its method. If your application is relatively simple, consider using the method rather than the method. provides you with simple methods for sending and receiving data over a network in blocking synchronous mode.
-
+ object will complete after the socket connection has been accepted.
+
+ The returned in is initialized with the IP address and port number of the remote host. You can use any of the and methods available in the class to communicate with the remote host. When you are finished using the , be sure to call its method. If your application is relatively simple, consider using the method rather than the method. provides you with simple methods for sending and receiving data over a network in blocking synchronous mode.
+
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
+> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by .
]]>
@@ -539,25 +534,24 @@
Accepts a pending connection request.
A used to send and receive data.
- is a blocking method that returns a that you can use to send and receive data. Use the method to determine if connection requests are available in the incoming connection queue if you want to avoid blocking.
-
- Use the method to obtain the underlying of the returned . The will provide you with methods for sending and receiving with the remote host. When you are through with the , be sure to call its method. If you want greater flexibility than a offers, consider using .
-
+ is a blocking method that returns a that you can use to send and receive data. Use the method to determine if connection requests are available in the incoming connection queue if you want to avoid blocking.
+
+ Use the method to obtain the underlying of the returned . The will provide you with methods for sending and receiving with the remote host. When you are through with the , be sure to call its method. If you want greater flexibility than a offers, consider using .
+
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
-
-
-## Examples
- In the following code example, the method is used to return a . This is used to communicate with the newly connected client.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic TcpListenerExample/CPP/source.cpp" id="Snippet1":::
+> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
+
+
+## Examples
+ In the following code example, the method is used to return a . This is used to communicate with the newly connected client.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpListener/AcceptTcpClient/source.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic TcpListenerExample/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic TcpListenerExample/VB/source.vb" id="Snippet1":::
+
]]>
The listener has not been started with a call to .
@@ -607,16 +601,16 @@
Accepts a pending connection request as an asynchronous operation.
The task object representing the asynchronous operation. The property on the task object returns a used to send and receive data.
- object will complete after the TCP connection has been accepted.
-
- Use the method to obtain the underlying of the returned in the . The will provide you with methods for sending and receiving with the remote host. When you are through with the , be sure to call its method. If you want greater flexibility than a offers, consider using or .
-
+ object will complete after the TCP connection has been accepted.
+
+ Use the method to obtain the underlying of the returned in the . The will provide you with methods for sending and receiving with the remote host. When you are through with the , be sure to call its method. If you want greater flexibility than a offers, consider using or .
+
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
+> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by .
]]>
@@ -665,16 +659,16 @@
Accepts a pending connection request as a cancellable asynchronous operation.
The task object representing the asynchronous operation. The property on the task object returns a used to send and receive data.
- object will complete after the TCP connection has been accepted.
-
- Use the method to obtain the underlying of the returned in the . The will provide you with methods for sending and receiving with the remote host. When you are through with the , be sure to call its method. If you want greater flexibility than a offers, consider using or .
-
+ object will complete after the TCP connection has been accepted.
+
+ Use the method to obtain the underlying of the returned in the . The will provide you with methods for sending and receiving with the remote host. When you are through with the , be sure to call its method. If you want greater flexibility than a offers, consider using or .
+
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
+> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by .
]]>
@@ -729,11 +723,11 @@
if is actively listening; otherwise, .
- can use this property to determine if the is currently listening for incoming connection attempts. The property can be used to avoid redundant attempts.
-
+ can use this property to determine if the is currently listening for incoming connection attempts. The property can be used to avoid redundant attempts.
+
]]>
@@ -785,19 +779,19 @@
A Boolean value that specifies whether to enable or disable NAT traversal.
Enables or disables Network Address Translation (NAT) traversal on a instance.
- method is used to enable or disable NAT traversal for a instance. NAT traversal may be provided using Teredo, 6to4, or an ISATAP tunnel.
-
- When the `allowed` parameter is false, the option on the associated socket is set to . This explicitly disables NAT traversal for a instance.
-
- When the `allowed` parameter is true, the option on the associated socket is set to . This may allow NAT traversal for a depending on firewall rules in place on the system.
-
- The method must be invoked prior to calling the method to begin listening for incoming connection requests (before the socket is bound). If method is called after the method, then an will be thrown.
-
- A Teredo address is an IPv6 address with the prefix of 2001::/32. Teredo addresses can be returned through normal DNS name resolution or enumerated as an IPv6 address assigned to a local interface.
-
+ method is used to enable or disable NAT traversal for a instance. NAT traversal may be provided using Teredo, 6to4, or an ISATAP tunnel.
+
+ When the `allowed` parameter is false, the option on the associated socket is set to . This explicitly disables NAT traversal for a instance.
+
+ When the `allowed` parameter is true, the option on the associated socket is set to . This may allow NAT traversal for a depending on firewall rules in place on the system.
+
+ The method must be invoked prior to calling the method to begin listening for incoming connection requests (before the socket is bound). If method is called after the method, then an will be thrown.
+
+ A Teredo address is an IPv6 address with the prefix of 2001::/32. Teredo addresses can be returned through normal DNS name resolution or enumerated as an IPv6 address assigned to a local interface.
+
]]>
The method was called after calling the method
@@ -859,23 +853,23 @@
Begins an asynchronous operation to accept an incoming connection attempt.
An that references the asynchronous creation of the .
- operation must be completed by calling the method. Typically, the method is invoked by the `callback` delegate.
-
- This method does not block until the operation completes. To block until the operation completes, use the method.
-
- For detailed information about using the asynchronous programming model, see [Calling Synchronous Methods Asynchronously](/dotnet/standard/asynchronous-programming-patterns/calling-synchronous-methods-asynchronously).
-
+ operation must be completed by calling the method. Typically, the method is invoked by the `callback` delegate.
+
+ This method does not block until the operation completes. To block until the operation completes, use the method.
+
+ For detailed information about using the asynchronous programming model, see [Calling Synchronous Methods Asynchronously](/dotnet/standard/asynchronous-programming-patterns/calling-synchronous-methods-asynchronously).
+
> [!NOTE]
-> You can call the property of the returned to identify the remote host's network address and port number.
-
+> You can call the property of the returned to identify the remote host's network address and port number.
+
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code and refer to the [Windows Sockets version 2 API error code](/windows/desktop/winsock/windows-sockets-error-codes-2) documentation for a detailed description of the error.
-
+> If you receive a , use the property to obtain the specific error code and refer to the [Windows Sockets version 2 API error code](/windows/desktop/winsock/windows-sockets-error-codes-2) documentation for a detailed description of the error.
+
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
]]>
@@ -934,21 +928,21 @@
Begins an asynchronous operation to accept an incoming connection attempt.
An that references the asynchronous creation of the .
- operation must be completed by calling the method. Typically, the method is invoked by the `callback` delegate.
-
- This method does not block until the operation completes. To block until the operation completes, use the method.
-
- For detailed information about using the asynchronous programming model, see [Calling Synchronous Methods Asynchronously](/dotnet/standard/asynchronous-programming-patterns/calling-synchronous-methods-asynchronously).
-
+ operation must be completed by calling the method. Typically, the method is invoked by the `callback` delegate.
+
+ This method does not block until the operation completes. To block until the operation completes, use the method.
+
+ For detailed information about using the asynchronous programming model, see [Calling Synchronous Methods Asynchronously](/dotnet/standard/asynchronous-programming-patterns/calling-synchronous-methods-asynchronously).
+
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code and refer to the [Windows Sockets version 2 API error code](/windows/desktop/winsock/windows-sockets-error-codes-2) documentation for a detailed description of the error.
-
+> If you receive a , use the property to obtain the specific error code and refer to the [Windows Sockets version 2 API error code](/windows/desktop/winsock/windows-sockets-error-codes-2) documentation for a detailed description of the error.
+
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
+> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
]]>
An error occurred while attempting to access the socket.
@@ -1067,23 +1061,23 @@
An returned by a call to the method.
Asynchronously accepts an incoming connection attempt and creates a new to handle remote host communication.
- A .
-
+ A .
+
The used to send and receive data.
- method.
-
+ method.
+
> [!NOTE]
-> You can call the property of the returned to identify the remote host's network address and port number.
-
+> You can call the property of the returned to identify the remote host's network address and port number.
+
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code and refer to the [Windows Sockets version 2 API error code](/windows/desktop/winsock/windows-sockets-error-codes-2) documentation for a detailed description of the error.
-
+> If you receive a , use the property to obtain the specific error code and refer to the [Windows Sockets version 2 API error code](/windows/desktop/winsock/windows-sockets-error-codes-2) documentation for a detailed description of the error.
+
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
]]>
@@ -1134,24 +1128,24 @@
An returned by a call to the method.
Asynchronously accepts an incoming connection attempt and creates a new to handle remote host communication.
- A .
-
+ A .
+
The used to send and receive data.
- method.
-
+ method.
+
> [!NOTE]
-> You can call the property of the underlying socket () to identify the remote host's network address and port number.
-
+> You can call the property of the underlying socket () to identify the remote host's network address and port number.
+
> [!NOTE]
-> If you receive a , use the property to obtain the specific error code and refer to the [Windows Sockets version 2 API error code](/windows/desktop/winsock/windows-sockets-error-codes-2) documentation for a detailed description of the error.
-
+> If you receive a , use the property to obtain the specific error code and refer to the [Windows Sockets version 2 API error code](/windows/desktop/winsock/windows-sockets-error-codes-2) documentation for a detailed description of the error.
+
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
+> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
]]>
@@ -1197,22 +1191,21 @@
if the allows only one to listen to a specific port; otherwise, . The default is for Windows Server 2003 and Windows XP Service Pack 2 and later, and for all other versions.
- property to prevent multiple listeners from listening to a specific port.
-
- Set this property before calling , or call the method and then set this property.
-
-
-
-## Examples
- The following code example gets and sets the property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.TcpListener1/cpp/tcpserver.cpp" id="Snippet2":::
+ property to prevent multiple listeners from listening to a specific port.
+
+ Set this property before calling , or call the method and then set this property.
+
+
+
+## Examples
+ The following code example gets and sets the property.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpListener/BeginAcceptSocket/tcpserver.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.TcpListener1/VB/tcpserver.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.TcpListener1/VB/tcpserver.vb" id="Snippet2":::
+
]]>
The has been started. Call the method and then set the property.
@@ -1247,7 +1240,7 @@
class finalizer free resources associated with the instance.
]]>
@@ -1294,20 +1287,19 @@ The class finalizer free resources associa
Gets the underlying of the current .
The to which the is bound.
- property to identify the local network interface and port number being used to listen for incoming client connection requests, after a socket connection has been made. You must first cast this to an . You can then call the property to retrieve the local IP address, and the property to retrieve the local port number.
-
-
-
-## Examples
- The following code example displays the local IP address and port number on which the is listening for incoming connection requests.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/TcpListener_Pending_LocalEndPoint/CPP/source.cpp" id="Snippet1":::
+ property to identify the local network interface and port number being used to listen for incoming client connection requests, after a socket connection has been made. You must first cast this to an . You can then call the property to retrieve the local IP address, and the property to retrieve the local port number.
+
+
+
+## Examples
+ The following code example displays the local IP address and port number on which the is listening for incoming connection requests.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpListener/LocalEndpoint/source.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/TcpListener_Pending_LocalEndPoint/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/TcpListener_Pending_LocalEndPoint/VB/source.vb" id="Snippet1":::
+
]]>
@@ -1356,20 +1348,19 @@ The class finalizer free resources associa
if connections are pending; otherwise, .
- and methods block execution until the method has queued an incoming connection request, the method can be used to determine if connections are available before attempting to accept them.
-
-
-
-## Examples
- The following code example checks the method. If a connection request is waiting to be accepted, then a call to the method is made.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/TcpListener_Pending_LocalEndPoint/CPP/source.cpp" id="Snippet1":::
+ and methods block execution until the method has queued an incoming connection request, the method can be used to determine if connections are available before attempting to accept them.
+
+
+
+## Examples
+ The following code example checks the method. If a connection request is waiting to be accepted, then a call to the method is made.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpListener/LocalEndpoint/source.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/TcpListener_Pending_LocalEndPoint/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/TcpListener_Pending_LocalEndPoint/VB/source.vb" id="Snippet1":::
+
]]>
The listener has not been started with a call to .
@@ -1427,22 +1418,22 @@ The class finalizer free resources associa
Gets the underlying network .
The underlying .
- creates a to listen for incoming client connection requests. Classes deriving from can use this property to get this . Use the underlying returned by the property if you require access beyond that which provides.
-
+ creates a to listen for incoming client connection requests. Classes deriving from can use this property to get this . Use the underlying returned by the property if you require access beyond that which provides.
+
> [!NOTE]
-> The property only returns the used to listen for incoming client connection requests. Use the method to accept a pending connection request and obtain a for sending and receiving data. You can also use the method to accept a pending connection request and obtain a for sending and receiving data.
-
-
-
-## Examples
- The following code example demonstrates the use of the property. The underlying is retrieved and the option is configured to time out after 10 seconds if data still remains in the network buffer after the connection is closed.
-
+> The property only returns the used to listen for incoming client connection requests. Use the method to accept a pending connection request and obtain a for sending and receiving data. You can also use the method to accept a pending connection request and obtain a for sending and receiving data.
+
+
+
+## Examples
+ The following code example demonstrates the use of the property. The underlying is retrieved and the option is configured to time out after 10 seconds if data still remains in the network buffer after the connection is closed.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpListener/Server/source.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/TcpListenerProtectedMembers1/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/TcpListenerProtectedMembers1/VB/source.vb" id="Snippet1":::
+
]]>
@@ -1506,27 +1497,26 @@ The class finalizer free resources associa
Starts listening for incoming connection requests.
- method initializes the underlying , binds it to a local endpoint, and listens for incoming connection attempts. If a connection request is received, the method will queue the request and continue listening for additional requests until you call the method. If receives a connection request after it has already queued the maximum number of connections, it will throw a on the client.
-
- To remove a connection from the incoming connection queue, use either the method or the method. The method will remove a connection from the queue and return a that you can use to send and receive data. The method will return a that you can use to do the same. If your application only requires synchronous I/O, use . For more detailed behavioral control, use . Both of these methods block until a connection request is available in the queue.
-
- Use the method to close the and stop listening. You are responsible for closing your accepted connections separately.
-
+ method initializes the underlying , binds it to a local endpoint, and listens for incoming connection attempts. If a connection request is received, the method will queue the request and continue listening for additional requests until you call the method. If receives a connection request after it has already queued the maximum number of connections, it will throw a on the client.
+
+ To remove a connection from the incoming connection queue, use either the method or the method. The method will remove a connection from the queue and return a that you can use to send and receive data. The method will return a that you can use to do the same. If your application only requires synchronous I/O, use . For more detailed behavioral control, use . Both of these methods block until a connection request is available in the queue.
+
+ Use the method to close the and stop listening. You are responsible for closing your accepted connections separately.
+
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
-
-
-## Examples
- The following code example demonstrates how is used to listen for incoming client connection attempts.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.TcpListener1/cpp/tcpserver.cpp" id="Snippet3":::
+> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
+
+
+## Examples
+ The following code example demonstrates how is used to listen for incoming client connection attempts.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpListener/BeginAcceptSocket/tcpserver.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.TcpListener1/VB/tcpserver.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.TcpListener1/VB/tcpserver.vb" id="Snippet3":::
+
]]>
Use the property to obtain the specific error code. When you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation for a detailed description of the error.
@@ -1578,30 +1568,29 @@ The class finalizer free resources associa
The maximum length of the pending connections queue.
Starts listening for incoming connection requests with a maximum number of pending connection.
- method initializes the underlying , binds it to a local endpoint, and listens for incoming connection attempts. If a connection request is received, will queue the request and continue listening for additional requests until you call the method. If receives a connection request after it has already queued the maximum number of connections it will throw a on the client.
-
- To remove a connection from the incoming connection queue, use either the method or the method. The method will remove a connection from the queue and return a that you can use to send and receive data. The method will return a that you can use to do the same. If your application only requires synchronous I/O, use the . For more detailed behavioral control, use method. Both of these methods block until a connection request is available in the queue.
-
- Use the method to close the and stop listening. You are responsible for closing your accepted connections separately.
-
+ method initializes the underlying , binds it to a local endpoint, and listens for incoming connection attempts. If a connection request is received, will queue the request and continue listening for additional requests until you call the method. If receives a connection request after it has already queued the maximum number of connections it will throw a on the client.
+
+ To remove a connection from the incoming connection queue, use either the method or the method. The method will remove a connection from the queue and return a that you can use to send and receive data. The method will return a that you can use to do the same. If your application only requires synchronous I/O, use the . For more detailed behavioral control, use method. Both of these methods block until a connection request is available in the queue.
+
+ Use the method to close the and stop listening. You are responsible for closing your accepted connections separately.
+
> [!NOTE]
-> Use the property to obtain the specific error code and refer to the [Windows Sockets version 2 API error code](/windows/desktop/winsock/windows-sockets-error-codes-2) documentation for a detailed description of the error.
-
+> Use the property to obtain the specific error code and refer to the [Windows Sockets version 2 API error code](/windows/desktop/winsock/windows-sockets-error-codes-2) documentation for a detailed description of the error.
+
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
-
-
-## Examples
- The following code example demonstrates how is used to listen for incoming client connection attempts.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.TcpListener1/cpp/tcpserver.cpp" id="Snippet3":::
+> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
+
+
+## Examples
+ The following code example demonstrates how is used to listen for incoming client connection attempts.
+
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpListener/BeginAcceptSocket/tcpserver.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.TcpListener1/VB/tcpserver.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.TcpListener1/VB/tcpserver.vb" id="Snippet3":::
+
]]>
An error occurred while accessing the socket.
@@ -1654,23 +1643,22 @@ The class finalizer free resources associa
Closes the listener.
- closes the listener. Any unaccepted connection requests in the queue will be lost. Remote hosts waiting for a connection to be accepted will throw a . You are responsible for closing your accepted connections separately.
-
+ closes the listener. Any unaccepted connection requests in the queue will be lost. Remote hosts waiting for a connection to be accepted will throw a . You are responsible for closing your accepted connections separately.
+
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
-
-
-## Examples
- The following code example demonstrates using the method to close the underlying .
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.TcpListener/CPP/tcpserver.cpp" id="Snippet1":::
+> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
+
+
+## Examples
+ The following code example demonstrates using the method to close the underlying .
+
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpListener/Overview/tcpserver.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.TcpListener/VB/tcpserver.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.TcpListener/VB/tcpserver.vb" id="Snippet1":::
+
]]>
Use the property to obtain the specific error code. When you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation for a detailed description of the error.
diff --git a/xml/System.Net.Sockets/TransmitFileOptions.xml b/xml/System.Net.Sockets/TransmitFileOptions.xml
index 9a0853da63e..f3e6584a86f 100644
--- a/xml/System.Net.Sockets/TransmitFileOptions.xml
+++ b/xml/System.Net.Sockets/TransmitFileOptions.xml
@@ -48,21 +48,20 @@
The enumeration defines values used in file transfer requests.
- [!NOTE]
-> The flags `Disconnect` and `ReuseSocket` return the socket to a disconnected, reusable state after the file has been transmitted. These flags should not be used on a socket where quality of service (QOS) has been requested, because the service provider might immediately delete any quality of service associated with the socket before the file transfer has completed. The best approach for a QOS-enabled socket is to call when the file transfer has completed, rather than relying on these flags.
-
-
-
-## Examples
- The following example demonstrates the use of `TransmitFileOptions` in a call to . The file "test.txt" is located in the root directory of the local machine. In this example, a prebuffer and postbuffer of data are created and sent to the remote host with the file. To use the system's default thread, `UseDefaultWorkerThread` is specified.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSocketEnhancements/CPP/nclsocketenhancements.cpp" id="Snippet4":::
- :::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/BeginAccept/nclsocketenhancements.cs" id="Snippet4":::
+> The flags `Disconnect` and `ReuseSocket` return the socket to a disconnected, reusable state after the file has been transmitted. These flags should not be used on a socket where quality of service (QOS) has been requested, because the service provider might immediately delete any quality of service associated with the socket before the file transfer has completed. The best approach for a QOS-enabled socket is to call when the file transfer has completed, rather than relying on these flags.
+
+
+
+## Examples
+ The following example demonstrates the use of `TransmitFileOptions` in a call to . The file "test.txt" is located in the root directory of the local machine. In this example, a prebuffer and postbuffer of data are created and sent to the remote host with the file. To use the system's default thread, `UseDefaultWorkerThread` is specified.
+ :::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/Socket/BeginAccept/nclsocketenhancements.cs" id="Snippet4":::
+
]]>
diff --git a/xml/System.Net.Sockets/UdpClient.xml b/xml/System.Net.Sockets/UdpClient.xml
index ca542f5502e..c7827046ae9 100644
--- a/xml/System.Net.Sockets/UdpClient.xml
+++ b/xml/System.Net.Sockets/UdpClient.xml
@@ -76,7 +76,6 @@
## Examples
The following example establishes a connection using the host name `www.contoso.com` on port 11000. A small string message is sent to two separate remote host machines. The method blocks execution until a message is received. Using the passed to , the identity of the responding host is revealed.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic UdpClientExample/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/Overview/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic UdpClientExample/VB/source.vb" id="Snippet1":::
@@ -153,7 +152,6 @@
## Examples
The following example demonstrates how to use the parameterless constructor to create an instance of the class.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/.ctor/source.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet4":::
@@ -223,7 +221,6 @@
## Examples
The following example demonstrates using a local port number to create an instance of the class.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/.ctor/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet1":::
@@ -288,7 +285,6 @@
## Examples
The following example demonstrates how to create an instance of the class using a local endpoint.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/.ctor/source.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet2":::
@@ -418,7 +414,6 @@
## Examples
The following code example shows how to create a UDP client to use in a multicast group.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient.JoinMulticastGroup/CPP/joinmulticastgroup.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/IPv6MulticastOption/Overview/joinmulticastgroup.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.UdpClient.JoinMulticastGroup/VB/joinmulticastgroup.vb" id="Snippet3":::
@@ -485,7 +480,6 @@
## Examples
The following example demonstrates how to create an instance of the class using a host name and port number.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/.ctor/source.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet3":::
@@ -683,7 +677,6 @@
## Examples
The following code example shows the use of the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient/CPP/newudpclient.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/Available/newudpclient.cs" id="Snippet1":::
]]>
@@ -757,7 +750,6 @@
## Examples
The following code example uses to asynchronously receive a server response.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient1/cpp/asyncudp.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/BeginReceive/asyncudp.cs" id="Snippet1":::
]]>
@@ -857,10 +849,8 @@
## Examples
The following code example uses to asynchronously send a server request.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient1/cpp/asyncudp.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/BeginReceive/asyncudp.cs" id="Snippet2":::
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient1/cpp/asyncudp.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/BeginReceive/asyncudp.cs" id="Snippet3":::
]]>
@@ -945,10 +935,8 @@
## Examples
The following code example uses to asynchronously send a server request.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient1/cpp/asyncudp.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/BeginReceive/asyncudp.cs" id="Snippet2":::
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient1/cpp/asyncudp.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/BeginReceive/asyncudp.cs" id="Snippet4":::
]]>
@@ -1035,10 +1023,8 @@
## Examples
The following code example uses to asynchronously send a server request.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient1/cpp/asyncudp.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/BeginReceive/asyncudp.cs" id="Snippet2":::
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient1/cpp/asyncudp.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/BeginReceive/asyncudp.cs" id="Snippet5":::
]]>
@@ -1108,7 +1094,6 @@
## Examples
The following example demonstrates the use of the property. In this example, broadcasting is enabled for the underlying .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.ProtectedMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/Client/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic UdpClient.ProtectedMethodsAndPropertiesExample/VB/source.vb" id="Snippet1":::
@@ -1175,7 +1160,6 @@
## Examples
The following example demonstrates closing a by calling the method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet15":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/.ctor/source.cs" id="Snippet15":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet15":::
@@ -1256,7 +1240,6 @@
## Examples
The following example uses an to establish a default remote host.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet7":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/.ctor/source.cs" id="Snippet7":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet7":::
@@ -1334,7 +1317,6 @@
## Examples
The following example uses an IP address and port number to connect with a remote host.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/.ctor/source.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet6":::
@@ -1417,7 +1399,6 @@
## Examples
The following example uses the host name and port number to connect to a remote host.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/.ctor/source.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet5":::
@@ -1585,7 +1566,6 @@
## Examples
The following code example shows the use of the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient/CPP/newudpclient.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/Available/newudpclient.cs" id="Snippet2":::
]]>
@@ -1659,7 +1639,6 @@
## Examples
The following example demonstrates how to drop a multicast group by providing a multicast address.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient.JoinMulticastGroup/CPP/joinmulticastgroup.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/IPv6MulticastOption/Overview/joinmulticastgroup.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.UdpClient.JoinMulticastGroup/VB/joinmulticastgroup.vb" id="Snippet2":::
@@ -1731,7 +1710,6 @@
## Examples
The following code example demonstrates how to drop a multicast group by providing a multicast address.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient.JoinMulticastGroup/CPP/joinmulticastgroup.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/IPv6MulticastOption/Overview/joinmulticastgroup.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.UdpClient.JoinMulticastGroup/VB/joinmulticastgroup.vb" id="Snippet2":::
@@ -1795,7 +1773,6 @@
## Examples
The following code example shows the use of the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient/CPP/newudpclient.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/Available/newudpclient.cs" id="Snippet3":::
]]>
@@ -1866,7 +1843,6 @@
## Examples
The following code example uses to complete an asynchronous receive of a server response.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient1/cpp/asyncudp.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/BeginReceive/asyncudp.cs" id="Snippet1":::
]]>
@@ -1935,7 +1911,6 @@
## Examples
The following code example uses to complete an asynchronous send of a server request.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient1/cpp/asyncudp.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/BeginReceive/asyncudp.cs" id="Snippet2":::
]]>
@@ -2002,7 +1977,6 @@
## Examples
The following code example creates a , and gets and sets the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient/CPP/newudpclient.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/Available/newudpclient.cs" id="Snippet4":::
]]>
@@ -2087,7 +2061,6 @@
## Examples
The following code example demonstrates how to join a multicast group by providing a multicast address.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient.JoinMulticastGroup/CPP/joinmulticastgroup.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/IPv6MulticastOption/Overview/joinmulticastgroup.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.UdpClient.JoinMulticastGroup/VB/joinmulticastgroup.vb" id="Snippet1":::
@@ -2160,7 +2133,6 @@
## Examples
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient.JoinMulticastGroup/CPP/joinmulticastgroup.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/IPv6MulticastOption/Overview/joinmulticastgroup.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.UdpClient.JoinMulticastGroup/VB/joinmulticastgroup.vb" id="Snippet5":::
@@ -2235,7 +2207,6 @@
## Examples
The following example demonstrates how to join a multicast group by providing two parameters, a multicast address, and a number that represents the TTL.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet13":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/.ctor/source.cs" id="Snippet13":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet13":::
@@ -2310,7 +2281,6 @@
## Examples
The following code example shows the use of the method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient/CPP/newudpclient.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/Available/newudpclient.cs" id="Snippet6":::
]]>
@@ -2369,7 +2339,6 @@
## Examples
The following code example shows the use of the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient/CPP/newudpclient.cpp" id="Snippet7":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/Available/newudpclient.cs" id="Snippet7":::
]]>
@@ -2448,7 +2417,6 @@
## Examples
The following example demonstrates the method. The method blocks execution until it receives a message. Using the passed to , the identity of the responding host is revealed.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet11":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/.ctor/source.cs" id="Snippet11":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet11":::
@@ -2656,7 +2624,6 @@
## Examples
The following example demonstrates the method. You must establish a default remote host prior to using this overload.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet10":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/.ctor/source.cs" id="Snippet10":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet10":::
@@ -2786,7 +2753,6 @@
## Examples
The following example demonstrates the method. This example uses an to specify the target host.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet8":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/.ctor/source.cs" id="Snippet8":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet8":::
@@ -2923,7 +2889,6 @@
## Examples
The following example demonstrates the method. This example uses a host name and a port number to identify the target host.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp" id="Snippet9":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/.ctor/source.cs" id="Snippet9":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/VB/source.vb" id="Snippet9":::
@@ -3393,7 +3358,6 @@ Call IDisposable.Dispose when you are finished using the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient/CPP/newudpclient.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/UdpClient/Available/newudpclient.cs" id="Snippet5":::
]]>
diff --git a/xml/System.Net/AuthenticationManager.xml b/xml/System.Net/AuthenticationManager.xml
index d445b8a1f66..f00a7a3c59f 100644
--- a/xml/System.Net/AuthenticationManager.xml
+++ b/xml/System.Net/AuthenticationManager.xml
@@ -54,20 +54,19 @@
Manages the authentication modules called during the client authentication process.
- is a static class that manages the authentication modules that an application uses. When a request is made to protected resources, the calls the method to get an instance to use in subsequent requests.
-
- The queries each registered authentication module by calling the method for each module. The first authentication module to return an instance is used to authenticate the request.
-
+ is a static class that manages the authentication modules that an application uses. When a request is made to protected resources, the calls the method to get an instance to use in subsequent requests.
+
+ The queries each registered authentication module by calling the method for each module. The first authentication module to return an instance is used to authenticate the request.
+
Modules that provide the basic, digest, negotiate, NTLM, and Kerberos authentication types are registered with the by default. Additional authentication modules that implement the interface can be added using the method. Authentication modules are called in the order in which they were added to the list.
-
+
## Examples
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Authentication/CPP/custombasicauthentication.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/AuthenticationManager/Overview/custombasicauthentication.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet1":::
+
]]>
Changes to NTLM authentication for HTTPWebRequest in Version 3.5 SP1
@@ -133,27 +132,27 @@
Calls each registered authentication module to find the first module that can respond to the authentication request.
An instance of the class containing the result of the authorization attempt. If there is no authentication module to respond to the challenge, this method returns .
- method calls the method on each registered authentication module until one of the module responds with an instance.
-
- The first instance returned is used to authenticate the request. If no authentication module can authenticate the request, the method returns `null`.
-
- Authentication modules are called in the order in which they are registered with the .
-
+ method calls the method on each registered authentication module until one of the module responds with an instance.
+
+ The first instance returned is used to authenticate the request. If no authentication module can authenticate the request, the method returns `null`.
+
+ Authentication modules are called in the order in which they are registered with the .
+
]]>
.NET Core and .NET 5+ only: In all cases.
- is .
-
- -or-
-
- is .
-
- -or-
-
+ is .
+
+ -or-
+
+ is .
+
+ -or-
+
is .
@@ -206,21 +205,20 @@
Gets or sets the credential policy to be used for resource requests made using the class.
An object that implements the interface that determines whether credentials are sent with requests. The default value is .
- object that specifies credentials.
-
-
-
-## Examples
- The following code example demonstrates setting the credential policy.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCredPolicy/CPP/NCLCredPolicy.cpp" id="Snippet2":::
- :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/IntranetZoneCredentialPolicy/Overview/websample.cs" id="Snippet2":::
-
+ object that specifies credentials.
+
+
+
+## Examples
+ The following code example demonstrates setting the credential policy.
+
+ :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/IntranetZoneCredentialPolicy/Overview/websample.cs" id="Snippet2":::
+
]]>
@@ -269,31 +267,30 @@
Gets the dictionary that contains Service Principal Names (SPNs) that are used to identify hosts during Kerberos authentication for requests made using and its derived classes.
A writable that contains the SPN values for keys composed of host information.
- to in your request.
-
- When a requires mutual authentication, the SPN for the destination must be supplied by the client. If you know the SPN, you can add it to the before sending the request. If you have not added SPN information to this dictionary, the uses the method to compose the most likely SPN; however, this is a computed value and might be incorrect. If mutual authentication is attempted and fails, you can check the dictionary to determine the computed SPN. No SPN is entered into the dictionary if the authentication protocol does not support mutual authentication.
-
- To add an SPN value to this dictionary, use the of the as the key. Internally, the key is truncated to include the , , and the if it is not the default port.
-
+ to in your request.
+
+ When a requires mutual authentication, the SPN for the destination must be supplied by the client. If you know the SPN, you can add it to the before sending the request. If you have not added SPN information to this dictionary, the uses the method to compose the most likely SPN; however, this is a computed value and might be incorrect. If mutual authentication is attempted and fails, you can check the dictionary to determine the computed SPN. No SPN is entered into the dictionary if the authentication protocol does not support mutual authentication.
+
+ To add an SPN value to this dictionary, use the of the as the key. Internally, the key is truncated to include the , , and the if it is not the default port.
+
> [!NOTE]
-> Accessing the methods and properties of the requires unrestricted .
-
+> Accessing the methods and properties of the requires unrestricted .
+
> [!NOTE]
-> When Kerberos authentication is performed through a proxy, both the proxy and the ultimate host name need to be resolved to an SPN. The proxy name resolution is protected by a timeout. Resolution of the ultimate host name to a SPN requires a DNS lookup, and there is no timeout associated directly with this operation. Therefore synchronous operations may take longer to timeout. To overcome this, add the ultimate host's URI prefix to the SPN cache prior to making requests to it.
-
- Version 3.5 SP1 now defaults to specifying the host name used in the request URL in the SPN in the NTLM (NT LAN Manager) authentication exchange when the property is not set. The host name used in the request URL may be different from the Host header specified in the in the client request. The host name used in the request URL may be different from the actual host name of the server, the machine name of the server, the computer's IP address, or the loopback address. In these cases, Windows will fail the authentication request. To address the issue, you may need to notify Windows that the host name used in the request URL in the client request ("contoso", for example) is actually an alternate name for the local computer.
-
-
-
-## Examples
- The following code example demonstrates displaying the contents of the .
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCredPolicy/CPP/NCLCredPolicy.cpp" id="Snippet5":::
- :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/IntranetZoneCredentialPolicy/Overview/websample.cs" id="Snippet5":::
-
+> When Kerberos authentication is performed through a proxy, both the proxy and the ultimate host name need to be resolved to an SPN. The proxy name resolution is protected by a timeout. Resolution of the ultimate host name to a SPN requires a DNS lookup, and there is no timeout associated directly with this operation. Therefore synchronous operations may take longer to timeout. To overcome this, add the ultimate host's URI prefix to the SPN cache prior to making requests to it.
+
+ Version 3.5 SP1 now defaults to specifying the host name used in the request URL in the SPN in the NTLM (NT LAN Manager) authentication exchange when the property is not set. The host name used in the request URL may be different from the Host header specified in the in the client request. The host name used in the request URL may be different from the actual host name of the server, the machine name of the server, the computer's IP address, or the loopback address. In these cases, Windows will fail the authentication request. To address the issue, you may need to notify Windows that the host name used in the request URL in the client request ("contoso", for example) is actually an alternate name for the local computer.
+
+
+
+## Examples
+ The following code example demonstrates displaying the contents of the .
+
+ :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/IntranetZoneCredentialPolicy/Overview/websample.cs" id="Snippet5":::
+
]]>
Changes to NTLM authentication for HTTPWebRequest in Version 3.5 SP1
@@ -357,13 +354,13 @@
Preauthenticates a request.
An instance of the class if the request can be preauthenticated; otherwise, . If is , this method returns .
- method returns an Authentication instance and sends the authorization information to the server preemptively instead of waiting for the resource to issue a challenge. This behavior is outlined in section 3.3 of RFC 2617 (HTTP Authentication: Basic and Digest Access Authentication). Authentication modules that support preauthentication allow clients to improve server efficiency by avoiding extra round trips caused by authentication challenges.
-
- Authorization modules that can preauthenticate requests set the property to `true`.
-
+ method returns an Authentication instance and sends the authorization information to the server preemptively instead of waiting for the resource to issue a challenge. This behavior is outlined in section 3.3 of RFC 2617 (HTTP Authentication: Basic and Digest Access Authentication). Authentication modules that support preauthentication allow clients to improve server efficiency by avoiding extra round trips caused by authentication challenges.
+
+ Authorization modules that can preauthenticate requests set the property to `true`.
+
]]>
.NET Core and .NET 5+ only: In all cases.
@@ -413,20 +410,19 @@
The to register with the authentication manager.
Registers an authentication module with the authentication manager.
- method adds authentication modules to the end of the list of modules called by the method. Authentication modules are called in the order in which they were added to the list. If a module with the same is already registered, this method removes the registered module and adds `authenticationModule` to the end of the list.
-
-
-
-## Examples
- The following example registers an authentication module with the authentication manager. For a complete example, refer to the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.Authentication/CPP/custombasicauthentication.cpp" id="Snippet2":::
+ method adds authentication modules to the end of the list of modules called by the method. Authentication modules are called in the order in which they were added to the list. If a module with the same is already registered, this method removes the registered module and adds `authenticationModule` to the end of the list.
+
+
+
+## Examples
+ The following example registers an authentication module with the authentication manager. For a complete example, refer to the class.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/AuthenticationManager/Register/custombasicauthentication.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.Authentication/VB/custombasicauthentication.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.Authentication/VB/custombasicauthentication.vb" id="Snippet2":::
+
]]>
@@ -472,20 +468,19 @@
Gets a list of authentication modules that are registered with the authentication manager.
An that enables the registered authentication modules to be read.
- property provides an instance that enables the list of registered authentication modules to be read. The method adds modules to the list, and the method removes modules from it.
-
-
-
-## Examples
- The following example uses the property to get a list of authentication modules that are registered with the authentication manager. For a complete example, refer to the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Authentication/CPP/custombasicauthentication.cpp" id="Snippet8":::
+ property provides an instance that enables the list of registered authentication modules to be read. The method adds modules to the list, and the method removes modules from it.
+
+
+
+## Examples
+ The following example uses the property to get a list of authentication modules that are registered with the authentication manager. For a complete example, refer to the class.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/AuthenticationManager/Overview/custombasicauthentication.cs" id="Snippet8":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet8":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet8":::
+
]]>
@@ -542,20 +537,19 @@
The to remove from the list of registered modules.
Removes the specified authentication module from the list of registered modules.
- method removes the specified authentication module from the list of authentication modules called by the method. The module must have been added to the list using the method before it can be removed from the list.
-
-
-
-## Examples
- The following example uses the method to remove the specified authentication module from the list of registered modules. For a complete example, refer to the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.Authentication/CPP/custombasicauthentication.cpp" id="Snippet2":::
+ method removes the specified authentication module from the list of authentication modules called by the method. The module must have been added to the list using the method before it can be removed from the list.
+
+
+
+## Examples
+ The following example uses the method to remove the specified authentication module from the list of registered modules. For a complete example, refer to the class.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/AuthenticationManager/Register/custombasicauthentication.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.Authentication/VB/custombasicauthentication.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Sockets.Authentication/VB/custombasicauthentication.vb" id="Snippet2":::
+
]]>
@@ -605,20 +599,19 @@
The authentication scheme of the module to remove.
Removes authentication modules with the specified authentication scheme from the list of registered modules.
- method removes the authentication module with the specified authentication scheme from the list of authentication modules called by the method. The module must have been added to the list using the method before it can be removed from the list.
-
-
-
-## Examples
- The following example uses the method to remove an authentication module with the specified authentication scheme from the list of registered modules.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/AuthenticationManager_UnRegister2/CPP/authenticationmanager_unregister2.cpp" id="Snippet2":::
+ method removes the authentication module with the specified authentication scheme from the list of authentication modules called by the method. The module must have been added to the list using the method before it can be removed from the list.
+
+
+
+## Examples
+ The following example uses the method to remove an authentication module with the specified authentication scheme from the list of registered modules.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/AuthenticationManager/Unregister/authenticationmanager_unregister2.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/AuthenticationManager_UnRegister2/VB/authenticationmanager_unregister2.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/AuthenticationManager_UnRegister2/VB/authenticationmanager_unregister2.vb" id="Snippet2":::
+
]]>
diff --git a/xml/System.Net/Authorization.xml b/xml/System.Net/Authorization.xml
index 1ce646ce2cf..2238ac0fa81 100644
--- a/xml/System.Net/Authorization.xml
+++ b/xml/System.Net/Authorization.xml
@@ -50,13 +50,13 @@
Contains an authentication message for an Internet server.
- returns an instance of the class that contains an authentication message. This message is sent to the Internet server to indicate that the client (such as or one of its descendants) is authorized to access the server.
-
- The instance is created by the authentication module that the designates to handle the request.
-
+ returns an instance of the class that contains an authentication message. This message is sent to the Internet server to indicate that the client (such as or one of its descendants) is authorized to access the server.
+
+ The instance is created by the authentication module that the designates to handle the request.
+
]]>
@@ -112,20 +112,19 @@
The encrypted authorization message expected by the server.
Creates a new instance of the class with the specified authorization message.
- instance is created with the property set to `token` and the property set to `true`.
-
-
+ instance is created with the property set to `token` and the property set to `true`.
+
+
+
+## Examples
+ The following code example shows how to create an object. For a complete example, refer to the class.
-## Examples
- The following code example shows how to create an object. For a complete example, refer to the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Authentication/CPP/custombasicauthentication.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/AuthenticationManager/Overview/custombasicauthentication.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet3":::
+
]]>
@@ -172,20 +171,19 @@
The completion status of the authorization attempt. if the authorization attempt is complete; otherwise, .
Creates a new instance of the class with the specified authorization message and completion status.
- instance is created with the property set to `token` and the property set to `finished`.
-
-
-
-## Examples
- The following code example creates a new instance of the class with the specified authorization message and completion status.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Authorization_ProtectionRealm/CPP/authorization_protectionrealm.cpp" id="Snippet1":::
+ instance is created with the property set to `token` and the property set to `finished`.
+
+
+
+## Examples
+ The following code example creates a new instance of the class with the specified authorization message and completion status.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/Authorization/.ctor/authorization_protectionrealm.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Authorization_ProtectionRealm/VB/authorization_protectionrealm.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Authorization_ProtectionRealm/VB/authorization_protectionrealm.vb" id="Snippet1":::
+
]]>
@@ -240,15 +238,14 @@
A unique identifier that can be used to create private client-server connections that are bound only to this authentication scheme.
Creates a new instance of the class with the specified authorization message, completion status, and connection group identifier.
- class with the specified authorization message, completion status, and connection group identifier.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Authorization_Constructor3/CPP/authorization_constructor3.cpp" id="Snippet1":::
+ class with the specified authorization message, completion status, and connection group identifier.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/Authorization/.ctor/authorization_constructor3.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Authorization_Constructor3/VB/authorization_constructor3.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Authorization_Constructor3/VB/authorization_constructor3.vb" id="Snippet1":::
+
]]>
@@ -299,20 +296,19 @@
if the authentication process is complete; otherwise, .
- property is set to `true` when the authentication process between the client and the server is finished. Some authentication modules, such as the Kerberos module, use multiple round trips between the client and server to complete the authentication process. To keep the or descendant that initiated the authentication process from interrupting while authorization is taking place, the authentication module sets the property to `false`.
-
-
-
-## Examples
- The following code example uses the property to get the completion status of the authorization. For a complete example, refer to the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Authentication/CPP/custombasicauthentication.cpp" id="Snippet5":::
+ property is set to `true` when the authentication process between the client and the server is finished. Some authentication modules, such as the Kerberos module, use multiple round trips between the client and server to complete the authentication process. To keep the or descendant that initiated the authentication process from interrupting while authorization is taking place, the authentication module sets the property to `false`.
+
+
+
+## Examples
+ The following code example uses the property to get the completion status of the authorization. For a complete example, refer to the class.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/AuthenticationManager/Overview/custombasicauthentication.cs" id="Snippet5":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet5":::
+
]]>
@@ -364,20 +360,19 @@
Gets a unique identifier for user-specific connections.
A unique string that associates a connection with an authenticating entity.
- property is a unique string that associates a connection with a specific authenticating entity. For example, the NTLM authorization module ties the authentication credential information to a specific connection to prevent invalid reuse of the connection.
-
-
-
-## Examples
- The following code example uses the property to get the group identifier returned by the server. For a complete example, refer to the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Authentication/CPP/custombasicauthentication.cpp" id="Snippet5":::
+ property is a unique string that associates a connection with a specific authenticating entity. For example, the NTLM authorization module ties the authentication credential information to a specific connection to prevent invalid reuse of the connection.
+
+
+
+## Examples
+ The following code example uses the property to get the group identifier returned by the server. For a complete example, refer to the class.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/AuthenticationManager/Overview/custombasicauthentication.cs" id="Snippet5":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet5":::
+
]]>
@@ -428,22 +423,21 @@
Gets the message returned to the server in response to an authentication challenge.
The message that will be returned to the server in response to an authentication challenge.
- property contains the authorization string that the client will return to the server when accessing protected resources. The actual contents of the message are defined by the authentication type the client and server are using. Basic HTTP authentication, for example, uses a different message than Kerberos authentication.
-
- When an authentication module supports preauthentication, the property is sent with the initial request.
-
-
-
-## Examples
- The following code example uses the property to get the message returned to the server in response to an authentication challenge. For a complete example, refer to the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Authentication/CPP/custombasicauthentication.cpp" id="Snippet5":::
+ property contains the authorization string that the client will return to the server when accessing protected resources. The actual contents of the message are defined by the authentication type the client and server are using. Basic HTTP authentication, for example, uses a different message than Kerberos authentication.
+
+ When an authentication module supports preauthentication, the property is sent with the initial request.
+
+
+
+## Examples
+ The following code example uses the property to get the message returned to the server in response to an authentication challenge. For a complete example, refer to the class.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/AuthenticationManager/Overview/custombasicauthentication.cs" id="Snippet5":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet5":::
+
]]>
@@ -494,11 +488,11 @@
if both client and server were authenticated; otherwise, .
-
@@ -553,20 +547,19 @@
Gets or sets the prefix for Uniform Resource Identifiers (URIs) that can be authenticated with the property.
An array of strings that contains URI prefixes.
- property contains a list of URI prefixes that the property can be used to authenticate. and its descendants compare a URI to this list to determine if the is valid for a particular URI.
-
-
-
-## Examples
- The following code example gets or sets the prefix for URIs that can be authenticated with the property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Authorization_ProtectionRealm/CPP/authorization_protectionrealm.cpp" id="Snippet1":::
+ property contains a list of URI prefixes that the property can be used to authenticate. and its descendants compare a URI to this list to determine if the is valid for a particular URI.
+
+
+
+## Examples
+ The following code example gets or sets the prefix for URIs that can be authenticated with the property.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/Authorization/.ctor/authorization_protectionrealm.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Authorization_ProtectionRealm/VB/authorization_protectionrealm.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Authorization_ProtectionRealm/VB/authorization_protectionrealm.vb" id="Snippet1":::
+
]]>
diff --git a/xml/System.Net/Cookie.xml b/xml/System.Net/Cookie.xml
index d130760752c..8cbbd1a0869 100644
--- a/xml/System.Net/Cookie.xml
+++ b/xml/System.Net/Cookie.xml
@@ -76,7 +76,6 @@
## Examples
The following example sends a request to a URL and displays the cookies returned in the response.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/Cookie/Overview/cookiessnippets.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb" id="Snippet1":::
@@ -520,7 +519,6 @@
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the class topic.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/Cookie/Overview/cookiessnippets.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb" id="Snippet3":::
@@ -601,7 +599,6 @@
## Examples
The following example displays the properties of cookies that are returned in a response. For the complete example, see the class topic.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/Cookie/Overview/cookiessnippets.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb" id="Snippet3":::
@@ -678,7 +675,6 @@
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the class topic.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/Cookie/Overview/cookiessnippets.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb" id="Snippet3":::
@@ -750,7 +746,6 @@
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the class topic.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/Cookie/Overview/cookiessnippets.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb" id="Snippet3":::
@@ -879,7 +874,6 @@
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the class topic.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/Cookie/Overview/cookiessnippets.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb" id="Snippet3":::
@@ -957,7 +951,6 @@
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the class topic.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/Cookie/Overview/cookiessnippets.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb" id="Snippet3":::
@@ -1147,7 +1140,6 @@
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the class topic.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/Cookie/Overview/cookiessnippets.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb" id="Snippet3":::
@@ -1224,7 +1216,6 @@
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the class topic.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/Cookie/Overview/cookiessnippets.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb" id="Snippet3":::
@@ -1296,7 +1287,6 @@
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the class topic.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/Cookie/Overview/cookiessnippets.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb" id="Snippet3":::
@@ -1374,7 +1364,6 @@
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the class topic.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/Cookie/Overview/cookiessnippets.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb" id="Snippet3":::
@@ -1446,7 +1435,6 @@
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the class topic.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/Cookie/Overview/cookiessnippets.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb" id="Snippet3":::
@@ -1513,7 +1501,6 @@
## Examples
The following example displays the string value of a cookie returned in a response. For the complete example, see the class topic.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net/Cookie/Overview/cookiessnippets.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb" id="Snippet4":::
@@ -1584,7 +1571,6 @@
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the class topic.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/Cookie/Overview/cookiessnippets.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb" id="Snippet3":::
@@ -1658,7 +1644,6 @@
## Examples
The following example displays the properties of cookies returned in a response. For the complete example, see the class topic.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/Cookie/Overview/cookiessnippets.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb" id="Snippet3":::
diff --git a/xml/System.Net/CookieCollection.xml b/xml/System.Net/CookieCollection.xml
index c2db57f5ed1..eb1c1ceae42 100644
--- a/xml/System.Net/CookieCollection.xml
+++ b/xml/System.Net/CookieCollection.xml
@@ -832,7 +832,6 @@ The comparison for is case-sensitive.
## Examples
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CookieCollection_Item_2/CPP/CookieCollection_Item_2.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/CookieCollection/Item/cookiecollection_item_2.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/CookieCollection_Item_2/VB/cookiecollection_item_2.vb" id="Snippet1":::
@@ -909,7 +908,6 @@ The comparison for is case-sensitive.
## Examples
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CookieCollection_Item_1/CPP/CookieCollection_Item_1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/CookieCollection/Item/cookiecollection_item_1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/CookieCollection_Item_1/VB/cookiecollection_item_1.vb" id="Snippet1":::
diff --git a/xml/System.Net/CredentialCache.xml b/xml/System.Net/CredentialCache.xml
index 85cc3b1e34b..06ae1e29522 100644
--- a/xml/System.Net/CredentialCache.xml
+++ b/xml/System.Net/CredentialCache.xml
@@ -81,7 +81,6 @@
## Examples
The following code example initializes a with multiple security credentials and uses those credentials with a .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic CredentialCache.Add Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/CredentialCache/Overview/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic CredentialCache.Add Example/VB/source.vb" id="Snippet1":::
@@ -138,7 +137,6 @@
## Examples
The following code example initializes a with multiple security credentials and uses those credentials with a .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic CredentialCache.Add Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/CredentialCache/Overview/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic CredentialCache.Add Example/VB/source.vb" id="Snippet1":::
@@ -213,7 +211,6 @@
## Examples
The following code example initializes a with multiple security credentials and uses those credentials with a .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic CredentialCache.Add Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/CredentialCache/Overview/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic CredentialCache.Add Example/VB/source.vb" id="Snippet1":::
@@ -289,7 +286,6 @@
## Examples
The following code example initializes a with multiple security credentials for use with SMTP and uses one of those credentials with a .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCL_Credential.Cache.Add_SMTP/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/CredentialCache/Add/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCL_Credential.Cache.Add_SMTP/VB/source.vb" id="Snippet1":::
@@ -363,7 +359,6 @@
## Examples
The following code example uses the property to get the system credentials of the application.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CredentialCache_DefaultCredentials/CPP/credentialcache_defaultcredentials.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/CredentialCache/DefaultCredentials/credentialcache_defaultcredentials.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/CredentialCache_DefaultCredentials/VB/credentialcache_defaultcredentials.vb" id="Snippet1":::
@@ -500,7 +495,6 @@
## Examples
The following code example uses the method to return the instance associated with the specified URI and authentication type.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CredentialCache_GetCredential/CPP/credentialcache_getcredential.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/CredentialCache/GetCredential/credentialcache_getcredential.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/CredentialCache_GetCredential/VB/credentialcache_getcredential.vb" id="Snippet1":::
@@ -637,7 +631,6 @@
## Examples
The following code example uses the method to return an enumerator that can iterate through the instance.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CredentialCache_GetEnumerator/CPP/credentialcache_getenumerator.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/CredentialCache/GetEnumerator/credentialcache_getenumerator.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/CredentialCache_GetEnumerator/VB/credentialcache_getenumerator.vb" id="Snippet1":::
@@ -713,7 +706,6 @@
## Examples
The following code example uses this method to delete a instance from the cache.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CredentialCache_Add_Remove/CPP/credentialcache_add_remove.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/CredentialCache/Remove/credentialcache_add_remove.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/CredentialCache_Add_Remove/VB/credentialcache_add_remove.vb" id="Snippet3":::
diff --git a/xml/System.Net/Dns.xml b/xml/System.Net/Dns.xml
index 9fd9eb73494..23314b1d64e 100644
--- a/xml/System.Net/Dns.xml
+++ b/xml/System.Net/Dns.xml
@@ -55,22 +55,21 @@
Provides simple domain name resolution functionality.
- class is a static class that retrieves information about a specific host from the Internet Domain Name System (DNS).
-
- The host information from the DNS query is returned in an instance of the class. If the specified host has more than one entry in the DNS database, contains multiple IP addresses and aliases.
-
-
-
-## Examples
- The following example queries the DNS database for information on the host `www.contoso.com`.
+ class is a static class that retrieves information about a specific host from the Internet Domain Name System (DNS).
+
+ The host information from the DNS query is returned in an instance of the class. If the specified host has more than one entry in the DNS database, contains multiple IP addresses and aliases.
+
+
+
+## Examples
+ The following example queries the DNS database for information on the host `www.contoso.com`.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic Dns Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/Dns/Overview/source.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic Dns Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic Dns Example/VB/source.vb" id="Snippet1":::
+
]]>
@@ -136,22 +135,22 @@
Asynchronously returns the Internet Protocol (IP) addresses for the specified host.
An instance that references the asynchronous request.
- method asynchronously queries a DNS server for the IP addresses that are associated with a host name. If `hostNameOrAddress` is an IP address, this address is returned without querying the DNS server.
-
+ method asynchronously queries a DNS server for the IP addresses that are associated with a host name. If `hostNameOrAddress` is an IP address, this address is returned without querying the DNS server.
+
> [!NOTE]
-> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
+> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
If an empty string is passed as the `hostNameOrAddress` argument, then this method returns the IPv4 and IPv6 addresses of the local host.
-
- The asynchronous operation must be completed by calling the method. Typically, the method is invoked by the `requestCallback` delegate.
-
- This method does not block until the operation is complete. To block until the operation is complete, use the method.
-
- For more information about using the asynchronous programming model, see [Calling Synchronous Methods Asynchronously](/dotnet/standard/asynchronous-programming-patterns/calling-synchronous-methods-asynchronously)
-
+
+ The asynchronous operation must be completed by calling the method. Typically, the method is invoked by the `requestCallback` delegate.
+
+ This method does not block until the operation is complete. To block until the operation is complete, use the method.
+
+ For more information about using the asynchronous programming model, see [Calling Synchronous Methods Asynchronously](/dotnet/standard/asynchronous-programming-patterns/calling-synchronous-methods-asynchronously)
+
]]>
@@ -238,18 +237,18 @@
Begins an asynchronous request for information about the specified DNS host name.
An instance that references the asynchronous request.
- operation must be completed by calling the method. Typically, the method is invoked by the `requestCallback` delegate.
-
- This method does not block until the operation is complete. To block until the operation is complete, use the method.
-
- For detailed information about using the asynchronous programming model, see [Calling Synchronous Methods Asynchronously](/dotnet/standard/asynchronous-programming-patterns/calling-synchronous-methods-asynchronously).
-
+ operation must be completed by calling the method. Typically, the method is invoked by the `requestCallback` delegate.
+
+ This method does not block until the operation is complete. To block until the operation is complete, use the method.
+
+ For detailed information about using the asynchronous programming model, see [Calling Synchronous Methods Asynchronously](/dotnet/standard/asynchronous-programming-patterns/calling-synchronous-methods-asynchronously).
+
> [!NOTE]
-> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
+> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
]]>
@@ -329,28 +328,27 @@
Asynchronously resolves an IP address to an instance.
An instance that references the asynchronous request.
- method asynchronously queries a DNS server for the IP addresses and aliases associated with an IP address.
-
- **Note** This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
- The asynchronous operation must be completed by calling the method. Typically, the method is invoked by the `requestCallback` delegate.
-
- This method does not block until the operation is complete. To block until the operation is complete, use the method.
-
- For detailed information about using the asynchronous programming model, see [Calling Synchronous Methods Asynchronously](/dotnet/standard/asynchronous-programming-patterns/calling-synchronous-methods-asynchronously)
-
-
-
-## Examples
- The following code example uses the method to resolve an IP address to an instance.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Dns/CPP/dnsnewmethods.cpp" id="Snippet2":::
+ method asynchronously queries a DNS server for the IP addresses and aliases associated with an IP address.
+
+ **Note** This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
+ The asynchronous operation must be completed by calling the method. Typically, the method is invoked by the `requestCallback` delegate.
+
+ This method does not block until the operation is complete. To block until the operation is complete, use the method.
+
+ For detailed information about using the asynchronous programming model, see [Calling Synchronous Methods Asynchronously](/dotnet/standard/asynchronous-programming-patterns/calling-synchronous-methods-asynchronously)
+
+
+
+## Examples
+ The following code example uses the method to resolve an IP address to an instance.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/Dns/BeginGetHostEntry/dnsnewmethods.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Dns/vb/dnsnewmethods.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Dns/vb/dnsnewmethods.vb" id="Snippet2":::
+
]]>
@@ -421,28 +419,27 @@
Asynchronously resolves a host name or IP address to an instance.
An instance that references the asynchronous request.
- method queries a DNS server for the IP address that is associated with a host name or IP address.
-
- **Note** This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
- The asynchronous operation must be completed by calling the method. Typically, the method is invoked by the `requestCallback` delegate.
-
- This method does not block until the operation is complete. To block until the operation is complete, use the method.
-
- For detailed information about using the asynchronous programming model, see [Calling Synchronous Methods Asynchronously](/dotnet/standard/asynchronous-programming-patterns/calling-synchronous-methods-asynchronously).
-
-
-
-## Examples
- The following code example uses the method to resolve an IP address to an instance.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Dns/CPP/dnsnewmethods.cpp" id="Snippet2":::
+ method queries a DNS server for the IP address that is associated with a host name or IP address.
+
+ **Note** This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
+ The asynchronous operation must be completed by calling the method. Typically, the method is invoked by the `requestCallback` delegate.
+
+ This method does not block until the operation is complete. To block until the operation is complete, use the method.
+
+ For detailed information about using the asynchronous programming model, see [Calling Synchronous Methods Asynchronously](/dotnet/standard/asynchronous-programming-patterns/calling-synchronous-methods-asynchronously).
+
+
+
+## Examples
+ The following code example uses the method to resolve an IP address to an instance.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/Dns/BeginGetHostEntry/dnsnewmethods.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Dns/vb/dnsnewmethods.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Dns/vb/dnsnewmethods.vb" id="Snippet2":::
+
]]>
@@ -529,27 +526,26 @@
Begins an asynchronous request to resolve a DNS host name or IP address to an instance.
An instance that references the asynchronous request.
- operation must be completed by calling the method. Typically, the method is invoked by the `requestCallback` delegate.
-
- This method does not block until the operation is complete. To block until the operation is complete, use the method.
-
- For more information about using the asynchronous programming model, see [Calling Synchronous Methods Asynchronously](/dotnet/standard/asynchronous-programming-patterns/calling-synchronous-methods-asynchronously).
-
+ operation must be completed by calling the method. Typically, the method is invoked by the `requestCallback` delegate.
+
+ This method does not block until the operation is complete. To block until the operation is complete, use the method.
+
+ For more information about using the asynchronous programming model, see [Calling Synchronous Methods Asynchronously](/dotnet/standard/asynchronous-programming-patterns/calling-synchronous-methods-asynchronously).
+
> [!NOTE]
-> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
-
-
-## Examples
- The following example uses to resolve a DNS host name to an .
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Dns_Begin_EndResolve/CPP/dns_begin_endresolve.cpp" id="Snippet1":::
+> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
+
+
+## Examples
+ The following example uses to resolve a DNS host name to an .
+
:::code language="csharp" source="~/snippets/csharp/System.Net/Dns/BeginResolve/dns_begin_endresolve.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Dns_Begin_EndResolve/VB/dns_begin_endresolve.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Dns_Begin_EndResolve/VB/dns_begin_endresolve.vb" id="Snippet1":::
+
]]>
@@ -600,16 +596,16 @@
Ends an asynchronous request for DNS information.
An array of type that holds the IP addresses for the host specified by the parameter of .
- method queries a DNS server for the IP addresses associated with a host name. If `hostNameOrAddress` is an IP address, this address is returned without querying the DNS server.
-
+ method queries a DNS server for the IP addresses associated with a host name. If `hostNameOrAddress` is an IP address, this address is returned without querying the DNS server.
+
If an empty string is passed as the `hostNameOrAddress` argument, then this method returns the IPv4 and IPv6 addresses of the local host.
-
+
> [!NOTE]
-> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
+> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
]]>
@@ -671,18 +667,18 @@
Ends an asynchronous request for DNS information.
An object that contains DNS information about a host.
- method.
-
- If the property is set to `true`, the property of the instance returned is not populated by this method and will always be empty.
-
+ method.
+
+ If the property is set to `true`, the property of the instance returned is not populated by this method and will always be empty.
+
> [!NOTE]
-> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
+> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
]]>
@@ -732,18 +728,18 @@
Ends an asynchronous request for DNS information.
An instance that contains address information about the host.
- property of the instance returned is not populated by this method and will always be empty.
-
- To perform this operation synchronously, use a method.
-
+ property of the instance returned is not populated by this method and will always be empty.
+
+ To perform this operation synchronously, use a method.
+
> [!NOTE]
-> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
+> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
]]>
@@ -807,27 +803,26 @@
Ends an asynchronous request for DNS information.
An object that contains DNS information about a host.
- is set to `true`, the property of the instance returned is not populated by this method and will always be empty.
-
- To perform this operation synchronously, use the method.
-
+ is set to `true`, the property of the instance returned is not populated by this method and will always be empty.
+
+ To perform this operation synchronously, use the method.
+
> [!NOTE]
-> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
-
-
-## Examples
- The following example ends an asynchronous request for DNS host information.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Dns_Begin_EndResolve/CPP/dns_begin_endresolve.cpp" id="Snippet1":::
+> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
+
+
+## Examples
+ The following example ends an asynchronous request for DNS host information.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/Dns/BeginResolve/dns_begin_endresolve.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Dns_Begin_EndResolve/VB/dns_begin_endresolve.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Dns_Begin_EndResolve/VB/dns_begin_endresolve.vb" id="Snippet1":::
+
]]>
@@ -877,29 +872,28 @@
Returns the Internet Protocol (IP) addresses for the specified host.
An array of type that holds the IP addresses for the host that is specified by the parameter.
- method queries the DNS subsystem for the IP addresses associated with a host name. If `hostNameOrAddress` is an IP address, this address is returned without querying the DNS server.
-
+
If an empty string is passed as the `hostNameOrAddress` argument, then this method returns the IPv4 and IPv6 addresses of the local host.
-
- IPv6 addresses are filtered from the results of the method if the local computer does not have IPv6 installed. As a result, it is possible to get back an empty instance if only IPv6 results were available for the `hostNameOrAddress` parameter.
-
+
+ IPv6 addresses are filtered from the results of the method if the local computer does not have IPv6 installed. As a result, it is possible to get back an empty instance if only IPv6 results were available for the `hostNameOrAddress` parameter.
+
This method is implemented using the underlying operating system's name resolution APIs (such as the Win32 API getaddrinfo on Windows, and equivalent APIs on other platforms). If a host is described in the `hosts` file, the IP address or addresses there will be returned without querying the DNS server.
> [!NOTE]
-> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
-
-
-## Examples
- The following code example uses the method to resolve an IP address to an array of type .
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Dns/CPP/dnsnewmethods.cpp" id="Snippet3":::
+> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
+
+
+## Examples
+ The following code example uses the method to resolve an IP address to an array of type .
+
:::code language="csharp" source="~/snippets/csharp/System.Net/Dns/BeginGetHostEntry/dnsnewmethods.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Dns/vb/dnsnewmethods.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Dns/vb/dnsnewmethods.vb" id="Snippet3":::
+
]]>
@@ -986,13 +980,13 @@
Returns the Internet Protocol (IP) addresses for the specified host as an asynchronous operation.
The task object representing the asynchronous operation. The property on the task object returns an array of type that holds the IP addresses for the host that is specified by the parameter.
- object will complete after the `hostNameOrAddress` has been resolved.
-
- This method queries a DNS server for the IP addresses associated with a host name. If `hostNameOrAddress` is an IP address, this address is returned without querying the DNS server.
-
+ object will complete after the `hostNameOrAddress` has been resolved.
+
+ This method queries a DNS server for the IP addresses associated with a host name. If `hostNameOrAddress` is an IP address, this address is returned without querying the DNS server.
+
This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by .
]]>
@@ -1143,22 +1137,21 @@
Creates an instance from the specified .
An instance.
- [!NOTE]
-> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
-
-
-## Examples
- The following example creates a from an .
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Dns_GetHostByAddress_IPAddress/CPP/dns_gethostbyaddress_ipaddress.cpp" id="Snippet1":::
+> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
+
+
+## Examples
+ The following example creates a from an .
+
:::code language="csharp" source="~/snippets/csharp/System.Net/Dns/GetHostByAddress/dns_gethostbyaddress_ipaddress.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Dns_GetHostByAddress_IPAddress/VB/dns_gethostbyaddress_ipaddress.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Dns_GetHostByAddress_IPAddress/VB/dns_gethostbyaddress_ipaddress.vb" id="Snippet1":::
+
]]>
@@ -1223,13 +1216,13 @@
Creates an instance from an IP address.
An instance.
- [!NOTE]
-> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
+> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
]]>
@@ -1296,27 +1289,26 @@
Gets the DNS information for the specified DNS host name.
An object that contains host information for the address specified in .
- method queries the Internet DNS server for host information. If you pass an empty string as the host name, this method retrieves the standard host name for the local computer.
-
- For asynchronous access to DNS information, use the and methods.
-
- If the property is set to `true`, the property of the instance returned is not populated by this method and will always be empty.
-
+ method queries the Internet DNS server for host information. If you pass an empty string as the host name, this method retrieves the standard host name for the local computer.
+
+ For asynchronous access to DNS information, use the and methods.
+
+ If the property is set to `true`, the property of the instance returned is not populated by this method and will always be empty.
+
> [!NOTE]
-> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
-
-
-## Examples
- The following example uses the method to get the DNS information for the specified DNS host name.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Dns_GetHostByName/CPP/dns_gethostbyname.cpp" id="Snippet1":::
+> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
+
+
+## Examples
+ The following example uses the method to get the DNS information for the specified DNS host name.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/Dns/GetHostByName/dns_gethostbyname.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Dns_GetHostByName/VB/dns_gethostbyname.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Dns_GetHostByName/VB/dns_gethostbyname.vb" id="Snippet1":::
+
]]>
@@ -1377,25 +1369,24 @@
Resolves an IP address to an instance.
An instance that contains address information about the host specified in .
- method queries a DNS server for the IP addresses and aliases associated with an IP address.
-
- IPv6 addresses are filtered from the results of the method if the local computer does not have IPv6 installed. As a result, it is possible to get back an empty instance if only IPv6 results were available for the `address` parameter.
-
- The property of the instance returned is not populated by this method and will always be empty.
-
+ method queries a DNS server for the IP addresses and aliases associated with an IP address.
+
+ IPv6 addresses are filtered from the results of the method if the local computer does not have IPv6 installed. As a result, it is possible to get back an empty instance if only IPv6 results were available for the `address` parameter.
+
+ The property of the instance returned is not populated by this method and will always be empty.
+
> [!NOTE]
-> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
+## Examples
+ The following code example uses the method to resolve an IP address to an instance.
-## Examples
- The following code example uses the method to resolve an IP address to an instance.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Dns/CPP/dnsnewmethods.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net/Dns/BeginGetHostEntry/dnsnewmethods.cs" id="Snippet4":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Dns/vb/dnsnewmethods.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Dns/vb/dnsnewmethods.vb" id="Snippet4":::
+
]]>
@@ -1447,47 +1438,46 @@
Resolves a host name or IP address to an instance.
An instance that contains address information about the host specified in .
- method queries a DNS server for the IP address that is associated with a host name or IP address.
-
+ method queries a DNS server for the IP address that is associated with a host name or IP address.
+
If an empty string is passed as the `hostNameOrAddress` argument, then this method returns the IPv4 and IPv6 addresses of the local host.
-
- If the host name could not be found, the exception is returned with a value of 11001 (Windows Sockets error WSAHOST_NOT_FOUND). This exception can be returned if the DNS server does not respond. This exception can also be returned if the name is not an official host name or alias, or it cannot be found in the database(s) being queried.
-
- The exception is also returned if the `hostNameOrAddress` parameter contains or .
-
- The method assumes that if an IP literal string is passed in the `hostNameOrAddress` parameter that the application wants an instance returned with all of the properties set. These properties include the , , and . As a result, the implementation of the method exhibits the following behavior when an IP string literal is passed:
-
-1. The method tries to parse the address. If the `hostNameOrAddress` parameter contains a legal IP string literal, then the first phase succeeds.
-
-2. A reverse lookup using the IP address of the IP string literal is attempted to obtain the host name. This result is set as the property.
-
-3. The host name from this reverse lookup is used again to obtain all the possible IP addresses associated with the name and set as the property.
-
- For an IPv4 string literal, all three steps above may succeed. But it is possible for a stale DNS record for an IPv4 address that actually belongs to a different host to be returned. This may cause step #3 to fail and throw an exception (there is a DNS PTR record for the IPv4 address, but no DNS A record for the IPv4 address).
-
- For IPv6, step #2 above may fail, since most IPv6 deployments do not register the reverse (PTR) record for an IPv6 address. So this method may return the string IPv6 literal as the fully-qualified domain (FQDN) host name in the property.
-
- The method has different behavior with respect to IP literals. If step #1 above succeeds (it successfully parses as an IP address), that address is immediately returned as the result. There is no attempt at a reverse lookup.
-
- IPv6 addresses are filtered from the results of the method if the local computer does not have IPv6 installed. As a result, it is possible to get back an empty instance if only IPv6 results where available for the `hostNameOrAddress`.parameter.
-
- The property of the instance returned is not populated by this method and will always be empty.
-
+
+ If the host name could not be found, the exception is returned with a value of 11001 (Windows Sockets error WSAHOST_NOT_FOUND). This exception can be returned if the DNS server does not respond. This exception can also be returned if the name is not an official host name or alias, or it cannot be found in the database(s) being queried.
+
+ The exception is also returned if the `hostNameOrAddress` parameter contains or .
+
+ The method assumes that if an IP literal string is passed in the `hostNameOrAddress` parameter that the application wants an instance returned with all of the properties set. These properties include the , , and . As a result, the implementation of the method exhibits the following behavior when an IP string literal is passed:
+
+1. The method tries to parse the address. If the `hostNameOrAddress` parameter contains a legal IP string literal, then the first phase succeeds.
+
+2. A reverse lookup using the IP address of the IP string literal is attempted to obtain the host name. This result is set as the property.
+
+3. The host name from this reverse lookup is used again to obtain all the possible IP addresses associated with the name and set as the property.
+
+ For an IPv4 string literal, all three steps above may succeed. But it is possible for a stale DNS record for an IPv4 address that actually belongs to a different host to be returned. This may cause step #3 to fail and throw an exception (there is a DNS PTR record for the IPv4 address, but no DNS A record for the IPv4 address).
+
+ For IPv6, step #2 above may fail, since most IPv6 deployments do not register the reverse (PTR) record for an IPv6 address. So this method may return the string IPv6 literal as the fully-qualified domain (FQDN) host name in the property.
+
+ The method has different behavior with respect to IP literals. If step #1 above succeeds (it successfully parses as an IP address), that address is immediately returned as the result. There is no attempt at a reverse lookup.
+
+ IPv6 addresses are filtered from the results of the method if the local computer does not have IPv6 installed. As a result, it is possible to get back an empty instance if only IPv6 results where available for the `hostNameOrAddress`.parameter.
+
+ The property of the instance returned is not populated by this method and will always be empty.
+
> [!NOTE]
-> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
-
-
-## Examples
- The following example uses the method to resolve an IP address to an instance.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Dns/CPP/dnsnewmethods.cpp" id="Snippet1":::
+> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
+
+
+## Examples
+ The following example uses the method to resolve an IP address to an instance.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/Dns/BeginGetHostEntry/dnsnewmethods.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Dns/vb/dnsnewmethods.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Dns/vb/dnsnewmethods.vb" id="Snippet1":::
+
]]>
The parameter is .
@@ -1582,20 +1572,20 @@
Resolves an IP address to an instance as an asynchronous operation.
The task object representing the asynchronous operation. The property on the task object returns an instance that contains address information about the host specified in .
- object will complete after the `address` has been resolved.
-
- This method queries a DNS server for the IP addresses and aliases associated with an IP address.
-
- IPv6 addresses are filtered from the results of this method if the local computer does not have IPv6 installed. As a result, it is possible to get back an empty instance if only IPv6 results where available for the `address` parameter.
-
- The property of the instance returned is not populated by this method and will always be empty.
-
+ object will complete after the `address` has been resolved.
+
+ This method queries a DNS server for the IP addresses and aliases associated with an IP address.
+
+ IPv6 addresses are filtered from the results of this method if the local computer does not have IPv6 installed. As a result, it is possible to get back an empty instance if only IPv6 results where available for the `address` parameter.
+
+ The property of the instance returned is not populated by this method and will always be empty.
+
> [!NOTE]
-> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
+> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by .
]]>
@@ -1649,42 +1639,42 @@
Resolves a host name or IP address to an instance as an asynchronous operation.
The task object representing the asynchronous operation. The property on the task object returns an instance that contains address information about the host specified in .
- object will complete after the `hostNameOrAddress` has been resolved.
-
- This method queries a DNS server for the IP address that is associated with a host name or IP address.
-
+ object will complete after the `hostNameOrAddress` has been resolved.
+
+ This method queries a DNS server for the IP address that is associated with a host name or IP address.
+
If an empty string is passed as the `hostNameOrAddress` argument, then this method returns the IPv4 and IPv6 addresses of the local host.
-
- If the host name could not be found, the exception is returned with a value of 11001 (Windows Sockets error WSAHOST_NOT_FOUND). This exception can be returned if the DNS server does not respond. This exception can also be returned if the name is not an official host name or alias, or it cannot be found in the database(s) being queried.
-
- The exception is also returned if the `hostNameOrAddress` parameter contains or .
-
- This method assumes that if an IP literal string is passed in the `hostNameOrAddress` parameter that the application wants an instance returned with all of the properties set. These properties include the , , and . As a result, the implementation of this method exhibits the following behavior when an IP string literal is passed:
-
-1. The method tries to parse the address. If the `hostNameOrAddress` parameter contains a legal IP string literal, then the first phase succeeds.
-
-2. A reverse lookup using the IP address of the IP string literal is attempted to obtain the host name. This result is set as the property.
-
-3. The host name from this reverse lookup is used again to obtain all the possible IP addresses associated with the name and set as the property.
-
- For an IPv4 string literal, all three steps above may succeed. But it is possible for a stale DNS record for an IPv4 address that actually belongs to a different host to be returned. This may cause step #3 to fail and throw an exception (there is a DNS PTR record for the IPv4 address, but no DNS A record for the IPv4 address).
-
- For IPv6, step #2 above may fail, since most IPv6 deployments do not register the reverse (PTR) record for an IPv6 address. So this method may return the string IPv6 literal as the fully-qualified domain (FQDN) host name in the property.
-
- The method has different behavior with respect to IP literals. If step #1 above succeeds (it successfully parses as an IP address), that address is immediately returned as the result. There is no attempt at a reverse lookup.
-
- IPv6 addresses are filtered from the results of this method if the local computer does not have IPv6 installed. As a result, it is possible to get back an empty instance if only IPv6 results where available for the `hostNameOrAddress`.parameter.
-
- The property of the instance returned is not populated by this method and will always be empty.
+
+ If the host name could not be found, the exception is returned with a value of 11001 (Windows Sockets error WSAHOST_NOT_FOUND). This exception can be returned if the DNS server does not respond. This exception can also be returned if the name is not an official host name or alias, or it cannot be found in the database(s) being queried.
+
+ The exception is also returned if the `hostNameOrAddress` parameter contains or .
+
+ This method assumes that if an IP literal string is passed in the `hostNameOrAddress` parameter that the application wants an instance returned with all of the properties set. These properties include the , , and . As a result, the implementation of this method exhibits the following behavior when an IP string literal is passed:
+
+1. The method tries to parse the address. If the `hostNameOrAddress` parameter contains a legal IP string literal, then the first phase succeeds.
+
+2. A reverse lookup using the IP address of the IP string literal is attempted to obtain the host name. This result is set as the property.
+
+3. The host name from this reverse lookup is used again to obtain all the possible IP addresses associated with the name and set as the property.
+
+ For an IPv4 string literal, all three steps above may succeed. But it is possible for a stale DNS record for an IPv4 address that actually belongs to a different host to be returned. This may cause step #3 to fail and throw an exception (there is a DNS PTR record for the IPv4 address, but no DNS A record for the IPv4 address).
+
+ For IPv6, step #2 above may fail, since most IPv6 deployments do not register the reverse (PTR) record for an IPv6 address. So this method may return the string IPv6 literal as the fully-qualified domain (FQDN) host name in the property.
+
+ The method has different behavior with respect to IP literals. If step #1 above succeeds (it successfully parses as an IP address), that address is immediately returned as the result. There is no attempt at a reverse lookup.
+
+ IPv6 addresses are filtered from the results of this method if the local computer does not have IPv6 installed. As a result, it is possible to get back an empty instance if only IPv6 results where available for the `hostNameOrAddress`.parameter.
+
+ The property of the instance returned is not populated by this method and will always be empty.
This method is implemented using the underlying operating system's name resolution APIs (such as the Win32 API getaddrinfo on Windows, and equivalent APIs on other platforms). If a host is described in the `hosts` file, the IP address or addresses there will be returned without querying the DNS server.
-
+
> [!NOTE]
-> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
+> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by .
]]>
@@ -1807,15 +1797,14 @@
Gets the host name of the local computer.
A string that contains the DNS host name of the local computer.
- method to obtain the host name of the local computer.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Dns_GetHostName/CPP/dns_gethostname.cpp" id="Snippet1":::
+ method to obtain the host name of the local computer.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/Dns/GetHostName/dns_gethostname.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Dns_GetHostName/VB/dns_gethostname.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Dns_GetHostName/VB/dns_gethostname.vb" id="Snippet1":::
+
]]>
An error is encountered when resolving the local host name.
@@ -1878,27 +1867,26 @@
Resolves a DNS host name or IP address to an instance.
An instance that contains address information about the host specified in .
- method queries a DNS server for the IP address associated with a host name or IP address.
-
- When `hostName` is a DNS-style host name associated with multiple IP addresses, only the first IP address that resolves to that host name is returned.
-
- If the property is set to `true`, the property of the instance returned is not populated by this method and will always be empty.
-
+ method queries a DNS server for the IP address associated with a host name or IP address.
+
+ When `hostName` is a DNS-style host name associated with multiple IP addresses, only the first IP address that resolves to that host name is returned.
+
+ If the property is set to `true`, the property of the instance returned is not populated by this method and will always be empty.
+
> [!NOTE]
-> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
-
-
-## Examples
- The following example uses the method to resolve an IP address to an instance.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Dns_Resolve/CPP/dns_resolve.cpp" id="Snippet1":::
+> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
+
+
+## Examples
+ The following example uses the method to resolve an IP address to an instance.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/Dns/Resolve/dns_resolve.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Dns_Resolve/VB/dns_resolve.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Dns_Resolve/VB/dns_resolve.vb" id="Snippet1":::
+
]]>
diff --git a/xml/System.Net/DnsPermission.xml b/xml/System.Net/DnsPermission.xml
index d7654dc6714..ee8d1019c87 100644
--- a/xml/System.Net/DnsPermission.xml
+++ b/xml/System.Net/DnsPermission.xml
@@ -48,14 +48,14 @@
Controls rights to access Domain Name System (DNS) servers on the network.
-
@@ -93,20 +93,19 @@
One of the values.
Creates a new instance of the class that either allows unrestricted DNS access or disallows DNS access.
- , the instance passes all demands. If `state` contains any other value, the instance fails all demands.
-
-
-
-## Examples
- The following example creates an instance of the class.
+ , the instance passes all demands. If `state` contains any other value, the instance fails all demands.
+
+
+
+## Examples
+ The following example creates an instance of the class.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/DnsPermission_Constructor/CPP/dnspermission_constructor.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/DnsPermission/.ctor/dnspermission_constructor.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/DnsPermission_Constructor/VB/dnspermission_constructor.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/DnsPermission_Constructor/VB/dnspermission_constructor.vb" id="Snippet1":::
+
]]>
@@ -146,20 +145,19 @@
Creates an identical copy of the current permission instance.
A new instance of the class that is an identical copy of the current instance.
- instance provides the same access to DNS servers as the original permission instance.
-
-
-
-## Examples
- The following example creates an identical copy of an existing instance.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/DnsPermission_Copy/CPP/dnspermission_copy.cpp" id="Snippet1":::
+ instance provides the same access to DNS servers as the original permission instance.
+
+
+
+## Examples
+ The following example creates an identical copy of an existing instance.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DnsPermission/Copy/dnspermission_copy.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/DnsPermission_Copy/VB/dnspermission_copy.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/DnsPermission_Copy/VB/dnspermission_copy.vb" id="Snippet1":::
+
]]>
@@ -199,22 +197,21 @@
The XML encoding to use to reconstruct the instance.
Reconstructs a instance from an XML encoding.
- method reconstructs a instance from an XML encoding defined by the class.
-
- Use the method to XML-encode the instance, including state information.
-
-
-
-## Examples
- The following example reconstructs a instance from an XML encoding.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/DnsPermission_FromXml/CPP/dnspermission_fromxml.cpp" id="Snippet1":::
+ method reconstructs a instance from an XML encoding defined by the class.
+
+ Use the method to XML-encode the instance, including state information.
+
+
+
+## Examples
+ The following example reconstructs a instance from an XML encoding.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DnsPermission/FromXml/dnspermission_fromxml.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/DnsPermission_FromXml/VB/dnspermission_fromxml.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/DnsPermission_FromXml/VB/dnspermission_fromxml.vb" id="Snippet1":::
+
]]>
@@ -260,20 +257,19 @@
Creates a permission instance that is the intersection of the current permission instance and the specified permission instance.
A instance that represents the intersection of the current instance with the specified instance, or if the intersection is empty. If both the current instance and are unrestricted, this method returns a new instance that is unrestricted; otherwise, it returns .
- method returns a instance that allows the access defined by both the current instance and the specified instance. Any demand must pass both permissions to pass their intersection.
-
-
-
-## Examples
- The following example creates a permission instance that is the intersection of the current permission instance and the specified permission instance.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/dnspermission_union_intersect/CPP/dnspermission_union_intersect.cpp" id="Snippet2":::
+ method returns a instance that allows the access defined by both the current instance and the specified instance. Any demand must pass both permissions to pass their intersection.
+
+
+
+## Examples
+ The following example creates a permission instance that is the intersection of the current permission instance and the specified permission instance.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DnsPermission/Intersect/dnspermission_union_intersect.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/dnspermission_union_intersect/VB/dnspermission_union_intersect.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/dnspermission_union_intersect/VB/dnspermission_union_intersect.vb" id="Snippet2":::
+
]]>
@@ -317,22 +313,21 @@
if the current instance is unrestricted and is either or unrestricted; otherwise, .
- instance is a subset of the specified instance if the current instance specifies a set of operations that is wholly contained by the specified instance.
-
- If the method returns `true`, the current instance allows no more access to DNS servers than does the specified instance.
-
-
-
-## Examples
- The following example uses the method to determine whether the current permission instance is a subset of the specified permission instance.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/DnsPermission_IsSubsetOf/CPP/dnspermission_issubsetof.cpp" id="Snippet1":::
+ instance is a subset of the specified instance if the current instance specifies a set of operations that is wholly contained by the specified instance.
+
+ If the method returns `true`, the current instance allows no more access to DNS servers than does the specified instance.
+
+
+
+## Examples
+ The following example uses the method to determine whether the current permission instance is a subset of the specified permission instance.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DnsPermission/IsSubsetOf/dnspermission_issubsetof.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/DnsPermission_IsSubsetOf/VB/dnspermission_issubsetof.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/DnsPermission_IsSubsetOf/VB/dnspermission_issubsetof.vb" id="Snippet1":::
+
]]>
@@ -376,15 +371,14 @@
if the instance was created with ; otherwise, .
- method to check the overall permission state of the object.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/DnsPermission_IsUnrestricted/CPP/dnspermission_isunrestricted.cpp" id="Snippet1":::
+ method to check the overall permission state of the object.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DnsPermission/IsUnrestricted/dnspermission_isunrestricted.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/DnsPermission_IsUnrestricted/VB/dnspermission_isunrestricted.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/DnsPermission_IsUnrestricted/VB/dnspermission_isunrestricted.vb" id="Snippet1":::
+
]]>
@@ -422,22 +416,21 @@
Creates an XML encoding of a instance and its current state.
A instance that contains an XML-encoded representation of the security object, including state information.
- method creates a instance to XML-encode a representation of the instance, including state information.
-
- Use the method to restore the state information from a instance.
-
-
-
-## Examples
- The following example creates an XML encoding of a instance.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/DnsPermission_Constructor/CPP/dnspermission_constructor.cpp" id="Snippet1":::
+ method creates a instance to XML-encode a representation of the instance, including state information.
+
+ Use the method to restore the state information from a instance.
+
+
+
+## Examples
+ The following example creates an XML encoding of a instance.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DnsPermission/.ctor/dnspermission_constructor.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/DnsPermission_Constructor/VB/dnspermission_constructor.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/DnsPermission_Constructor/VB/dnspermission_constructor.vb" id="Snippet1":::
+
]]>
@@ -478,20 +471,19 @@
Creates a permission instance that is the union of the current permission instance and the specified permission instance.
A instance that represents the union of the current instance with the specified instance. If is , this method returns a copy of the current instance. If the current instance or is unrestricted, this method returns a instance that is unrestricted; otherwise, it returns a instance that is restricted.
- method returns a instance that allows the access defined by either the current instance or the specified instance. Any demand that passes either permission passes their union.
-
-
-
-## Examples
- The following example creates a permission instance that is the union of the current permission instance and the specified permission instance.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/dnspermission_union_intersect/CPP/dnspermission_union_intersect.cpp" id="Snippet1":::
+ method returns a instance that allows the access defined by either the current instance or the specified instance. Any demand that passes either permission passes their union.
+
+
+
+## Examples
+ The following example creates a permission instance that is the union of the current permission instance and the specified permission instance.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DnsPermission/Intersect/dnspermission_union_intersect.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/dnspermission_union_intersect/VB/dnspermission_union_intersect.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/dnspermission_union_intersect/VB/dnspermission_union_intersect.vb" id="Snippet1":::
+
]]>
diff --git a/xml/System.Net/DownloadDataCompletedEventArgs.xml b/xml/System.Net/DownloadDataCompletedEventArgs.xml
index 40ee166e858..3230f68c07d 100644
--- a/xml/System.Net/DownloadDataCompletedEventArgs.xml
+++ b/xml/System.Net/DownloadDataCompletedEventArgs.xml
@@ -49,26 +49,24 @@
Provides data for the event.
- .
+
+
+
+## Examples
+ The following code example demonstrates downloading a user-specified resource.
-## Remarks
- Instances of this class are passed to the .
-
-
-
-## Examples
- The following code example demonstrates downloading a user-specified resource.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet21":::
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet21":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet21":::
-
- The following method is called when the download completes.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet22":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet21":::
+
+ The following method is called when the download completes.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet22":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet22":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet22":::
+
]]>
@@ -111,20 +109,19 @@
Gets the data that is downloaded by a method.
A array that contains the downloaded data.
- and properties before using the data that is returned by this property. If the property's value is an object or the property's value is `true`, the asynchronous operation did not complete correctly and the property's value will not be valid.
-
-
-
-## Examples
- The following code example displays the value of this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet22":::
+ and properties before using the data that is returned by this property. If the property's value is an object or the property's value is `true`, the asynchronous operation did not complete correctly and the property's value will not be valid.
+
+
+
+## Examples
+ The following code example displays the value of this property.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet22":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet22":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet22":::
+
]]>
diff --git a/xml/System.Net/DownloadDataCompletedEventHandler.xml b/xml/System.Net/DownloadDataCompletedEventHandler.xml
index 60c41089185..9df0fede7ba 100644
--- a/xml/System.Net/DownloadDataCompletedEventHandler.xml
+++ b/xml/System.Net/DownloadDataCompletedEventHandler.xml
@@ -51,26 +51,24 @@
A containing event data.
Represents the method that will handle the event of a .
- delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event handler delegates, see [Handling and Raising Events](/dotnet/standard/events/).
+
+
+
+## Examples
+ The following code example demonstrates downloading a user-specified resource.
-## Remarks
- When you create a delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event handler delegates, see [Handling and Raising Events](/dotnet/standard/events/).
-
-
-
-## Examples
- The following code example demonstrates downloading a user-specified resource.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet21":::
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet21":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet21":::
-
- The following method is called when the download completes.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet22":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet21":::
+
+ The following method is called when the download completes.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet22":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet22":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet22":::
+
]]>
diff --git a/xml/System.Net/DownloadProgressChangedEventArgs.xml b/xml/System.Net/DownloadProgressChangedEventArgs.xml
index 16e6ceb3439..ea50d6d0216 100644
--- a/xml/System.Net/DownloadProgressChangedEventArgs.xml
+++ b/xml/System.Net/DownloadProgressChangedEventArgs.xml
@@ -57,7 +57,6 @@ Instances of this class are passed to the event.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="SnippetDownloadProgressChanged":::
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="SnippetDownloadProgressChanged":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="SnippetDownloadProgressChanged":::
@@ -120,7 +119,6 @@ The following code example demonstrates setting an event handler for the event. The method displays the value of the `BytesReceived` property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet42":::
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet42":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet42":::
@@ -185,7 +183,6 @@ The following code example demonstrates setting an event handler for the event. The method displays the value of the `TotalBytesToReceive` property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet42":::
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet42":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet42":::
diff --git a/xml/System.Net/DownloadProgressChangedEventHandler.xml b/xml/System.Net/DownloadProgressChangedEventHandler.xml
index aee25613f99..756d4949fed 100644
--- a/xml/System.Net/DownloadProgressChangedEventHandler.xml
+++ b/xml/System.Net/DownloadProgressChangedEventHandler.xml
@@ -67,7 +67,6 @@
The following code example demonstrates setting an event handler for the event.
-:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="SnippetDownloadProgressChanged":::
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="SnippetDownloadProgressChanged":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="SnippetDownloadProgressChanged":::
diff --git a/xml/System.Net/DownloadStringCompletedEventArgs.xml b/xml/System.Net/DownloadStringCompletedEventArgs.xml
index 01e443135b4..168208e46fc 100644
--- a/xml/System.Net/DownloadStringCompletedEventArgs.xml
+++ b/xml/System.Net/DownloadStringCompletedEventArgs.xml
@@ -53,26 +53,24 @@
Provides data for the event.
- .
+
+
+
+## Examples
+ The following code example demonstrates downloading a string asynchronously.
-## Remarks
- Instances of this class are passed to the .
-
-
-
-## Examples
- The following code example demonstrates downloading a string asynchronously.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet28":::
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet28":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet28":::
-
- The following method is called when the download completes.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet29":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet28":::
+
+ The following method is called when the download completes.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet29":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet29":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet29":::
+
]]>
@@ -118,20 +116,19 @@
Gets the data that is downloaded by a method.
A that contains the downloaded data.
- and properties before using the data that is returned by this property. If the property's value is an object or the property's value is `true`, the asynchronous operation did not complete correctly and the property's value will not be valid.
-
-
-
-## Examples
- The following code example displays the value of this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet29":::
+ and properties before using the data that is returned by this property. If the property's value is an object or the property's value is `true`, the asynchronous operation did not complete correctly and the property's value will not be valid.
+
+
+
+## Examples
+ The following code example displays the value of this property.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet29":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet29":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet29":::
+
]]>
diff --git a/xml/System.Net/DownloadStringCompletedEventHandler.xml b/xml/System.Net/DownloadStringCompletedEventHandler.xml
index 6d3da8adef3..3a7542bb799 100644
--- a/xml/System.Net/DownloadStringCompletedEventHandler.xml
+++ b/xml/System.Net/DownloadStringCompletedEventHandler.xml
@@ -55,26 +55,24 @@
A that contains event data.
Represents the method that will handle the event of a .
- delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event handler delegates, see [Handling and Raising Events](/dotnet/standard/events/).
+
+
+
+## Examples
+ The following code example demonstrates downloading a string asynchronously.
-## Remarks
- When you create a delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event handler delegates, see [Handling and Raising Events](/dotnet/standard/events/).
-
-
-
-## Examples
- The following code example demonstrates downloading a string asynchronously.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet28":::
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet28":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet28":::
-
- The following method is called when the download completes.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet29":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet28":::
+
+ The following method is called when the download completes.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet29":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet29":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet29":::
+
]]>
diff --git a/xml/System.Net/FileWebRequest.xml b/xml/System.Net/FileWebRequest.xml
index 3090fb2f311..83fde77cc61 100644
--- a/xml/System.Net/FileWebRequest.xml
+++ b/xml/System.Net/FileWebRequest.xml
@@ -62,28 +62,27 @@
Provides a file system implementation of the class.
- class implements the `abstract` base class for Uniform Resource Identifiers (URIs) that use the `file://` scheme to request local files.
-
- Do not use the constructor. Use the method to initialize new instances of the class. If the URI scheme is `file://`, the method returns a object.
-
- The method makes a synchronous request for the file specified in the property and returns a object that contains the response. You can make an asynchronous request for the file using the and methods.
-
- When you want to write data to a file, the method returns a instance to write to. The and methods provide asynchronous access to the write data stream.
-
- The class relies on the class for error handling and code access security.
-
-
-
-## Examples
- The following code example uses the class to access a file system resource.
+ class implements the `abstract` base class for Uniform Resource Identifiers (URIs) that use the `file://` scheme to request local files.
+
+ Do not use the constructor. Use the method to initialize new instances of the class. If the URI scheme is `file://`, the method returns a object.
+
+ The method makes a synchronous request for the file specified in the property and returns a object that contains the response. You can make an asynchronous request for the file using the and methods.
+
+ When you want to write data to a file, the method returns a instance to write to. The and methods provide asynchronous access to the write data stream.
+
+ The class relies on the class for error handling and code access security.
+
+
+
+## Examples
+ The following code example uses the class to access a file system resource.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.FileWebRequest/CPP/getrequeststream.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FileWebRequest/Overview/getrequeststream.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.FileWebRequest/VB/getrequeststream.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.FileWebRequest/VB/getrequeststream.vb" id="Snippet1":::
+
]]>
@@ -148,11 +147,11 @@
A object that contains the source of the serialized stream that is associated with the new object.
Initializes a new instance of the class from the specified instances of the and classes.
- interface for the class.
-
+ interface for the class.
+
]]>
XML and SOAP Serialization
@@ -196,13 +195,13 @@
Cancels a request to an Internet resource.
- method cancels a request to a resource. After a request is canceled, calling the , , , , , or method causes a with the property set to .
-
- **Note** This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
+ method cancels a request to a resource. After a request is canceled, calling the , , , , , or method causes a with the property set to .
+
+ **Note** This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
]]>
@@ -259,20 +258,19 @@
Begins an asynchronous request for a object to use to write data.
An that references the asynchronous request.
- method starts an asynchronous request for a stream used to send data to a file system resource. The callback method that implements the delegate uses the method to return the request stream.
-
-
-
-## Examples
- The following code example uses to make an asynchronous request for a object.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/FileWebRequest_ReqBeginEnd/CPP/filewebrequest_reqbeginend.cpp" id="Snippet2":::
+ method starts an asynchronous request for a stream used to send data to a file system resource. The callback method that implements the delegate uses the method to return the request stream.
+
+
+
+## Examples
+ The following code example uses to make an asynchronous request for a object.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/FileWebRequest/BeginGetRequestStream/filewebrequest_reqbeginend.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebRequest_ReqBeginEnd/VB/filewebrequest_reqbeginend.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebRequest_ReqBeginEnd/VB/filewebrequest_reqbeginend.vb" id="Snippet2":::
+
]]>
The property is GET and the application writes to the stream.
@@ -336,20 +334,19 @@
Begins an asynchronous request for a file system resource.
An that references the asynchronous request.
- delegate uses the method to return the actual .
-
-
-
-## Examples
- The following code example uses the method to asynchronously access a file system resource.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/FileWebRequest_ResBeginEnd/CPP/filewebrequest_resbeginend.cpp" id="Snippet2":::
+ delegate uses the method to return the actual .
+
+
+
+## Examples
+ The following code example uses the method to asynchronously access a file system resource.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/FileWebRequest/BeginGetResponse/filewebrequest_resbeginend.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebRequest_ResBeginEnd/VB/filewebrequest_resbeginend.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebRequest_ResBeginEnd/VB/filewebrequest_resbeginend.vb" id="Snippet2":::
+
]]>
The stream is already in use by a previous call to .
@@ -413,11 +410,11 @@
Gets or sets the name of the connection group for the request. This property is reserved for future use.
The name of the connection group for the request.
- property is currently not used by the class.
-
+ property is currently not used by the class.
+
]]>
@@ -467,15 +464,14 @@
Gets or sets the content length of the data being sent.
The number of bytes of request data being sent.
- class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.FileWebRequest/CPP/getrequeststream.cpp" id="Snippet4":::
+ class.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/FileWebRequest/Overview/getrequeststream.cs" id="Snippet4":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.FileWebRequest/VB/getrequeststream.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.FileWebRequest/VB/getrequeststream.vb" id="Snippet4":::
+
]]>
@@ -528,11 +524,11 @@
Gets or sets the content type of the data being sent. This property is reserved for future use.
The content type of the data being sent.
- property contains the media type of the data being sent. This is typically the MIME encoding of the content. The property is currently not used by the class.
-
+ property contains the media type of the data being sent. This is typically the MIME encoding of the content. The property is currently not used by the class.
+
]]>
@@ -591,11 +587,11 @@
Gets or sets the credentials that are associated with this request. This property is reserved for future use.
An that contains the authentication credentials that are associated with this request. The default is .
- class does not authenticate requests for files from the local file system, it ignores the contents, if any, of the property. Authentication for is handled by the access control lists for the file resource in the underlying file system.
-
+ class does not authenticate requests for files from the local file system, it ignores the contents, if any, of the property. Authentication for is handled by the access control lists for the file resource in the underlying file system.
+
]]>
@@ -643,23 +639,22 @@
Ends an asynchronous request for a instance that the application uses to write data.
A object that the application uses to write data.
- method completes an asynchronous stream request that was started by the method.
-
+ method completes an asynchronous stream request that was started by the method.
+
> [!NOTE]
-> To avoid timing issues with garbage collection, be sure to close the response stream by calling the method on the stream returned by the method after calling the method.
-
-
-
-## Examples
- The following example uses the method to end the asynchronous request for a object.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/FileWebRequest_ReqBeginEnd/CPP/filewebrequest_reqbeginend.cpp" id="Snippet2":::
+> To avoid timing issues with garbage collection, be sure to close the response stream by calling the method on the stream returned by the method after calling the method.
+
+
+
+## Examples
+ The following example uses the method to end the asynchronous request for a object.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/FileWebRequest/BeginGetRequestStream/filewebrequest_reqbeginend.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebRequest_ReqBeginEnd/VB/filewebrequest_reqbeginend.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebRequest_ReqBeginEnd/VB/filewebrequest_reqbeginend.vb" id="Snippet2":::
+
]]>
@@ -712,20 +707,19 @@
Ends an asynchronous request for a file system resource.
A that contains the response from the file system resource.
- method completes an asynchronous request for a file system resource that was started with the method.
-
-
-
-## Examples
- The following code example uses the method to end an asynchronous request for a file system resource.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/FileWebRequest_ResBeginEnd/CPP/filewebrequest_resbeginend.cpp" id="Snippet2":::
+ method completes an asynchronous request for a file system resource that was started with the method.
+
+
+
+## Examples
+ The following code example uses the method to end an asynchronous request for a file system resource.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/FileWebRequest/BeginGetResponse/filewebrequest_resbeginend.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebRequest_ResBeginEnd/VB/filewebrequest_resbeginend.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebRequest_ResBeginEnd/VB/filewebrequest_resbeginend.vb" id="Snippet2":::
+
]]>
@@ -784,11 +778,11 @@
A that specifies the destination for this serialization.
Populates a with the data needed to serialize the target object.
- are automatically tracked and serialized by the formatter.
-
+ are automatically tracked and serialized by the formatter.
+
]]>
@@ -833,20 +827,19 @@
Returns a object for writing data to the file system resource.
A for writing data to the file system resource.
- method provides synchronous access to the . For asynchronous access, use the and methods.
-
-
-
-## Examples
- The following code example uses the method to obtain a stream instance used to write to the file. Refer to the complete example in the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.FileWebRequest/CPP/getrequeststream.cpp" id="Snippet5":::
+ method provides synchronous access to the . For asynchronous access, use the and methods.
+
+
+
+## Examples
+ The following code example uses the method to obtain a stream instance used to write to the file. Refer to the complete example in the class.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/FileWebRequest/Overview/getrequeststream.cs" id="Snippet5":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.FileWebRequest/VB/getrequeststream.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.FileWebRequest/VB/getrequeststream.vb" id="Snippet5":::
+
]]>
The request times out.
@@ -884,9 +877,9 @@
Returns a stream for writing data to the file system resource as an asynchronous operation.
The task object representing the asynchronous operation.
- [!NOTE]
> In the case of asynchronous requests, the client application is responsible for implementing its own time-out mechanism.
@@ -944,22 +937,21 @@ The stream already received a response previous to your request.
Returns a response to a file system request.
A that contains the response from the file system resource.
- method returns a object that contains the response from the file system resource.
-
- The method provides synchronous access to the . For asynchronous access, use the and methods.
-
-
-
-## Examples
- The following code example uses the method to return a file system request response.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.FileWebRequest.GetResponse/CPP/getresponse.cpp" id="Snippet1":::
+ method returns a object that contains the response from the file system resource.
+
+ The method provides synchronous access to the . For asynchronous access, use the and methods.
+
+
+
+## Examples
+ The following code example uses the method to return a file system request response.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/FileWebRequest/GetResponse/getresponse.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.FileWebRequest.GetResponse/VB/getresponse.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.FileWebRequest.GetResponse/VB/getresponse.vb" id="Snippet1":::
+
]]>
The request timed out.
@@ -996,9 +988,9 @@ The stream already received a response previous to your request.
Returns a response to a file system request as an asynchronous operation.
The task object representing the asynchronous operation.
- [!NOTE]
> In the case of asynchronous requests, the client application is responsible for implementing its own time-out mechanism.
@@ -1056,11 +1048,11 @@ This method stores in the task it returns all non-usage exceptions that the meth
Gets a collection of the name/value pairs that are associated with the request. This property is reserved for future use.
A that contains header name/value pairs associated with this request.
- property is currently not used by the class.
-
+ property is currently not used by the class.
+
]]>
@@ -1110,30 +1102,29 @@ This method stores in the task it returns all non-usage exceptions that the meth
Gets or sets the protocol method used for the request. This property is reserved for future use.
The protocol method to use in this request.
- property is currently not used by the class.
-
-
-
-## Examples
- The following code example sets the protocol method used for the request. Refer to the complete example in the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.FileWebRequest/CPP/getrequeststream.cpp" id="Snippet2":::
+ property is currently not used by the class.
+
+
+
+## Examples
+ The following code example sets the protocol method used for the request. Refer to the complete example in the class.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/FileWebRequest/Overview/getrequeststream.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.FileWebRequest/VB/getrequeststream.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.FileWebRequest/VB/getrequeststream.vb" id="Snippet2":::
+
]]>
- The method is invalid.
-
+ The method is invalid.
+
-or-
-
- The method is not supported.
-
+
+ The method is not supported.
+
-or-
-
+
Multiple methods were specified.
@@ -1183,11 +1174,11 @@ This method stores in the task it returns all non-usage exceptions that the meth
to preauthenticate; otherwise, .
- property is currently not used by the class.
-
+ property is currently not used by the class.
+
]]>
@@ -1246,11 +1237,11 @@ This method stores in the task it returns all non-usage exceptions that the meth
Gets or sets the network proxy to use for this request. This property is reserved for future use.
An that indicates the network proxy to use for this request.
- property is currently not used by the class.
-
+ property is currently not used by the class.
+
]]>
@@ -1300,15 +1291,14 @@ This method stores in the task it returns all non-usage exceptions that the meth
Gets the Uniform Resource Identifier (URI) of the request.
A that contains the URI of the request.
- property to get the URI of the request.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/FileWebRequest_ContentLength/CPP/filewebrequest_contentlength.cpp" id="Snippet2":::
+ property to get the URI of the request.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/FileWebRequest/RequestUri/filewebrequest_contentlength.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebRequest_ContentLength/VB/filewebrequest_contentlength.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebRequest_ContentLength/VB/filewebrequest_contentlength.vb" id="Snippet2":::
+
]]>
@@ -1413,20 +1403,19 @@ This method stores in the task it returns all non-usage exceptions that the meth
Gets or sets the length of time until the request times out.
The time, in milliseconds, until the request times out, or the value to indicate that the request does not time out.
- to a value less than 15 seconds, it may take 15 seconds or more before a is thrown to indicate a time-out on your request.
-
-
-
-## Examples
- The following code example sets the property. Refer to the complete example in the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.FileWebRequest/CPP/getrequeststream.cpp" id="Snippet3":::
+ to a value less than 15 seconds, it may take 15 seconds or more before a is thrown to indicate a time-out on your request.
+
+
+
+## Examples
+ The following code example sets the property. Refer to the complete example in the class.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/FileWebRequest/Overview/getrequeststream.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.FileWebRequest/VB/getrequeststream.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.FileWebRequest/VB/getrequeststream.vb" id="Snippet3":::
+
]]>
The value specified is less than or equal to zero and is not .
@@ -1470,11 +1459,11 @@ This method stores in the task it returns all non-usage exceptions that the meth
Always throws a .
Always throws a .
- property is provided only for compatibility with other implementations of the and classes. There is no reason to use .
-
+ property is provided only for compatibility with other implementations of the and classes. There is no reason to use .
+
]]>
Default credentials are not supported for file Uniform Resource Identifiers (URIs).
diff --git a/xml/System.Net/FileWebResponse.xml b/xml/System.Net/FileWebResponse.xml
index b4788f653e9..8516fdf3500 100644
--- a/xml/System.Net/FileWebResponse.xml
+++ b/xml/System.Net/FileWebResponse.xml
@@ -70,17 +70,17 @@
Provides a file system implementation of the class.
- class implements the `abstract` base class to return file system resources for the class.
-
- Client applications do not create instances directly; instead, they are created by calling the method on a instance.
-
- The method returns a instance that provides read-only access to a file system resource.
-
- The class relies on the class for error handling and code access security.
-
+ class implements the `abstract` base class to return file system resources for the class.
+
+ Client applications do not create instances directly; instead, they are created by calling the method on a instance.
+
+ The method returns a instance that provides read-only access to a file system resource.
+
+ The class relies on the class for error handling and code access security.
+
]]>
@@ -144,11 +144,11 @@
An instance of the class that contains the source of the serialized stream associated with the new instance.
Initializes a new instance of the class from the specified instances of the and classes.
- interface for the class.
-
+ interface for the class.
+
]]>
XML and SOAP Serialization
@@ -193,23 +193,22 @@
Closes the response stream.
- method cleans up the resources used by a and closes the response stream by calling the method.
-
+ method cleans up the resources used by a and closes the response stream by calling the method.
+
> [!NOTE]
-> The response stream must be closed to avoid running out of system resources. You can closes the response stream by calling either or
-
-
-
-## Examples
- The following example uses the method to close the response stream.
+> The response stream must be closed to avoid running out of system resources. You can closes the response stream by calling either or
+
+
+
+## Examples
+ The following example uses the method to close the response stream.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/FileWebResponse_Close/CPP/filewebresponse_close.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FileWebResponse/Close/filewebresponse_close.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebResponse_Close/VB/filewebresponse_close.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebResponse_Close/VB/filewebresponse_close.vb" id="Snippet1":::
+
]]>
@@ -253,20 +252,19 @@
Gets the length of the content in the file system resource.
The number of bytes returned from the file system resource.
- property contains the length, in bytes, of the file system resource.
-
-
-
-## Examples
- The following example uses the property to obtain the content length of the file system resource.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/FileWebResponse_ContentLength_ContentType/CPP/filewebresponse_contentlength_contenttype.cpp" id="Snippet1":::
+ property contains the length, in bytes, of the file system resource.
+
+
+
+## Examples
+ The following example uses the property to obtain the content length of the file system resource.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/FileWebResponse/ContentLength/filewebresponse_contentlength_contenttype.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebResponse_ContentLength_ContentType/VB/filewebresponse_contentlength_contenttype.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebResponse_ContentLength_ContentType/VB/filewebresponse_contentlength_contenttype.vb" id="Snippet1":::
+
]]>
@@ -310,20 +308,19 @@
Gets the content type of the file system resource.
The value "binary/octet-stream".
- property contains the content type of the file system resource. The value of is always "binary/octet-stream".
-
-
-
-## Examples
- The following example uses the property to obtain the content type of the file system resource.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/FileWebResponse_ContentLength_ContentType/CPP/filewebresponse_contentlength_contenttype.cpp" id="Snippet1":::
+ property contains the content type of the file system resource. The value of is always "binary/octet-stream".
+
+
+
+## Examples
+ The following example uses the property to obtain the content type of the file system resource.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/FileWebResponse/ContentLength/filewebresponse_contentlength_contenttype.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebResponse_ContentLength_ContentType/VB/filewebresponse_contentlength_contenttype.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebResponse_ContentLength_ContentType/VB/filewebresponse_contentlength_contenttype.vb" id="Snippet1":::
+
]]>
@@ -408,11 +405,11 @@
A that specifies the destination for this serialization.
Populates a with the data needed to serialize the target object.
- are automatically tracked and serialized by the formatter.
-
+ are automatically tracked and serialized by the formatter.
+
]]>
@@ -457,23 +454,22 @@
Returns the data stream from the file system resource.
A for reading data from the file system resource.
- method returns the data stream from the file system resource.
-
+ method returns the data stream from the file system resource.
+
> [!NOTE]
-> The response stream must be closed to avoid running out of system resources. The response stream can be closed by calling or
-
-
-
-## Examples
- The following example uses the method to return the data stream from the file system resource.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/FileWebResponse_GetResponseStream/CPP/filewebresponse_getresponsestream.cpp" id="Snippet1":::
+> The response stream must be closed to avoid running out of system resources. The response stream can be closed by calling or
+
+
+
+## Examples
+ The following example uses the method to return the data stream from the file system resource.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/FileWebResponse/GetResponseStream/filewebresponse_getresponsestream.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebResponse_GetResponseStream/VB/filewebresponse_getresponsestream.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebResponse_GetResponseStream/VB/filewebresponse_getresponsestream.vb" id="Snippet1":::
+
]]>
@@ -517,20 +513,19 @@
Gets a collection of header name/value pairs associated with the response.
A that contains the header name/value pairs associated with the response.
- property contains two name/value pairs, one for content length and one for content type, both of which are also exposed as properties, and .
-
-
-
-## Examples
- The following example uses the property to retrieve the name/value pairs associated with the response.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/FileWebResponse_Headers/CPP/filewebresponse_headers.cpp" id="Snippet1":::
+ property contains two name/value pairs, one for content length and one for content type, both of which are also exposed as properties, and .
+
+
+
+## Examples
+ The following example uses the property to retrieve the name/value pairs associated with the response.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/FileWebResponse/Headers/filewebresponse_headers.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebResponse_Headers/VB/filewebresponse_headers.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebResponse_Headers/VB/filewebresponse_headers.vb" id="Snippet1":::
+
]]>
@@ -574,20 +569,19 @@
Gets the URI of the file system resource that provided the response.
A that contains the URI of the file system resource that provided the response.
- property contains the URI of the file system resource that provided the response. This is always the file system resource that was requested.
-
-
-
-## Examples
- The following example uses the to retrieve the URI of the file system resource that provided the response.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/FileWebResponse_ResponseUri/CPP/filewebresponse_responseuri.cpp" id="Snippet1":::
+ property contains the URI of the file system resource that provided the response. This is always the file system resource that was requested.
+
+
+
+## Examples
+ The following example uses the to retrieve the URI of the file system resource that provided the response.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/FileWebResponse/ResponseUri/filewebresponse_responseuri.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebResponse_ResponseUri/VB/filewebresponse_responseuri.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/FileWebResponse_ResponseUri/VB/filewebresponse_responseuri.vb" id="Snippet1":::
+
]]>
@@ -630,11 +624,11 @@
if the property is supported by the instance; otherwise, .
-
@@ -669,12 +663,12 @@
. The Dispose() method leaves the in an unusable state. After calling Dispose(), you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
> [!NOTE]
-> Always call Dispose() before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
+> Always call Dispose() before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
]]>
diff --git a/xml/System.Net/FtpStatusCode.xml b/xml/System.Net/FtpStatusCode.xml
index 92ea938b1c3..a379405d94e 100644
--- a/xml/System.Net/FtpStatusCode.xml
+++ b/xml/System.Net/FtpStatusCode.xml
@@ -42,21 +42,20 @@
Specifies the status codes returned for a File Transfer Protocol (FTP) operation.
- enumeration defines the values returned in the property.
-
- For additional information about FTP server status codes, see [RFC 959: "File Transfer Protocol", Section 4.2: "FTP Replies"](https://www.ietf.org/rfc/rfc959.txt).
-
-
-
-## Examples
- The following code example sends an FTP request to make a new directory on an FTP server and checks the status code returned in the response.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet22":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet22":::
+ enumeration defines the values returned in the property.
+
+ For additional information about FTP server status codes, see [RFC 959: "File Transfer Protocol", Section 4.2: "FTP Replies"](https://www.ietf.org/rfc/rfc959.txt).
+
+
+
+## Examples
+ The following code example sends an FTP request to make a new directory on an FTP server and checks the status code returned in the response.
+ :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet22":::
+
]]>
diff --git a/xml/System.Net/FtpWebRequest.xml b/xml/System.Net/FtpWebRequest.xml
index fea37dafdc1..66294ced204 100644
--- a/xml/System.Net/FtpWebRequest.xml
+++ b/xml/System.Net/FtpWebRequest.xml
@@ -90,17 +90,14 @@
## Examples
The following code example demonstrates deleting a file from an FTP server.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet4":::
The following code example demonstrates downloading a file from an FTP server by using the class.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet5":::
The following code example demonstrates using asynchronous operations to upload a file to an FTP server.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpAsync/CPP/async.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FtpWebRequest/Overview/async.cs" id="Snippet1":::
]]>
@@ -164,7 +161,6 @@
## Examples
The following code example demonstrates how the user can terminate an asynchronous upload of a file from the local directory to the server.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet10":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet10":::
]]>
@@ -245,7 +241,6 @@
## Examples
The following code example demonstrates beginning an asynchronous operation to get a request's stream. This code example is part of a larger example provided for the class overview.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpAsync/CPP/async.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FtpWebRequest/Overview/async.cs" id="Snippet4":::
]]>
@@ -336,7 +331,6 @@
## Examples
The following code example demonstrates ending an asynchronous operation to get a request's stream, and then starting a request to get the response. This code example is part of a larger example provided for the class overview.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpAsync/CPP/async.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FtpWebRequest/Overview/async.cs" id="Snippet5":::
]]>
@@ -476,7 +470,6 @@
## Examples
The following code example retrieves the value of this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet16":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet16":::
]]>
@@ -606,7 +599,6 @@
## Examples
The following code example demonstrates downloading part of a file from a server and appending the downloaded data to a local file.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet7":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet7":::
]]>
@@ -730,7 +722,6 @@
## Examples
The following code example retrieves the value of this property and uses it to display the user name.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet14":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet14":::
]]>
@@ -869,7 +860,6 @@
## Examples
The following code example uses an encrypted connection to download the directory listing from an FTP server.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet8":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet8":::
]]>
@@ -940,7 +930,6 @@
## Examples
The following code example demonstrates ending an asynchronous operation to get a request's stream. This code example is part of a larger example provided for the class overview.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpAsync/CPP/async.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FtpWebRequest/Overview/async.cs" id="Snippet5":::
]]>
@@ -1015,7 +1004,6 @@
## Examples
The following code example demonstrates ending an asynchronous operation to get a response. This code example is part of a larger example provided for the class overview.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpAsync/CPP/async.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FtpWebRequest/Overview/async.cs" id="Snippet6":::
]]>
@@ -1094,7 +1082,6 @@
## Examples
The following code example demonstrates copying a file to a request's data stream and sending a request to the server to upload the data and append it to a file.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet3":::
]]>
@@ -1178,7 +1165,6 @@
## Examples
The following code example demonstrates copying a file to a request's data stream and sending a request to append data to a file to the server. The example calls to send the request and block until the response is returned by the server.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet3":::
]]>
@@ -1316,7 +1302,6 @@
## Examples
The following code example retrieves and displays property values for a specified object.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet15":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet15":::
]]>
@@ -1390,7 +1375,6 @@
## Examples
The following code example sets this property to .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet4":::
]]>
@@ -1511,7 +1495,6 @@ For more information about this API, see [Supplemental API remarks for System.Ne
@@ -1693,7 +1676,6 @@ The following code example displays this property value.
## Examples
The following code example displays this property value.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet14":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet14":::
]]>
@@ -1760,7 +1742,6 @@ The following code example displays this property value.
## Examples
The following code example retrieves the service point from a request and sets the maximum number of connections to one.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet1":::
]]>
@@ -1833,7 +1814,6 @@ The following code example displays this property value.
## Examples
The following code example sets this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet23":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet23":::
]]>
@@ -1905,7 +1885,6 @@ The following code example displays this property value.
## Examples
The following code example retrieves and displays property values for a specified object.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet15":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet15":::
]]>
@@ -2028,7 +2007,6 @@ The following code example displays this property value.
## Examples
The following code example retrieves and displays property values for a specified object.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet6":::
]]>
diff --git a/xml/System.Net/FtpWebResponse.xml b/xml/System.Net/FtpWebResponse.xml
index eaa5486c285..229bbdcc094 100644
--- a/xml/System.Net/FtpWebResponse.xml
+++ b/xml/System.Net/FtpWebResponse.xml
@@ -56,23 +56,22 @@
Encapsulates a File Transfer Protocol (FTP) server's response to a request.
- are obtained by calling the method. The returned object must be cast to an . When your application no longer needs the object, call the method to free the resources held by the .
-
- The property contains the status code returned by the server, and the property returns the status code and a message that describes the status. The values returned by these properties change as the messages are returned by the server.
-
- Any data returned by the request, such as the list of file names returned for a request, is available in the stream returned by the method. The length of the stream data can be obtained from the property.
-
-
-
-## Examples
- The following code example sends a request to delete a file on an FTP server and displays the status message from the server's response to the request. For additional examples, see the members of the and classes.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet4":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet4":::
+ are obtained by calling the method. The returned object must be cast to an . When your application no longer needs the object, call the method to free the resources held by the .
+
+ The property contains the status code returned by the server, and the property returns the status code and a message that describes the status. The values returned by these properties change as the messages are returned by the server.
+
+ Any data returned by the request, such as the list of file names returned for a request, is available in the stream returned by the method. The length of the stream data can be obtained from the property.
+
+
+
+## Examples
+ The following code example sends a request to delete a file on an FTP server and displays the status message from the server's response to the request. For additional examples, see the members of the and classes.
+ :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet4":::
+
]]>
@@ -128,14 +127,13 @@
Gets the message sent by the FTP server when a connection is established prior to logon.
A that contains the banner message sent by the server; otherwise, if no message is sent.
-
@@ -184,22 +182,21 @@
Frees the resources held by the response.
- method closes the data stream returned by the method if the property is `false`. During the close, data might be sent to the server on the control connection.
-
+ method closes the data stream returned by the method if the property is `false`. During the close, data might be sent to the server on the control connection.
+
> [!NOTE]
-> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
-
-
-
-## Examples
- The following code example downloads data from a server, reads the data from the response stream, and then closes it.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet9":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet9":::
-
+> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).
+
+
+
+## Examples
+ The following code example downloads data from a server, reads the data from the response stream, and then closes it.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet9":::
+
]]>
@@ -248,21 +245,20 @@
Gets the length of the data received from the FTP server.
An value that contains the number of bytes of data received from the FTP server.
- property contains the number of bytes in the stream. returns −1 if no data was returned in the response or if the server did not send content length information. The return value is greater than or equal to zero if data was or should have been returned. For example, for requests that use the field, the property always returns −1. For requests that use the method, the property is always zero. For requests that use the method, the property is greater than zero if the downloaded file contained data and is zero if it was empty.
-
- For requests that use the method, returns the size of the specified file on the server.
-
-
-
-## Examples
- The following code example downloads a file from on the specified FTP server. This property contains the number of bytes in the downloaded file.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet9":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet9":::
-
+ property contains the number of bytes in the stream. returns −1 if no data was returned in the response or if the server did not send content length information. The return value is greater than or equal to zero if data was or should have been returned. For example, for requests that use the field, the property always returns −1. For requests that use the method, the property is always zero. For requests that use the method, the property is greater than zero if the downloaded file contained data and is zero if it was empty.
+
+ For requests that use the method, returns the size of the specified file on the server.
+
+
+
+## Examples
+ The following code example downloads a file from on the specified FTP server. This property contains the number of bytes in the downloaded file.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet9":::
+
]]>
@@ -301,12 +297,12 @@
Throws a in all cases.
Throws a in all cases.
- and classes.
-
+
]]>
In all cases.
@@ -357,19 +353,18 @@ This property is provided only for compatibility with other implementations of t
Gets the message sent by the server when the FTP session is ending.
A that contains the exit message sent by the server; otherwise, if no message is sent.
- property is not available until the connection to the server is closed or reused. If the property is `true`, the connection used by this request is not closed, which prevents the server from sending an exit message.
-
-
-
-## Examples
- The following code example displays the value of this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet17":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet17":::
-
+ property is not available until the connection to the server is closed or reused. If the property is `true`, the connection used by this request is not closed, which prevents the server from sending an exit message.
+
+
+
+## Examples
+ The following code example displays the value of this property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet17":::
+
]]>
@@ -421,21 +416,20 @@ This property is provided only for compatibility with other implementations of t
Retrieves the stream that contains response data sent from an FTP server.
A readable instance that contains data returned with the response; otherwise, if no response data was returned by the server.
- object that contains it.
-
- An exception is thrown unless the request method is or .
-
-
-
-## Examples
- The following code example demonstrates getting the response stream for a request.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet1":::
-
+ object that contains it.
+
+ An exception is thrown unless the request method is or .
+
+
+
+## Examples
+ The following code example demonstrates getting the response stream for a request.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet1":::
+
]]>
The response did not return a data stream.
@@ -492,11 +486,11 @@ This property is provided only for compatibility with other implementations of t
Gets an empty object.
An empty object.
- property is provided only for compatibility with other implementations of the and classes.
-
+ property is provided only for compatibility with other implementations of the and classes.
+
]]>
@@ -545,19 +539,18 @@ This property is provided only for compatibility with other implementations of t
Gets the date and time that a file on an FTP server was last modified.
A that contains the last modified date and time for a file.
- property returns the data requested by the method. For requests sent using any other method, returns .
-
-
-
-## Examples
- The following code example displays the date and time that a file on an FTP server was last modified.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet21":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet21":::
-
+ property returns the data requested by the method. For requests sent using any other method, returns .
+
+
+
+## Examples
+ The following code example displays the date and time that a file on an FTP server was last modified.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet21":::
+
]]>
@@ -612,21 +605,20 @@ This property is provided only for compatibility with other implementations of t
Gets the URI that sent the response to the request.
A instance that identifies the resource associated with this response.
- property is not always the same as the value returned by the property.
-
- For requests that use the method, returns the name of the file on the server.
-
-
-
-## Examples
- The following code example displays the value of this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet9":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet9":::
-
+ property is not always the same as the value returned by the property.
+
+ For requests that use the method, returns the name of the file on the server.
+
+
+
+## Examples
+ The following code example displays the value of this property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet9":::
+
]]>
@@ -675,19 +667,18 @@ This property is provided only for compatibility with other implementations of t
Gets the most recent status code sent from the FTP server.
An value that indicates the most recent status code returned with this response.
- property is included in the property. When you are downloading data, the value of changes as status codes are returned by the FTP server. After you call the method, contains an intermediate status code. When you call the method, contains the final status.
-
-
-
-## Examples
- The following code example uploads a file to a server and displays the status.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet2":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet2":::
-
+ property is included in the property. When you are downloading data, the value of changes as status codes are returned by the FTP server. After you call the method, contains an intermediate status code. When you call the method, contains the final status.
+
+
+
+## Examples
+ The following code example uploads a file to a server and displays the status.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet2":::
+
]]>
@@ -737,19 +728,18 @@ This property is provided only for compatibility with other implementations of t
Gets text that describes a status code sent from the FTP server.
A instance that contains the status code and message returned with this response.
- property includes the 3-digit property value. When downloading data, the value of changes as status codes are returned by the FTP server. After you call the method, contains an intermediate status code. When you call the method, contains the final status.
-
-
-
-## Examples
- The following code example sends a request to delete a file on an FTP server and displays the status message from the server's response to the request.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet4":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet4":::
-
+ property includes the 3-digit property value. When downloading data, the value of changes as status codes are returned by the FTP server. After you call the method, contains an intermediate status code. When you call the method, contains the final status.
+
+
+
+## Examples
+ The following code example sends a request to delete a file on an FTP server and displays the status message from the server's response to the request.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet4":::
+
]]>
@@ -795,15 +785,15 @@ This property is provided only for compatibility with other implementations of t
Gets a value that indicates whether the property is supported by the instance.
- Returns .
-
+ Returns .
+
if the property is supported by the instance; otherwise, .
-
@@ -853,19 +843,18 @@ This property is provided only for compatibility with other implementations of t
Gets the message sent by the FTP server when authentication is complete.
A that contains the welcome message sent by the server; otherwise, if no message is sent.
- property is set to `true`), the property returns the first welcome message received with the connection.
-
-
-
-## Examples
- The following code example displays the value of this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp" id="Snippet13":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet13":::
-
+ property is set to `true`), the property returns the first welcome message received with the connection.
+
+
+
+## Examples
+ The following code example displays the value of this property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/FtpStatusCode/Overview/ftptests.cs" id="Snippet13":::
+
]]>
diff --git a/xml/System.Net/GlobalProxySelection.xml b/xml/System.Net/GlobalProxySelection.xml
index 86c7382795c..9686a326319 100644
--- a/xml/System.Net/GlobalProxySelection.xml
+++ b/xml/System.Net/GlobalProxySelection.xml
@@ -62,24 +62,23 @@
Contains a global default proxy instance for all HTTP requests.
- stores the proxy settings for the default proxy that instances use to contact Internet sites beyond the local network. The default proxy setting is initialized from the global or application configuration file, and can be overridden for individual requests or disabled by setting the property to the result of the method.
-
- The proxy settings stored in are used by any derived objects that support proxies and have their property value set to `null` (the default). Proxies are currently supported by , , and .
-
- **Note** Changes to the after a request is made are not reflected in a .
-
-
-
-## Examples
- The following code example sets the for an HTTP proxy named "webproxy" on port 80.
+ stores the proxy settings for the default proxy that instances use to contact Internet sites beyond the local network. The default proxy setting is initialized from the global or application configuration file, and can be overridden for individual requests or disabled by setting the property to the result of the method.
+
+ The proxy settings stored in are used by any derived objects that support proxies and have their property value set to `null` (the default). Proxies are currently supported by , , and .
+
+ **Note** Changes to the after a request is made are not reflected in a .
+
+
+
+## Examples
+ The following code example sets the for an HTTP proxy named "webproxy" on port 80.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic GlobalProxySelection Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/GlobalProxySelection/Overview/source.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic GlobalProxySelection Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic GlobalProxySelection Example/VB/source.vb" id="Snippet1":::
+
]]>
DefaultProxy Element (Network Settings)
@@ -168,20 +167,19 @@
Returns an empty proxy instance.
An that contains no information.
- method returns a blank instance to indicate that no proxy is used to access an Internet resource.
+ method returns a blank instance to indicate that no proxy is used to access an Internet resource.
+
+Instead of calling the `GetEmptyWebProxy` method, you can assign `null` to members such as the property, which specifies the proxy that communicates with remote servers on behalf of the object.
+
+## Examples
+ The following code example creates a instance that does not use a proxy.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/GlobalProxySelection/GetEmptyWebProxy/test.cs" id="Snippet1":::
-Instead of calling the `GetEmptyWebProxy` method, you can assign `null` to members such as the property, which specifies the proxy that communicates with remote servers on behalf of the object.
-
-## Examples
- The following code example creates a instance that does not use a proxy.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLEmptyWebProxy/CPP/test.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/GlobalProxySelection/GetEmptyWebProxy/test.cs" id="Snippet1":::
-
]]>
@@ -225,19 +223,18 @@ Instead of calling the `GetEmptyWebProxy` method, you can assign `null` to membe
Gets or sets the global HTTP proxy.
An that every call to uses.
- property sets the proxy that all instances use if the request supports proxies and no proxy is set explicitly using the property. Proxies are currently supported by and .
-
-
-
-## Examples
- The following code example sets the property to the empty proxy.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLEmptyWebProxy/CPP/test.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/GlobalProxySelection/GetEmptyWebProxy/test.cs" id="Snippet1":::
-
+ property sets the proxy that all instances use if the request supports proxies and no proxy is set explicitly using the property. Proxies are currently supported by and .
+
+
+
+## Examples
+ The following code example sets the property to the empty proxy.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/GlobalProxySelection/GetEmptyWebProxy/test.cs" id="Snippet1":::
+
]]>
The value specified for a set operation was .
diff --git a/xml/System.Net/HttpVersion.xml b/xml/System.Net/HttpVersion.xml
index 0d31dea4fa8..f3c597d5064 100644
--- a/xml/System.Net/HttpVersion.xml
+++ b/xml/System.Net/HttpVersion.xml
@@ -53,20 +53,19 @@
Defines the HTTP version numbers that are supported by the and classes.
- class defines the HTTP versions that are supported by the class. The HTTP version number is used to control version-specific features of HTTP, such as pipelining and chunking.
+
+
+
+## Examples
+ The following example demonstrates the use of .
-
-
-## Examples
- The following example demonstrates the use of .
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpVersion_Version10/CPP/httpversion_version10.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpVersion/Overview/httpversion_version10.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpVersion_Version10/VB/httpversion_version10.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpVersion_Version10/VB/httpversion_version10.vb" id="Snippet1":::
+
]]>
diff --git a/xml/System.Net/HttpWebRequest.xml b/xml/System.Net/HttpWebRequest.xml
index 3d0fc1304af..e4f17446cee 100644
--- a/xml/System.Net/HttpWebRequest.xml
+++ b/xml/System.Net/HttpWebRequest.xml
@@ -119,16 +119,11 @@
> [!NOTE]
> For security reasons, cookies are disabled by default. If you want to use cookies, use the property to enable cookies.
- The .NET Framework 4.6 includes a new security feature that blocks insecure cipher and hashing algorithms for connections. Applications using TLS/SSL through APIs such as HttpClient, HttpWebRequest, FTPClient, SmtpClient, SslStream, etc. and targeting .NET Framework 4.6 get the more-secure behavior by default.
-
- Developers may want to opt out of this behavior in order to maintain interoperability with their existing SSL3 services OR TLS w/ RC4 services. [This article](https://support.microsoft.com/kb/3069494) explains how to modify your code so that the new behavior is disabled.
-
-
+For apps that use TLS/SSL through APIs such as HttpClient, HttpWebRequest, FTPClient, SmtpClient, and SsStream, .NET blocks insecure cipher and hashing algorithms for connections by default. You might need to opt out of this behavior to maintain interoperability with existing SSL3 services OR TLS w/ RC4 services. [Cannot connect to a server by using the ServicePointManager or SslStream APIs after upgrade to the .NET Framework 4.6](https://support.microsoft.com/kb/3069494) explains how to modify your code to disable this behavior, if necessary.
## Examples
The following code example creates an for the URI `http://www.contoso.com/`.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic HttpWebRequest Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/Overview/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic HttpWebRequest Example/VB/source.vb" id="Snippet1":::
@@ -416,7 +411,6 @@ Both constructors are obsolete and should not b
## Examples
The following code example sets the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_Accept/CPP/httpwebrequest_accept.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/Accept/httpwebrequest_accept.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebRequest_Accept/VB/httpwebrequest_accept.vb" id="Snippet1":::
@@ -528,7 +522,6 @@ Both constructors are obsolete and should not b
## Examples
The following code example adds a range header to the request.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Misc/system.net.httpwebrequest.addrange/cpp/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/AddRange/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Misc/system.net.httpwebrequest.addrange/vb/source.vb" id="Snippet1":::
@@ -707,7 +700,6 @@ Both constructors are obsolete and should not b
## Examples
The following code example adds a range header to the request.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Misc/system.net.httpwebrequest.addrange2/cpp/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/AddRange/source1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Misc/system.net.httpwebrequest.addrange2/vb/source.vb" id="Snippet1":::
@@ -1253,7 +1245,6 @@ Both constructors are obsolete and should not b
## Examples
The following code example checks to see if the object `req` was redirected to another location to fulfill the request, and sets the value of the `hasChanged` variable to `true` if the request was redirected; otherwise `hasChanged` is set to `false`.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic HttpWebRequest.RequestUri Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/Address/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic HttpWebRequest.RequestUri Example/VB/source.vb" id="Snippet1":::
@@ -1324,7 +1315,6 @@ Both constructors are obsolete and should not b
## Examples
The following code example uses the property to allow the request to follow redirection responses.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_AllowAutoRedirect/CPP/httpwebrequest_allowautoredirect.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/AllowAutoRedirect/httpwebrequest_allowautoredirect.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebRequest_AllowAutoRedirect/VB/httpwebrequest_allowautoredirect.vb" id="Snippet2":::
@@ -1433,7 +1423,6 @@ Both constructors are obsolete and should not b
## Examples
The following code example uses the property to disable data buffering.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_AllowWriteStreamBuffering/CPP/httpwebrequest_allowwritestreambuffering.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/AllowWriteStreamBuffering/httpwebrequest_allowwritestreambuffering.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebRequest_AllowWriteStreamBuffering/VB/httpwebrequest_allowwritestreambuffering.vb" id="Snippet1":::
@@ -1567,7 +1556,6 @@ Both constructors are obsolete and should not b
## Examples
The following code example uses the method to make an asynchronous request for a stream instance.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_BeginGetRequestStream/CPP/httpwebrequest_begingetrequeststream.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/BeginGetRequestStream/httpwebrequest_begingetrequeststream.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebRequest_BeginGetRequestStream/VB/httpwebrequest_begingetrequeststream.vb" id="Snippet2":::
@@ -1842,7 +1830,6 @@ Both constructors are obsolete and should not b
## Examples
The following code example uses the property to set the value of the Connection HTTP Header.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_Connection/CPP/httpwebrequest_connection.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/Connection/httpwebrequest_connection.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebRequest_Connection/VB/httpwebrequest_connection.vb" id="Snippet1":::
@@ -1990,7 +1977,6 @@ Both constructors are obsolete and should not b
## Examples
The following code example sets the property to the length of the string being posted.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_ContentLength/CPP/httpwebrequest_contentlength.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ContentLength/httpwebrequest_contentlength.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebRequest_ContentLength/VB/httpwebrequest_contentlength.vb" id="Snippet4":::
@@ -2068,7 +2054,6 @@ Both constructors are obsolete and should not b
## Examples
The following code example sets the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_ContentLength/CPP/httpwebrequest_contentlength.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ContentLength/httpwebrequest_contentlength.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebRequest_ContentLength/VB/httpwebrequest_contentlength.vb" id="Snippet1":::
@@ -2272,7 +2257,6 @@ Both constructors are obsolete and should not b
## Examples
The following code example sends a request to a URL and displays the cookies returned in the response.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/Cookie/Overview/cookiessnippets.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb" id="Snippet1":::
@@ -2359,7 +2343,6 @@ Both constructors are obsolete and should not b
## Examples
The following code example sets the credentials for a request.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLResponse1/CPP/httpwebrequest1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/Credentials/httpwebrequest1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLResponse1/VB/httpwebrequest1.vb" id="Snippet1":::
@@ -2685,7 +2668,6 @@ Both constructors are obsolete and should not b
## Examples
The following code example uses the method to end an asynchronous request for a stream instance.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_BeginGetRequestStream/CPP/httpwebrequest_begingetrequeststream.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/BeginGetRequestStream/httpwebrequest_begingetrequeststream.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebRequest_BeginGetRequestStream/VB/httpwebrequest_begingetrequeststream.vb" id="Snippet2":::
@@ -3119,7 +3101,6 @@ The GetHashCode method returns a hash code of the web request. This value can be
## Examples
The following code example uses the method to return a stream instance.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_ContentLength/CPP/httpwebrequest_contentlength.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ContentLength/httpwebrequest_contentlength.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebRequest_ContentLength/VB/httpwebrequest_contentlength.vb" id="Snippet4":::
@@ -3332,7 +3313,6 @@ The GetHashCode method returns a hash code of the web request. This value can be
## Examples
The following code example gets the response for a request.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLResponse1/CPP/httpwebrequest1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/Credentials/httpwebrequest1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLResponse1/VB/httpwebrequest1.vb" id="Snippet1":::
@@ -3424,7 +3404,6 @@ The GetHashCode method returns a hash code of the web request. This value can be
## Examples
The following code example checks the property to determine if a response has been received from an Internet resource.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Httpwebrequest_HaveResponse/CPP/httpwebrequest_haveresponse.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/HaveResponse/httpwebrequest_haveresponse.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Httpwebrequest_HaveResponse/VB/httpwebrequest_haveresponse.vb" id="Snippet1":::
@@ -3519,7 +3498,6 @@ The GetHashCode method returns a hash code of the web request. This value can be
## Examples
The following code example uses the property to print the HTTP header name/value pairs to the console.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_Headers/CPP/httpwebrequest_headers.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/Headers/httpwebrequest_headers.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebRequest_Headers/VB/httpwebrequest_headers.vb" id="Snippet1":::
@@ -3675,7 +3653,6 @@ The GetHashCode method returns a hash code of the web request. This value can be
## Examples
The following code example checks the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_IfModifiedSince/CPP/httpwebrequest_ifmodifiedsince.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/IfModifiedSince/httpwebrequest_ifmodifiedsince.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebRequest_IfModifiedSince/VB/httpwebrequest_ifmodifiedsince.vb" id="Snippet1":::
@@ -3752,7 +3729,6 @@ The GetHashCode method returns a hash code of the web request. This value can be
## Examples
The following code example sets the property to `false` to avoid establishing a persistent connection with the Internet resource.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_Connection/CPP/httpwebrequest_connection.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/Connection/httpwebrequest_connection.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebRequest_Connection/VB/httpwebrequest_connection.vb" id="Snippet1":::
@@ -3821,7 +3797,6 @@ The GetHashCode method returns a hash code of the web request. This value can be
## Examples
The following code example sets the value of this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLResponse1/CPP/httpwebrequest1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/Credentials/httpwebrequest1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLResponse1/VB/httpwebrequest1.vb" id="Snippet1":::
@@ -3895,7 +3870,6 @@ The GetHashCode method returns a hash code of the web request. This value can be
## Examples
The following code example sets the value of this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLResponse1/CPP/httpwebrequest1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/Credentials/httpwebrequest1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLResponse1/VB/httpwebrequest1.vb" id="Snippet1":::
@@ -4034,7 +4008,6 @@ The GetHashCode method returns a hash code of the web request. This value can be
## Examples
The following code example sets the property to POST.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_ContentLength/CPP/httpwebrequest_contentlength.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ContentLength/httpwebrequest_contentlength.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebRequest_ContentLength/VB/httpwebrequest_contentlength.vb" id="Snippet4":::
@@ -4115,7 +4088,6 @@ The GetHashCode method returns a hash code of the web request. This value can be
## Examples
The following code example prints the value of the property to the console.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_PipeLined/CPP/httpwebrequest_pipelined.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/Pipelined/httpwebrequest_pipelined.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebRequest_PipeLined/VB/httpwebrequest_pipelined.vb" id="Snippet1":::
@@ -4312,7 +4284,6 @@ The GetHashCode method returns a hash code of the web request. This value can be
## Examples
The following code example sets the Property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_ProtocolVersion/CPP/httpwebrequest_protocolversion.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ProtocolVersion/httpwebrequest_protocolversion.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebRequest_ProtocolVersion/VB/httpwebrequest_protocolversion.vb" id="Snippet1":::
@@ -4389,7 +4360,6 @@ The GetHashCode method returns a hash code of the web request. This value can be
## Examples
The following code example uses the method to get the proxy information for the request.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Httpwebrequest_proxy/CPP/httpwebrequest_proxy.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/Proxy/httpwebrequest_proxy.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Httpwebrequest_proxy/VB/httpwebrequest_proxy.vb" id="Snippet1":::
@@ -4544,7 +4514,6 @@ The GetHashCode method returns a hash code of the web request. This value can be
## Examples
The following code example sets the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_Referer/CPP/httpwebrequest_referer.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/Referer/httpwebrequest_referer.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebRequest_Referer/VB/httpwebrequest_referer.vb" id="Snippet1":::
@@ -4620,7 +4589,6 @@ The GetHashCode method returns a hash code of the web request. This value can be
## Examples
The following code example checks to see if the object `req` was redirected to another location to fulfill the request, and sets the value of the `hasChanged` variable to `true` if the request was redirected; otherwise, `hasChanged` is set to `false`.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic HttpWebRequest.RequestUri Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/Address/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic HttpWebRequest.RequestUri Example/VB/source.vb" id="Snippet1":::
@@ -4686,7 +4654,6 @@ The GetHashCode method returns a hash code of the web request. This value can be
## Examples
The following code example sets the property to `true` so that data can be sent in segments to the Internet resource.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_SendChunked/CPP/httpwebrequest_sendchunked.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/SendChunked/httpwebrequest_sendchunked.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebRequest_SendChunked/VB/httpwebrequest_sendchunked.vb" id="Snippet2":::
@@ -4811,7 +4778,6 @@ The GetHashCode method returns a hash code of the web request. This value can be
## Examples
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet6":::
@@ -5010,7 +4976,6 @@ The GetHashCode method returns a hash code of the web request. This value can be
## Examples
The following code example sets the property of the object.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_Timeout/CPP/httpwebrequest_timeout.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/Timeout/httpwebrequest_timeout.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebRequest_Timeout/VB/httpwebrequest_timeout.vb" id="Snippet1":::
@@ -5273,7 +5238,6 @@ The value for this property is stored in .
## Examples
The following code example sets the property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_UserAgent/CPP/httpwebrequest_useragent.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/UserAgent/httpwebrequest_useragent.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebRequest_UserAgent/VB/httpwebrequest_useragent.vb" id="Snippet1":::
diff --git a/xml/System.Net/HttpWebResponse.xml b/xml/System.Net/HttpWebResponse.xml
index 994d3e52340..2f540a64cdb 100644
--- a/xml/System.Net/HttpWebResponse.xml
+++ b/xml/System.Net/HttpWebResponse.xml
@@ -108,7 +108,6 @@ The contents of the response from the Internet resource are returned as a from an .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic HttpWebResponse Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebResponse/Overview/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic HttpWebResponse Example/VB/source.vb" id="Snippet1":::
@@ -316,7 +315,6 @@ The contents of the response from the Internet resource are returned as a .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_Close/CPP/httpwebresponse_close.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebResponse/Close/httpwebresponse_close.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_Close/VB/httpwebresponse_close.vb" id="Snippet1":::
@@ -445,7 +442,6 @@ The contents of the response from the Internet resource are returned as a property to obtain the value of the Content-Encoding header returned with the response.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_ContentEncoding_CharacterSet/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebResponse/CharacterSet/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_ContentEncoding_CharacterSet/VB/source.vb" id="Snippet1":::
@@ -507,7 +503,6 @@ The contents of the response from the Internet resource are returned as a .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_GetResponseHeader/CPP/httpwebresponse_getresponseheader.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebResponse/GetResponseHeader/httpwebresponse_getresponseheader.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_GetResponseHeader/VB/httpwebresponse_getresponseheader.vb" id="Snippet1":::
@@ -953,7 +945,6 @@ The GetHashCode method returns a hash code of the web response instance. This va
## Examples
The following example demonstrates how to use to return the instance used to read the response from the server.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_GetResponseStream/CPP/httpwebresponse_getresponsestream.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebResponse/GetResponseStream/httpwebresponse_getresponsestream.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_GetResponseStream/VB/httpwebresponse_getresponsestream.vb" id="Snippet1":::
@@ -1024,7 +1015,6 @@ The GetHashCode method returns a hash code of the web response instance. This va
## Examples
The following example writes the contents of all of the response headers to the console.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_Headers/CPP/httpwebresponse_headers.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebResponse/Headers/httpwebresponse_headers.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_Headers/VB/httpwebresponse_headers.vb" id="Snippet1":::
@@ -1137,7 +1127,6 @@ The GetHashCode method returns a hash code of the web response instance. This va
## Examples
This example creates an and queries for a response. This example then checks whether the entity requested had been modified any time today.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_LastModified/CPP/httpwebresponse_lastmodified.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebResponse/LastModified/httpwebresponse_lastmodified.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_LastModified/VB/httpwebresponse_lastmodified.vb" id="Snippet1":::
@@ -1202,7 +1191,6 @@ The GetHashCode method returns a hash code of the web response instance. This va
## Examples
The following example checks the string contained in , to determine the Http method invoked by the Web server.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_Method_Server/CPP/httpwebresponse_method_server.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebResponse/Method/httpwebresponse_method_server.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_Method_Server/VB/httpwebresponse_method_server.vb" id="Snippet1":::
@@ -1263,7 +1251,6 @@ The GetHashCode method returns a hash code of the web response instance. This va
## Examples
This example creates an and queries for an . The example then checks to see if the server is responding with the same version.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_ProtocolVersion/CPP/httpwebresponse_protocolversion.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebResponse/ProtocolVersion/httpwebresponse_protocolversion.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_ProtocolVersion/VB/httpwebresponse_protocolversion.vb" id="Snippet1":::
@@ -1329,7 +1316,6 @@ The GetHashCode method returns a hash code of the web response instance. This va
## Examples
This example creates a and queries for an and then checks to see whether the original URI was redirected by the server.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_ResponseUri/CPP/httpwebresponse_responseuri.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebResponse/ResponseUri/httpwebresponse_responseuri.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_ResponseUri/VB/httpwebresponse_responseuri.vb" id="Snippet1":::
@@ -1390,7 +1376,6 @@ The GetHashCode method returns a hash code of the web response instance. This va
## Examples
The following example uses the property to display the Web server's name to the console.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_Method_Server/CPP/httpwebresponse_method_server.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebResponse/Method/httpwebresponse_method_server.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_Method_Server/VB/httpwebresponse_method_server.vb" id="Snippet2":::
@@ -1455,7 +1440,6 @@ The GetHashCode method returns a hash code of the web response instance. This va
## Examples
The following example uses to verify that the status of the is OK.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_StatusCode_StatusDescription/CPP/httpwebresponse_statuscode_statusdescription.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebResponse/StatusCode/httpwebresponse_statuscode_statusdescription.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_StatusCode_StatusDescription/VB/httpwebresponse_statuscode_statusdescription.vb" id="Snippet1":::
@@ -1520,7 +1504,6 @@ The GetHashCode method returns a hash code of the web response instance. This va
## Examples
The following example uses to verify that the status of the is OK.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_StatusCode_StatusDescription/CPP/httpwebresponse_statuscode_statusdescription.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebResponse/StatusCode/httpwebresponse_statuscode_statusdescription.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_StatusCode_StatusDescription/VB/httpwebresponse_statuscode_statusdescription.vb" id="Snippet2":::
diff --git a/xml/System.Net/IAuthenticationModule.xml b/xml/System.Net/IAuthenticationModule.xml
index a40f693b940..f270ff9c46c 100644
--- a/xml/System.Net/IAuthenticationModule.xml
+++ b/xml/System.Net/IAuthenticationModule.xml
@@ -42,24 +42,23 @@
Provides the base authentication interface for Web client authentication modules.
- interface defines the properties and methods that custom authentication modules must use.
+
+ Authentication modules conduct the entire authentication process with a server, responding to an authentication challenge as appropriate. This process may consist of requests to an authentication server separate from the resource server, as well as any other activities required to properly authenticate a request for a URI.
+
+ Custom authentication modules should implement the interface and then register with the method. Authentication modules are also registered at program initialization by reading the configuration file.
+
+
+
+## Examples
+ The following example creates a customized authentication class by implementing the interface. For a complete example refer to the class.
-## Remarks
- The interface defines the properties and methods that custom authentication modules must use.
-
- Authentication modules conduct the entire authentication process with a server, responding to an authentication challenge as appropriate. This process may consist of requests to an authentication server separate from the resource server, as well as any other activities required to properly authenticate a request for a URI.
-
- Custom authentication modules should implement the interface and then register with the method. Authentication modules are also registered at program initialization by reading the configuration file.
-
-
-
-## Examples
- The following example creates a customized authentication class by implementing the interface. For a complete example refer to the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Authentication/CPP/custombasicauthentication.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Net/AuthenticationManager/Overview/custombasicauthentication.cs" id="Snippet6":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet6":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet6":::
+
]]>
@@ -119,20 +118,19 @@
Returns an instance of the class in response to an authentication challenge from a server.
An instance containing the authorization message for the request, or if the challenge cannot be handled.
- method conducts the authentication process with the server and returns an instance to the .
-
-
-
-## Examples
- The following example shows how to use the method. For a complete example refer to the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Authentication/CPP/custombasicauthentication.cpp" id="Snippet3":::
+ method conducts the authentication process with the server and returns an instance to the .
+
+
+
+## Examples
+ The following example shows how to use the method. For a complete example refer to the class.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/AuthenticationManager/Overview/custombasicauthentication.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet3":::
+
]]>
@@ -179,20 +177,19 @@
Gets the authentication type provided by this authentication module.
A string indicating the authentication type provided by this authentication module.
- property identifies the authentication type implemented by this authentication module. The property is used by the method to determine if the authentication module has been registered, and by the method to remove a registered authentication module.
-
-
-
-## Examples
- The following example shows how to use the property. For a complete example refer to the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Authentication/CPP/custombasicauthentication.cpp" id="Snippet7":::
+ property identifies the authentication type implemented by this authentication module. The property is used by the method to determine if the authentication module has been registered, and by the method to remove a registered authentication module.
+
+
+
+## Examples
+ The following example shows how to use the property. For a complete example refer to the class.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/AuthenticationManager/Overview/custombasicauthentication.cs" id="Snippet7":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet7":::
+
]]>
@@ -237,20 +234,19 @@
if the authorization module supports preauthentication; otherwise .
- property is set to `true` to indicate that the authentication module can respond with a valid instance when the method is called.
-
-
-
-## Examples
- The following example shows how to use the property. For a complete example refer to the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Authentication/CPP/custombasicauthentication.cpp" id="Snippet7":::
+ property is set to `true` to indicate that the authentication module can respond with a valid instance when the method is called.
+
+
+
+## Examples
+ The following example shows how to use the property. For a complete example refer to the class.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/AuthenticationManager/Overview/custombasicauthentication.cs" id="Snippet7":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet7":::
+
]]>
@@ -310,20 +306,19 @@
Returns an instance of the class for an authentication request to a server.
An instance containing the authorization message for the request.
- property is `true`, the method will return an instance of the class containing an authentication message.
-
-
-
-## Examples
- The following example shows how to use the method. For a complete example refer to the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.Authentication/CPP/custombasicauthentication.cpp" id="Snippet4":::
+ property is `true`, the method will return an instance of the class containing an authentication message.
+
+
+
+## Examples
+ The following example shows how to use the method. For a complete example refer to the class.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/AuthenticationManager/Overview/custombasicauthentication.cs" id="Snippet4":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.Authentication/VB/custombasicauthentication.vb" id="Snippet4":::
+
]]>
diff --git a/xml/System.Net/ICredentialPolicy.xml b/xml/System.Net/ICredentialPolicy.xml
index 79944b1165c..17df9281f23 100644
--- a/xml/System.Net/ICredentialPolicy.xml
+++ b/xml/System.Net/ICredentialPolicy.xml
@@ -41,26 +41,25 @@
Defines the credential policy to be used for resource requests that are made using and its derived classes.
- for a network resource, such as the content of a Web page. If credentials are sent, servers that require client authentication can attempt to authenticate the client when the request is received instead of sending a response that indicates that the client's credentials are required. While this saves a round trip to the server, this performance gain must be balanced against the security risk inherent in sending credentials across the network. When the destination server does not require client authentication, it is best not to send credentials.
-
+ for a network resource, such as the content of a Web page. If credentials are sent, servers that require client authentication can attempt to authenticate the client when the request is received instead of sending a response that indicates that the client's credentials are required. While this saves a round trip to the server, this performance gain must be balanced against the security risk inherent in sending credentials across the network. When the destination server does not require client authentication, it is best not to send credentials.
+
> [!NOTE]
-> policies are invoked only if the or the that is associated with the request has credentials that are not `null`. Setting this policy has no effect on requests that do not specify credentials.
-
- Use the property to set an policy. The that handles authentication for the request will invoke the method before performing the authentication. If the method returns `false`, authentication is not performed.
-
- An policy affects all instances of with non-null credentials in the current application domain. The policy cannot be overridden on individual requests.
-
-
-
-## Examples
- The following code example shows an implementation of this interface that permits credentials to be sent only for requests that target specific hosts.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCredPolicy/CPP/NCLCredPolicy.cpp" id="Snippet3":::
- :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/IntranetZoneCredentialPolicy/Overview/websample.cs" id="Snippet3":::
+> policies are invoked only if the or the that is associated with the request has credentials that are not `null`. Setting this policy has no effect on requests that do not specify credentials.
+
+ Use the property to set an policy. The that handles authentication for the request will invoke the method before performing the authentication. If the method returns `false`, authentication is not performed.
+
+ An policy affects all instances of with non-null credentials in the current application domain. The policy cannot be overridden on individual requests.
+
+
+
+## Examples
+ The following code example shows an implementation of this interface that permits credentials to be sent only for requests that target specific hosts.
+ :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/IntranetZoneCredentialPolicy/Overview/websample.cs" id="Snippet3":::
+
]]>
@@ -114,13 +113,13 @@
if the credentials are sent with the request; otherwise, .
- policy has been specified by setting the property, the that handles authentication for a invokes the method before performing the authentication. If this method returns `false`, authentication is not performed.
-
- When the original request has been redirected or proxy authentication is required, the resource identified by `challengeUri` can be different from the requested resource that is specified in . In the case of redirection, `challengeUri` contains the actual destination . If proxy authentication is required, `challengeUri` contains the address of the proxy server that requires client authentication.
-
+ policy has been specified by setting the property, the that handles authentication for a invokes the method before performing the authentication. If this method returns `false`, authentication is not performed.
+
+ When the original request has been redirected or proxy authentication is required, the resource identified by `challengeUri` can be different from the requested resource that is specified in . In the case of redirection, `challengeUri` contains the actual destination . If proxy authentication is required, `challengeUri` contains the address of the proxy server that requires client authentication.
+
]]>
diff --git a/xml/System.Net/ICredentials.xml b/xml/System.Net/ICredentials.xml
index b71cde3c212..605d0503c79 100644
--- a/xml/System.Net/ICredentials.xml
+++ b/xml/System.Net/ICredentials.xml
@@ -51,20 +51,19 @@
Provides the base authentication interface for retrieving credentials for Web client authentication.
- interface provides the method to objects that supply network credentials to applications.
+
+
+
+## Examples
+ The following example illustrates how to use the interface.
-## Remarks
- The interface provides the method to objects that supply network credentials to applications.
-
-
-
-## Examples
- The following example illustrates how to use the interface.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ICredential/CPP/icredential.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/ICredentials/Overview/icredential.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/ICredential/VB/icredential.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/ICredential/VB/icredential.vb" id="Snippet1":::
+
]]>
@@ -121,20 +120,19 @@
Returns a object that is associated with the specified URI, and authentication type.
The that is associated with the specified URI and authentication type, or, if no credentials are available, .
- method returns a instance that contains the credentials that are associated with the specified URI and authorization scheme. When no credentials are available, the method returns `null`.
-
-
-
-## Examples
- The following uses to retrieve a instance.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ICredential/CPP/icredential.cpp" id="Snippet1":::
+ method returns a instance that contains the credentials that are associated with the specified URI and authorization scheme. When no credentials are available, the method returns `null`.
+
+
+
+## Examples
+ The following uses to retrieve a instance.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/ICredentials/Overview/icredential.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/ICredential/VB/icredential.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/ICredential/VB/icredential.vb" id="Snippet1":::
+
]]>
diff --git a/xml/System.Net/IPAddress.xml b/xml/System.Net/IPAddress.xml
index 08142724731..36197637e39 100644
--- a/xml/System.Net/IPAddress.xml
+++ b/xml/System.Net/IPAddress.xml
@@ -102,7 +102,6 @@
## Examples
The following code example shows how to query a server to obtain the family addresses and the IP addresses it supports.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.IPAddress/CPP/ipaddress.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/IPAddress/Overview/ipaddress.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPAddress/VB/ipaddress.vb" id="Snippet1":::
@@ -538,7 +537,6 @@
## Examples
Refer to the example in the class topic.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.IPAddress/CPP/ipaddress.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/IPAddress/Overview/ipaddress.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPAddress/VB/ipaddress.vb" id="Snippet3":::
@@ -663,7 +661,6 @@
## Examples
The following example prints the address to the console.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IPAddress_Broadcast_Loopback/CPP/ipaddress_broadcast_loopback.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net/IPAddress/Broadcast/ipaddress_broadcast_loopback.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IPAddress_Broadcast_Loopback/VB/ipaddress_broadcast_loopback.vb" id="Snippet2":::
@@ -791,7 +788,6 @@
## Examples
The following code example shows how to get a server IP address in byte format.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.IPAddress/CPP/ipaddress.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net/IPAddress/Overview/ipaddress.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPAddress/VB/ipaddress.vb" id="Snippet2":::
@@ -1097,7 +1093,6 @@
## Examples
The following code example displays the value of the current host's Any address in standard compressed format.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.IPAddress.IPv6NoneAnyLoopback/CPP/noneanyloopback.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net/IPAddress/IPv6Any/noneanyloopback.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPAddress.IPv6NoneAnyLoopback/VB/noneanyloopback.vb" id="Snippet2":::
@@ -1163,7 +1158,6 @@
## Examples
The following code example displays the value of the current host's loopback address in standard compressed format.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.IPAddress.IPv6NoneAnyLoopback/CPP/noneanyloopback.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/IPAddress/IPv6Any/noneanyloopback.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPAddress.IPv6NoneAnyLoopback/VB/noneanyloopback.vb" id="Snippet1":::
@@ -1229,7 +1223,6 @@
## Examples
The following code example displays the value of the current host's None address in standard compressed format.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.IPAddress.IPv6NoneAnyLoopback/CPP/noneanyloopback.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/IPAddress/IPv6Any/noneanyloopback.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPAddress.IPv6NoneAnyLoopback/VB/noneanyloopback.vb" id="Snippet3":::
@@ -1576,7 +1569,6 @@
## Examples
The following code example uses the method to determine whether the specified address is a loopback address.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.IPAddress.IsLoopback/CPP/isloopback.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/IPAddress/IsLoopback/isloopback.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPAddress.IsLoopback/VB/isloopback.vb" id="Snippet1":::
@@ -1710,7 +1702,6 @@
## Examples
The following example prints the address to the console.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IPAddress_Broadcast_Loopback/CPP/ipaddress_broadcast_loopback.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/IPAddress/Broadcast/ipaddress_broadcast_loopback.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IPAddress_Broadcast_Loopback/VB/ipaddress_broadcast_loopback.vb" id="Snippet1":::
@@ -1901,7 +1892,6 @@
## Examples
The following example uses the method to convert a short value from network byte order to host byte order.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IPAddress_NetworkToHost/CPP/ipaddress_networktohost.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/IPAddress/NetworkToHostOrder/ipaddress_networktohost.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IPAddress_NetworkToHost/VB/ipaddress_networktohost.vb" id="Snippet1":::
@@ -1975,7 +1965,6 @@
## Examples
The following example uses the method to convert an integer value from network byte order to host byte order.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IPAddress_NetworkToHost/CPP/ipaddress_networktohost.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net/IPAddress/NetworkToHostOrder/ipaddress_networktohost.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IPAddress_NetworkToHost/VB/ipaddress_networktohost.vb" id="Snippet2":::
@@ -2049,7 +2038,6 @@
## Examples
The following example uses the method to convert a long value from network byte order to host byte order.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IPAddress_NetworkToHost/CPP/ipaddress_networktohost.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/IPAddress/NetworkToHostOrder/ipaddress_networktohost.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IPAddress_NetworkToHost/VB/ipaddress_networktohost.vb" id="Snippet3":::
@@ -2116,7 +2104,6 @@
## Examples
The following example uses the property to indicate that no network interface should be used.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IPAddress_None/CPP/ipaddress_none.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/IPAddress/None/ipaddress_none.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IPAddress_None/VB/ipaddress_none.vb" id="Snippet1":::
@@ -2237,7 +2224,6 @@
## Examples
The following code converts a string that contains an IP address, in dotted-quad notation for IPv4 or in colon-hexadecimal notation for IPv6, into an instance of the class. Then it uses the overloaded method to display the address in standard notation.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.IPAddress.Parse/CPP/parse.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/IPAddress/Parse/parse.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPAddress.Parse/VB/parse.vb" id="Snippet1":::
@@ -2367,7 +2353,6 @@
The notation that is used to specify the `ScopeId` with an address is `Address%ScopeId`. For example, `FE80::5EFE:192.168.41.30%2.`
## Examples
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.IPAddress/CPP/ipaddress.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/IPAddress/Overview/ipaddress.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPAddress/VB/ipaddress.vb" id="Snippet3":::
diff --git a/xml/System.Net/IPEndPoint.xml b/xml/System.Net/IPEndPoint.xml
index affb87e4f9a..9abed0a45f2 100644
--- a/xml/System.Net/IPEndPoint.xml
+++ b/xml/System.Net/IPEndPoint.xml
@@ -60,18 +60,17 @@
Represents a network endpoint as an IP address and a port number.
- class contains the host and local or remote port information needed by an application to connect to a service on a host. By combining the host's IP address and port number of a service, the class forms a connection point to a service.
-
-
-
+ class contains the host and local or remote port information needed by an application to connect to a service on a host. By combining the host's IP address and port number of a service, the class forms a connection point to a service.
+
+
+
## Examples
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.IPEndPoint/CPP/ipendpoint.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/IPEndPoint/Overview/ipendpoint.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb" id="Snippet1":::
+
]]>
@@ -131,26 +130,25 @@
The port number associated with the , or 0 to specify any available port. is in host order.
Initializes a new instance of the class with the specified address and port number.
- .
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IPEndPoint_Properties/CPP/ipendpoint_properties.cpp" id="Snippet4":::
+ .
+
:::code language="csharp" source="~/snippets/csharp/System.Net/IPEndPoint/.ctor/ipendpoint_properties.cs" id="Snippet4":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IPEndPoint_Properties/VB/ipendpoint_properties.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IPEndPoint_Properties/VB/ipendpoint_properties.vb" id="Snippet4":::
+
]]>
- is less than .
-
- -or-
-
- is greater than .
-
- -or-
-
+ is less than .
+
+ -or-
+
+ is greater than .
+
+ -or-
+
is less than 0 or greater than 0x00000000FFFFFFFF.
@@ -199,22 +197,21 @@
The port number associated with the , or 0 to specify any available port. is in host order.
Initializes a new instance of the class with the specified address and port number.
-
is .
- is less than .
-
- -or-
-
+ is less than .
+
+ -or-
+
is greater than .
@@ -271,15 +268,14 @@
Gets or sets the IP address of the endpoint.
An instance containing the IP address of the endpoint.
- property using the specified.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.IPEndPoint/CPP/ipendpoint.cpp" id="Snippet3":::
+ property using the specified.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/IPEndPoint/Overview/ipendpoint.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb" id="Snippet3":::
+
]]>
@@ -327,15 +323,14 @@
Gets the Internet Protocol (IP) address family.
Returns .
- property to return the to which the belongs. In this case it is the .
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.IPEndPoint/CPP/ipendpoint.cpp" id="Snippet3":::
+ property to return the to which the belongs. In this case it is the .
+
:::code language="csharp" source="~/snippets/csharp/System.Net/IPEndPoint/Overview/ipendpoint.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb" id="Snippet3":::
+
]]>
@@ -388,21 +383,20 @@
Creates an endpoint from a socket address.
An instance using the specified socket address.
- to create an .
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.IPEndPoint/CPP/ipendpoint.cpp" id="Snippet5":::
+ to create an .
+
:::code language="csharp" source="~/snippets/csharp/System.Net/IPEndPoint/Overview/ipendpoint.cs" id="Snippet5":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb" id="Snippet5":::
+
]]>
- The AddressFamily of is not equal to the AddressFamily of the current instance.
-
- -or-
-
+ The AddressFamily of is not equal to the AddressFamily of the current instance.
+
+ -or-
+
.Size < 8.
@@ -511,11 +505,11 @@
Returns a hash value for a instance.
An integer hash value.
- method returns a hash code of the IP endpoint instance. This value can be used as a key in hash tables.
-
+ method returns a hash code of the IP endpoint instance. This value can be used as a key in hash tables.
+
]]>
@@ -563,15 +557,14 @@
Specifies the maximum value that can be assigned to the property. The MaxPort value is set to 0x0000FFFF. This field is read-only.
- property to print the maximum value that can be assigned to the property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IPEndPoint_Properties/CPP/ipendpoint_properties.cpp" id="Snippet4":::
+ property to print the maximum value that can be assigned to the property.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/IPEndPoint/.ctor/ipendpoint_properties.cs" id="Snippet4":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IPEndPoint_Properties/VB/ipendpoint_properties.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IPEndPoint_Properties/VB/ipendpoint_properties.vb" id="Snippet4":::
+
]]>
@@ -619,15 +612,14 @@
Specifies the minimum value that can be assigned to the property. This field is read-only.
- property to print the minimum value that can be assigned to the property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IPEndPoint_Properties/CPP/ipendpoint_properties.cpp" id="Snippet4":::
+ property to print the minimum value that can be assigned to the property.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/IPEndPoint/.ctor/ipendpoint_properties.cs" id="Snippet4":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IPEndPoint_Properties/VB/ipendpoint_properties.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IPEndPoint_Properties/VB/ipendpoint_properties.vb" id="Snippet4":::
+
]]>
@@ -636,22 +628,22 @@
To be added.
- [!IMPORTANT]
> Note that this method accepts as valid a value that can be parsed as an , and then treats that as the long value of an IP address in network byte order, similar to the way that the IPAddress constructor does. This means that this method returns true if the Int64 is parsed successfully, even if it represents an address that's not a valid IP address. For example, if s is "1", this method returns true even though "1" (or 0.0.0.1) is not a valid IP address and you might expect this method to return false. Fixing this bug would break existing apps, so the current behavior will not be changed. Your code can avoid this behavior by ensuring that it only uses this method to parse IP addresses in dotted-decimal format.
-
+
Literal IPv6 addresses require to be enclosed in square brackets [] when passing an endpoint that specifies a port number; otherwise, square braces are not mandatory.
]]>
@@ -803,15 +795,14 @@ Literal IPv6 addresses require to be enclosed in square brackets [] when passing
Gets or sets the port number of the endpoint.
An integer value in the range to indicating the port number of the endpoint.
- property to set TCP port number of the .
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.IPEndPoint/CPP/ipendpoint.cpp" id="Snippet3":::
+ property to set TCP port number of the .
+
:::code language="csharp" source="~/snippets/csharp/System.Net/IPEndPoint/Overview/ipendpoint.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb" id="Snippet3":::
+
]]>
The value that was specified for a set operation is less than or greater than .
@@ -861,15 +852,14 @@ Literal IPv6 addresses require to be enclosed in square brackets [] when passing
Serializes endpoint information into a instance.
A instance containing the socket address for the endpoint.
- method to serialize endpoint information into a instance.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.IPEndPoint/CPP/ipendpoint.cpp" id="Snippet4":::
+ method to serialize endpoint information into a instance.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/IPEndPoint/Overview/ipendpoint.cs" id="Snippet4":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb" id="Snippet4":::
+
]]>
@@ -919,15 +909,14 @@ Literal IPv6 addresses require to be enclosed in square brackets [] when passing
Returns the IP address and port number of the specified endpoint.
A string containing the IP address and the port number of the specified endpoint (for example, 192.168.1.2:80).
- .
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.IPEndPoint/CPP/ipendpoint.cpp" id="Snippet3":::
+ .
+
:::code language="csharp" source="~/snippets/csharp/System.Net/IPEndPoint/Overview/ipendpoint.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb" id="Snippet3":::
+
]]>
@@ -936,21 +925,21 @@ Literal IPv6 addresses require to be enclosed in square brackets [] when passing
To be added.
- [!IMPORTANT]
> Note that this method accepts as valid a value that can be parsed as an , and then treats that as the long value of an IP address in network byte order, similar to the way that the IPAddress constructor does. This means that this method returns true if the Int64 is parsed successfully, even if it represents an address that's not a valid IP address. For example, if s is "1", this method returns true even though "1" (or 0.0.0.1) is not a valid IP address and you might expect this method to return false. Fixing this bug would break existing apps, so the current behavior will not be changed. Your code can avoid this behavior by ensuring that it only uses this method to parse IP addresses in dotted-decimal format.
-
+
Literal IPv6 addresses require to be enclosed in square brackets [] when passing an endpoint that specifies a port number; otherwise, square braces are not mandatory.
]]>
diff --git a/xml/System.Net/IPHostEntry.xml b/xml/System.Net/IPHostEntry.xml
index 215694fb6a8..00500ffc1a3 100644
--- a/xml/System.Net/IPHostEntry.xml
+++ b/xml/System.Net/IPHostEntry.xml
@@ -51,22 +51,21 @@
Provides a container class for Internet host address information.
- class associates a Domain Name System (DNS) host name with an array of aliases and an array of matching IP addresses.
+
+ The class is used as a helper class with the class.
+
+
+
+## Examples
+ The following example queries the DNS database for information on the host `www.contoso.com` and returns the information in an instance.
-## Remarks
- The class associates a Domain Name System (DNS) host name with an array of aliases and an array of matching IP addresses.
-
- The class is used as a helper class with the class.
-
-
-
-## Examples
- The following example queries the DNS database for information on the host `www.contoso.com` and returns the information in an instance.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic Dns Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/Dns/Overview/source.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic Dns Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic Dns Example/VB/source.vb" id="Snippet1":::
+
]]>
@@ -166,15 +165,14 @@
Gets or sets a list of IP addresses that are associated with a host.
An array of type that contains IP addresses that resolve to the host names that are contained in the property.
- property to access the IP addresses that are associated with the .
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IPHostEntry_AddressList/CPP/iphostentry_addresslist.cpp" id="Snippet1":::
+ property to access the IP addresses that are associated with the .
+
:::code language="csharp" source="~/snippets/csharp/System.Net/IPHostEntry/AddressList/iphostentry_addresslist.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IPHostEntry_AddressList/VB/iphostentry_addresslist.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IPHostEntry_AddressList/VB/iphostentry_addresslist.vb" id="Snippet1":::
+
]]>
@@ -281,20 +279,19 @@
Gets or sets the DNS name of the host.
A string that contains the primary host name for the server.
- property contains the primary host name for a server. If the DNS entry for the server defines additional aliases, they will be available in the property.
-
-
-
-## Examples
- The following example uses the property to retrieve the primary host name.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IPHostEntry_AddressList/CPP/iphostentry_addresslist.cpp" id="Snippet1":::
+ property contains the primary host name for a server. If the DNS entry for the server defines additional aliases, they will be available in the property.
+
+
+
+## Examples
+ The following example uses the property to retrieve the primary host name.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/IPHostEntry/AddressList/iphostentry_addresslist.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IPHostEntry_AddressList/VB/iphostentry_addresslist.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IPHostEntry_AddressList/VB/iphostentry_addresslist.vb" id="Snippet1":::
+
]]>
diff --git a/xml/System.Net/IWebProxy.xml b/xml/System.Net/IWebProxy.xml
index 76feba4c582..9d5a29167f7 100644
--- a/xml/System.Net/IWebProxy.xml
+++ b/xml/System.Net/IWebProxy.xml
@@ -45,13 +45,13 @@
Provides the base interface for implementation of proxy access for the class.
- interface provides the methods and properties that are required by the class to access proxy servers.
-
- The class is the base implementation of the interface.
-
+
+ The class is the base implementation of the interface.
+
]]>
@@ -101,20 +101,19 @@
The credentials to submit to the proxy server for authentication.
An instance that contains the credentials that are needed to authenticate a request to the proxy server.
- property is an instance that contains the authorization credentials to send to the proxy server in response to an HTTP 407 (proxy authorization) status code.
-
-
+ property is an instance that contains the authorization credentials to send to the proxy server in response to an HTTP 407 (proxy authorization) status code.
+
+
+
+## Examples
+ The following example uses the property to set the credentials that will be submitted to the proxy server for authentication.
-## Examples
- The following example uses the property to set the credentials that will be submitted to the proxy server for authentication.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IWebProxy_Interface/CPP/iwebproxy_interface.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/IWebProxy/Credentials/iwebproxy_interface.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IWebProxy_Interface/VB/iwebproxy_interface.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IWebProxy_Interface/VB/iwebproxy_interface.vb" id="Snippet1":::
+
]]>
@@ -165,20 +164,19 @@
Returns the URI of a proxy.
A instance that contains the URI of the proxy used to contact ; otherwise null or itself.
- method returns the URI of the proxy server that handles requests to the Internet resource that is specified in the `destination` parameter. If the method returns null or `destination` itself, the proxy is not used to contact the host and the request is passed directly to the server.
-
-
-
-## Examples
- The following example uses the method to return the URI that the uses to access the Internet resource.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IWebProxy_Interface/CPP/iwebproxy_interface.cpp" id="Snippet4":::
+
+
+
+## Examples
+ The following example uses the method to return the URI that the uses to access the Internet resource.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/IWebProxy/Credentials/iwebproxy_interface.cs" id="Snippet4":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IWebProxy_Interface/VB/iwebproxy_interface.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IWebProxy_Interface/VB/iwebproxy_interface.vb" id="Snippet4":::
+
]]>
@@ -229,20 +227,19 @@
if the proxy server should not be used for ; otherwise, .
- method indicates whether to use the proxy server to access the host that is specified in the `host` parameter. If returns `true`, the proxy is not used to contact the host and the request is passed directly to the server. Getting `false` from does not guarantee that the URI is proxied; you still need to call the method to determine this.
-
-
-
-## Examples
- The following example uses the property to determine whether the proxy server should be used for the specified host.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IWebProxy_Interface/CPP/iwebproxy_interface.cpp" id="Snippet4":::
+
+
+
+## Examples
+ The following example uses the property to determine whether the proxy server should be used for the specified host.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/IWebProxy/Credentials/iwebproxy_interface.cs" id="Snippet4":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IWebProxy_Interface/VB/iwebproxy_interface.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/IWebProxy_Interface/VB/iwebproxy_interface.vb" id="Snippet4":::
+
]]>
diff --git a/xml/System.Net/NetworkCredential.xml b/xml/System.Net/NetworkCredential.xml
index d8108a864fb..5b7b56fdb9f 100644
--- a/xml/System.Net/NetworkCredential.xml
+++ b/xml/System.Net/NetworkCredential.xml
@@ -81,7 +81,7 @@
> On Unix platforms, use of NTLM authentication may require installing the NTLM plugin for the GSSAPI layer used by the implemention. On Ubuntu distributions, the package is called `gss-ntlmssp`. Alternatively, applications may opt in for a managed implementation of NTLM by setting the `_UseManagedNtlm` .csproj property (.NET 9+ only), or setting the `System.Net.Security.UseManagedNtlm` AppContext switch.
>
> On Windows, NTLM and Negotiate (Kerberos) authentication always depend on GSSAPI of the operating system.
-
+
This class does not support public key-based authentication methods such as Secure Sockets Layer (SSL) client authentication.
@@ -89,7 +89,6 @@
## Examples
The following code example associates a object with a set of Uniform Resource Identifiers (URIs) in a . It then passes the to a object, which uses it to authenticate requests to an Internet server.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic NetworkCredential Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/NetworkCredential/Overview/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic NetworkCredential Example/VB/source.vb" id="Snippet1":::
@@ -286,7 +285,6 @@
## Examples
The following code example creates a object using the specified user name and password.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NetworkCredential_Constructor2/CPP/networkcredential_constructor2.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/NetworkCredential/.ctor/networkcredential_constructor2.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NetworkCredential_Constructor2/VB/networkcredential_constructor2.vb" id="Snippet1":::
@@ -473,7 +471,6 @@
## Examples
The following code example uses the property to set the domain associated with the credentials.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NetworkCredential_UserName_Password_Domain/CPP/networkcredential_username_password_domain.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/NetworkCredential/Domain/networkcredential_username_password_domain.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NetworkCredential_UserName_Password_Domain/VB/networkcredential_username_password_domain.vb" id="Snippet1":::
@@ -623,7 +620,6 @@
## Examples
The following code example uses the method to retrieve a object for the specified URI.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NetworkCredential_GetCredential/CPP/networkcredential_getcredential.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/NetworkCredential/GetCredential/networkcredential_getcredential.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NetworkCredential_GetCredential/VB/networkcredential_getcredential.vb" id="Snippet1":::
@@ -681,7 +677,6 @@
## Examples
The following code example uses the property to set the password associated with the credentials.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NetworkCredential_UserName_Password_Domain/CPP/networkcredential_username_password_domain.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/NetworkCredential/Domain/networkcredential_username_password_domain.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NetworkCredential_UserName_Password_Domain/VB/networkcredential_username_password_domain.vb" id="Snippet1":::
@@ -795,7 +790,6 @@
## Examples
The following code example uses the property to set the user name associated with the credentials.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NetworkCredential_UserName_Password_Domain/CPP/networkcredential_username_password_domain.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/NetworkCredential/Domain/networkcredential_username_password_domain.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NetworkCredential_UserName_Password_Domain/VB/networkcredential_username_password_domain.vb" id="Snippet1":::
diff --git a/xml/System.Net/OpenReadCompletedEventArgs.xml b/xml/System.Net/OpenReadCompletedEventArgs.xml
index e60b3b5e5c5..c62237dce05 100644
--- a/xml/System.Net/OpenReadCompletedEventArgs.xml
+++ b/xml/System.Net/OpenReadCompletedEventArgs.xml
@@ -53,26 +53,24 @@
Provides data for the event.
- methods.
+
+
+
+## Examples
+ The following code example demonstrates downloading a resource for reading.
-## Remarks
- Instances of this class are passed to methods.
-
-
-
-## Examples
- The following code example demonstrates downloading a resource for reading.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet30":::
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet30":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet30":::
-
- The following method is called when the download completes.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet31":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet30":::
+
+ The following method is called when the download completes.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet31":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet31":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet31":::
+
]]>
@@ -118,20 +116,19 @@
Gets a readable stream that contains data downloaded by a method.
A that contains the downloaded data.
- and properties before using the data that is returned by this property. If the property's value is an object or the property's value is `true`, the asynchronous operation did not complete correctly and the property's value will not be valid.
-
-
-
-## Examples
- The following code example uses the stream returned by this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet31":::
+ and properties before using the data that is returned by this property. If the property's value is an object or the property's value is `true`, the asynchronous operation did not complete correctly and the property's value will not be valid.
+
+
+
+## Examples
+ The following code example uses the stream returned by this property.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet31":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet31":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet31":::
+
]]>
diff --git a/xml/System.Net/OpenReadCompletedEventHandler.xml b/xml/System.Net/OpenReadCompletedEventHandler.xml
index 8eff6f62285..feeb2b2652f 100644
--- a/xml/System.Net/OpenReadCompletedEventHandler.xml
+++ b/xml/System.Net/OpenReadCompletedEventHandler.xml
@@ -55,26 +55,24 @@
A containing event data.
Represents the method that will handle the event of a .
- delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate.
+
+
+
+## Examples
+ The following code example demonstrates downloading a resource for reading.
-## Remarks
- When you create a delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate.
-
-
-
-## Examples
- The following code example demonstrates downloading a resource for reading.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet30":::
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet30":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet30":::
-
- The following method is called when the download completes.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet31":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet30":::
+
+ The following method is called when the download completes.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet31":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet31":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet31":::
+
]]>
diff --git a/xml/System.Net/OpenWriteCompletedEventArgs.xml b/xml/System.Net/OpenWriteCompletedEventArgs.xml
index 6e14a9f7185..74cdd9d89f1 100644
--- a/xml/System.Net/OpenWriteCompletedEventArgs.xml
+++ b/xml/System.Net/OpenWriteCompletedEventArgs.xml
@@ -53,26 +53,24 @@
Provides data for the event.
- methods.
+
+
+
+## Examples
+ The following code example demonstrates opening a stream to write data to be uploaded.
-## Remarks
- Instances of this class are passed to methods.
-
-
-
-## Examples
- The following code example demonstrates opening a stream to write data to be uploaded.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet16":::
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet16":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet16":::
-
- The following method is called when the stream is available.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet15":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet16":::
+
+ The following method is called when the stream is available.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet15":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet15":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet15":::
+
]]>
@@ -118,20 +116,19 @@
Gets a writable stream that is used to send data to a server.
A where you can write data to be uploaded.
- and properties before using the stream returned by this property. If the property's value is an object or the property's value is `true`, the asynchronous operation did not complete correctly and the property's value will not be valid.
-
-
-
-## Examples
- The following code example uses the stream returned by this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet15":::
+ and properties before using the stream returned by this property. If the property's value is an object or the property's value is `true`, the asynchronous operation did not complete correctly and the property's value will not be valid.
+
+
+
+## Examples
+ The following code example uses the stream returned by this property.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet15":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet15":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet15":::
+
]]>
diff --git a/xml/System.Net/OpenWriteCompletedEventHandler.xml b/xml/System.Net/OpenWriteCompletedEventHandler.xml
index 41625615040..37a8ed22fb2 100644
--- a/xml/System.Net/OpenWriteCompletedEventHandler.xml
+++ b/xml/System.Net/OpenWriteCompletedEventHandler.xml
@@ -55,26 +55,24 @@
A containing event data.
Represents the method that will handle the event of a .
- delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate.
+
+
+
+## Examples
+ The following code example demonstrates opening a stream to write data to be uploaded.
-## Remarks
- When you create a delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate.
-
-
-
-## Examples
- The following code example demonstrates opening a stream to write data to be uploaded.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet16":::
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet16":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet16":::
-
- The following method is called when the stream is available.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet15":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet16":::
+
+ The following method is called when the stream is available.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet15":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet15":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet15":::
+
]]>
diff --git a/xml/System.Net/ServicePoint.xml b/xml/System.Net/ServicePoint.xml
index 50f17a4257d..1a4816115d6 100644
--- a/xml/System.Net/ServicePoint.xml
+++ b/xml/System.Net/ServicePoint.xml
@@ -76,7 +76,6 @@
## Examples
The following code example creates a object that connects to the URI `www.contoso.com`.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet1":::
@@ -131,7 +130,6 @@
## Examples
The following code example displays the value of this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet2":::
@@ -270,7 +268,6 @@ Although a object can make multiple connections t
## Examples
The following code example displays the value of this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet5":::
@@ -336,7 +333,6 @@ Although a object can make multiple connections t
## Examples
The following code example displays the value of this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet5":::
@@ -470,7 +466,6 @@ Although a object can make multiple connections t
## Examples
The following code example sets the value of this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLServicePoint/CPP/nclservicepoint.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/ServicePoint/ConnectionLeaseTimeout/nclservicepoint.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLServicePoint/VB/nclservicepoint.vb" id="Snippet1":::
@@ -539,7 +534,6 @@ Although a object can make multiple connections t
## Examples
The following code example uses the property to check the maximum number of connections that the object can make to the specified Uniform Resource Identifier (URI).
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet4":::
@@ -610,7 +604,6 @@ Although a object can make multiple connections t
## Examples
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet4":::
@@ -675,7 +668,6 @@ Although a object can make multiple connections t
## Examples
The following code example uses the property to determine the number of open Internet connections associated with this object.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet2":::
@@ -758,7 +750,6 @@ Although a object can make multiple connections t
## Examples
The following code example displays the value of this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet9":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet9":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet9":::
@@ -867,7 +858,6 @@ The `GetHashCode` method returns a hash code of this instance. This value can be
## Examples
The following code example uses the property to set and retrieve the date and time that the object was last connected to a host.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet3":::
@@ -935,7 +925,6 @@ The `GetHashCode` method returns a hash code of this instance. This value can be
## Examples
The following code example uses the property to set and retrieve the idle time.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet3":::
@@ -1001,7 +990,6 @@ The `GetHashCode` method returns a hash code of this instance. This value can be
## Examples
The following code example displays the value of this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet5":::
@@ -1070,7 +1058,6 @@ The `GetHashCode` method returns a hash code of this instance. This value can be
## Examples
The following code example sets the value of this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLServicePoint/CPP/nclservicepoint.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/ServicePoint/ConnectionLeaseTimeout/nclservicepoint.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLServicePoint/VB/nclservicepoint.vb" id="Snippet1":::
@@ -1214,7 +1201,6 @@ The `GetHashCode` method returns a hash code of this instance. This value can be
## Examples
The following code example displays the value of this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet5":::
@@ -1293,7 +1279,6 @@ The `GetHashCode` method returns a hash code of this instance. This value can be
## Examples
The following code example displays the value of this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet9":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet9":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet9":::
diff --git a/xml/System.Net/ServicePointManager.xml b/xml/System.Net/ServicePointManager.xml
index e497283cc91..a615a7b1c1a 100644
--- a/xml/System.Net/ServicePointManager.xml
+++ b/xml/System.Net/ServicePointManager.xml
@@ -76,7 +76,6 @@
## Examples
The following code example creates a object for connections to the URI `www.contoso.com`.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic ServicePoint Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/ServicePointManager/Overview/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic ServicePoint Example/VB/source.vb" id="Snippet1":::
@@ -137,7 +136,6 @@
## Examples
The following code example shows how to catch a certificate policy exception for a custom certificate policy. It assumes that the certificate policy object has been defined, that the Uniform Resource Identifier (URI) for the Web resource is contained in the variable `myUri`, and that there is a method named `ProcessResponse` that performs the work of the application.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic ServicePointManager.CertificatePolicy Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/ServicePointManager/CertificatePolicy/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic ServicePointManager.CertificatePolicy Example/VB/source.vb" id="Snippet1":::
@@ -201,7 +199,6 @@
## Examples
The following code example sets this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet10":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet10":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet10":::
@@ -275,7 +272,6 @@
## Examples
The following code example sets this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet10":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet10":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet10":::
@@ -378,7 +374,6 @@
## Examples
The following code example sets the property using this field.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet10":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet10":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet10":::
@@ -436,7 +431,6 @@
## Examples
The following code example sets this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePointWhidbey/cpp/servicepoint.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/ServicePointManager/DnsRefreshTimeout/servicepoint.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePointWhidbey/VB/servicepoint.vb" id="Snippet1":::
@@ -498,7 +492,6 @@
## Examples
The following code example sets this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePointWhidbey/cpp/servicepoint.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/ServicePointManager/DnsRefreshTimeout/servicepoint.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePointWhidbey/VB/servicepoint.vb" id="Snippet1":::
@@ -635,7 +628,6 @@
## Examples
The following code example sets this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet10":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet10":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet10":::
@@ -795,7 +787,6 @@
## Examples
The following code example demonstrates calling this method to access a object.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet7":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet7":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet7":::
@@ -937,7 +928,6 @@
## Examples
The following code example sets this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet8":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet8":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet8":::
@@ -1008,7 +998,6 @@
## Examples
The following code example sets this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet8":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet8":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet8":::
@@ -1345,7 +1334,6 @@ Each callback returns a value that indicates whether the certificate is accepted
## Examples
The following code example sets this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp" id="Snippet10":::
:::code language="csharp" source="~/snippets/csharp/System.Net/HttpWebRequest/ServicePoint/servicepoint.cs" id="Snippet10":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/System.Net.ServicePoint/VB/servicepoint.vb" id="Snippet10":::
diff --git a/xml/System.Net/SocketAddress.xml b/xml/System.Net/SocketAddress.xml
index 3f20821df2f..a37402daa83 100644
--- a/xml/System.Net/SocketAddress.xml
+++ b/xml/System.Net/SocketAddress.xml
@@ -68,7 +68,6 @@
## Examples
The following example demonstrates how to use to serialize an instance of the class. After serialization, the underlying byte buffer of the contains all of the state information.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic SocketAddressExample/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/SocketAddress/Overview/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic SocketAddressExample/VB/source.vb" id="Snippet1":::
diff --git a/xml/System.Net/UploadDataCompletedEventArgs.xml b/xml/System.Net/UploadDataCompletedEventArgs.xml
index 086b20f96d7..6ef0fc92fe1 100644
--- a/xml/System.Net/UploadDataCompletedEventArgs.xml
+++ b/xml/System.Net/UploadDataCompletedEventArgs.xml
@@ -49,26 +49,24 @@
Provides data for the event.
- .
+
+
+
+## Examples
+ The following code example demonstrates asynchronously uploading data.
-## Remarks
- Instances of this class are passed to the .
-
-
-
-## Examples
- The following code example demonstrates asynchronously uploading data.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet34":::
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet34":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet34":::
-
- The following method is called when the upload completes.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet35":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet34":::
+
+ The following method is called when the upload completes.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet35":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet35":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet35":::
+
]]>
@@ -111,20 +109,19 @@
Gets the server reply to a data upload operation started by calling an method.
A array containing the server reply.
- and properties before using the data returned by this property. If the property's value is an object or the property's value is `true`, the asynchronous operation did not complete correctly and the property's value will not be valid.
-
-
-
-## Examples
- The following code example displays the value of this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet35":::
+ and properties before using the data returned by this property. If the property's value is an object or the property's value is `true`, the asynchronous operation did not complete correctly and the property's value will not be valid.
+
+
+
+## Examples
+ The following code example displays the value of this property.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet35":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet35":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet35":::
+
]]>
diff --git a/xml/System.Net/UploadDataCompletedEventHandler.xml b/xml/System.Net/UploadDataCompletedEventHandler.xml
index e210e67de7a..014507b9a79 100644
--- a/xml/System.Net/UploadDataCompletedEventHandler.xml
+++ b/xml/System.Net/UploadDataCompletedEventHandler.xml
@@ -51,26 +51,24 @@
A containing event data.
Represents the method that will handle the event of a .
- delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event handler delegates, see [Handling and Raising Events](/dotnet/standard/events/).
+
+
+
+## Examples
+ The following code example demonstrates asynchronously uploading data.
-## Remarks
- When you create a delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event handler delegates, see [Handling and Raising Events](/dotnet/standard/events/).
-
-
-
-## Examples
- The following code example demonstrates asynchronously uploading data.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet34":::
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet34":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet34":::
-
- The following method is called when the upload completes.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet35":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet34":::
+
+ The following method is called when the upload completes.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet35":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet35":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet35":::
+
]]>
diff --git a/xml/System.Net/UploadFileCompletedEventArgs.xml b/xml/System.Net/UploadFileCompletedEventArgs.xml
index ec8a99f8235..83617fe377e 100644
--- a/xml/System.Net/UploadFileCompletedEventArgs.xml
+++ b/xml/System.Net/UploadFileCompletedEventArgs.xml
@@ -49,26 +49,24 @@
Provides data for the event.
- .
+
+
+
+## Examples
+ The following code example demonstrates asynchronously uploading a file.
-## Remarks
- Instances of this class are passed to the .
-
-
-
-## Examples
- The following code example demonstrates asynchronously uploading a file.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet4":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet4":::
-
- The following method is called when the upload completes.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet5":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet4":::
+
+ The following method is called when the upload completes.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet5":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet5":::
+
]]>
@@ -111,20 +109,19 @@
Gets the server reply to a data upload operation that is started by calling an method.
A array that contains the server reply.
- and properties to determine whether the upload completed. If the property's value is an object or the property's value is `true`, the asynchronous operation did not complete correctly and the property's value will not be valid.
-
-
-
-## Examples
- The following code example displays the value of this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet5":::
+ and properties to determine whether the upload completed. If the property's value is an object or the property's value is `true`, the asynchronous operation did not complete correctly and the property's value will not be valid.
+
+
+
+## Examples
+ The following code example displays the value of this property.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet5":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet5":::
+
]]>
diff --git a/xml/System.Net/UploadFileCompletedEventHandler.xml b/xml/System.Net/UploadFileCompletedEventHandler.xml
index 8b438a368cc..c44d3c7a1e4 100644
--- a/xml/System.Net/UploadFileCompletedEventHandler.xml
+++ b/xml/System.Net/UploadFileCompletedEventHandler.xml
@@ -51,26 +51,24 @@
A that contains event data.
Represents the method that will handle the event of a .
- delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event handler delegates, see [Handling and Raising Events](/dotnet/standard/events/).
+
+
+
+## Examples
+ The following code example demonstrates asynchronously uploading a file.
-## Remarks
- When you create a delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event handler delegates, see [Handling and Raising Events](/dotnet/standard/events/).
-
-
-
-## Examples
- The following code example demonstrates asynchronously uploading a file.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet6":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet6":::
-
- The following method is called when the upload completes.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet7":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet6":::
+
+ The following method is called when the upload completes.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet7":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet7":::
+
]]>
diff --git a/xml/System.Net/UploadStringCompletedEventArgs.xml b/xml/System.Net/UploadStringCompletedEventArgs.xml
index 655e684a51d..314f6399cb0 100644
--- a/xml/System.Net/UploadStringCompletedEventArgs.xml
+++ b/xml/System.Net/UploadStringCompletedEventArgs.xml
@@ -53,26 +53,24 @@
Provides data for the event.
- .
+
+
+
+## Examples
+ The following code example demonstrates asynchronously uploading a string.
-## Remarks
- Instances of this class are passed to the .
-
-
-
-## Examples
- The following code example demonstrates asynchronously uploading a string.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet38":::
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet38":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet38":::
-
- The following method is called when the upload completes.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet39":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet38":::
+
+ The following method is called when the upload completes.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet39":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet39":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet39":::
+
]]>
@@ -118,20 +116,19 @@
Gets the server reply to a string upload operation that is started by calling an method.
A array that contains the server reply.
- and properties to determine whether the upload completed. If the property's value is an object or the property's value is `true`, the asynchronous operation did not complete correctly and the property's value will not be valid.
-
-
-
-## Examples
- The following code example displays the value of this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet39":::
+ and properties to determine whether the upload completed. If the property's value is an object or the property's value is `true`, the asynchronous operation did not complete correctly and the property's value will not be valid.
+
+
+
+## Examples
+ The following code example displays the value of this property.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet39":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet39":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet39":::
+
]]>
diff --git a/xml/System.Net/UploadStringCompletedEventHandler.xml b/xml/System.Net/UploadStringCompletedEventHandler.xml
index 22175d96c3c..2410b6b7dda 100644
--- a/xml/System.Net/UploadStringCompletedEventHandler.xml
+++ b/xml/System.Net/UploadStringCompletedEventHandler.xml
@@ -55,26 +55,24 @@
A containing event data.
Represents the method that will handle the event of a .
- delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event handler delegates, see [Handling and Raising Events](/dotnet/standard/events/).
+
+
+
+## Examples
+ The following code example demonstrates asynchronously uploading a string.
-## Remarks
- When you create a delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event handler delegates, see [Handling and Raising Events](/dotnet/standard/events/).
-
-
-
-## Examples
- The following code example demonstrates asynchronously uploading a string.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet38":::
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet38":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet38":::
-
- The following method is called when the upload completes.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp" id="Snippet39":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet38":::
+
+ The following method is called when the upload completes.
+
:::code language="csharp" source="~/snippets/csharp/System.Net/DownloadDataCompletedEventArgs/Overview/asyncmethods.cs" id="Snippet39":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet39":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb" id="Snippet39":::
+
]]>
diff --git a/xml/System.Net/WebException.xml b/xml/System.Net/WebException.xml
index 4a917a9d8b7..e3f2d1e5a0f 100644
--- a/xml/System.Net/WebException.xml
+++ b/xml/System.Net/WebException.xml
@@ -150,7 +150,6 @@
## Examples
The following example throws a default .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebException_Constructor1/CPP/webexception_constructor1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebException/.ctor/webexception_constructor1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebException_Constructor1/VB/webexception_constructor1.vb" id="Snippet1":::
@@ -218,7 +217,6 @@
## Examples
The following example throws a by specifying an error message.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebException_Constructor2/CPP/webexception_constructor2.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebException/.ctor/webexception_constructor2.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebException_Constructor2/VB/webexception_constructor2.vb" id="Snippet1":::
@@ -353,7 +351,6 @@
## Examples
The following example throws a by specifying an error message and a .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebException_Constructor3/CPP/webexception_constructor3.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebException/.ctor/webexception_constructor3.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebException_Constructor3/VB/webexception_constructor3.vb" id="Snippet1":::
@@ -424,7 +421,6 @@
## Examples
The following example throws a by specifying an error message and nested exception.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebException_Constructor4/CPP/webexception_constructor4.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebException/.ctor/webexception_constructor4.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebException_Constructor4/VB/webexception_constructor4.vb" id="Snippet1":::
@@ -506,7 +502,6 @@
## Examples
The following example throws a by specifying an error message and a .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebException_Constructor5/CPP/webexception_constructor5.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebException/.ctor/webexception_constructor5.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebException_Constructor5/VB/webexception_constructor5.vb" id="Snippet1":::
@@ -632,7 +627,6 @@
## Examples
The following example checks the property and prints to the console the and of the underlying instance.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebException_Status_Response/CPP/webexception_status_response.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebException/Response/webexception_status_response.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebException_Status_Response/VB/webexception_status_response.vb" id="Snippet1":::
@@ -704,7 +698,6 @@
## Examples
The following example checks the property and prints to the console the and of the underlying instance.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebException_Status_Response/CPP/webexception_status_response.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebException/Response/webexception_status_response.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebException_Status_Response/VB/webexception_status_response.vb" id="Snippet1":::
diff --git a/xml/System.Net/WebHeaderCollection.xml b/xml/System.Net/WebHeaderCollection.xml
index 674da86a231..41aec5b138f 100644
--- a/xml/System.Net/WebHeaderCollection.xml
+++ b/xml/System.Net/WebHeaderCollection.xml
@@ -329,7 +329,6 @@
## Examples
The following example adds a name/value pair to a using the Method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebHeaderCollection_Add/CPP/webheadercollection_add.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebHeaderCollection/Add/webheadercollection_add.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebHeaderCollection_Add/VB/webheadercollection_add.vb" id="Snippet1":::
@@ -569,7 +568,6 @@
## Examples
The following example adds a name/value pair to a using the Method.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebHeaderCollection_Add/CPP/webheadercollection_add.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebHeaderCollection/Add/webheadercollection_add.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebHeaderCollection_Add/VB/webheadercollection_add.vb" id="Snippet1":::
@@ -1320,7 +1318,6 @@
## Examples
The following example uses the method to retrieve an array of values for each header in the .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebHeaderCollection_GetValues_1/CPP/webheadercollection_getvalues_1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebHeaderCollection/GetValues/webheadercollection_getvalues_1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebHeaderCollection_GetValues_1/VB/webheadercollection_getvalues_1.vb" id="Snippet1":::
@@ -1430,7 +1427,6 @@
## Examples
The following example checks the property to see if any headers are prohibited from being set.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebHeaderCollection_IsRestricted/CPP/webheadercollection_isrestricted.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebHeaderCollection/IsRestricted/webheadercollection_isrestricted.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebHeaderCollection_IsRestricted/VB/webheadercollection_isrestricted.vb" id="Snippet1":::
@@ -1528,7 +1524,6 @@
## Examples
The following example checks the property to see if any request headers are prohibited from being set.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebHeaderCollection_IsRestricted/CPP/webheadercollection_isrestricted.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebHeaderCollection/IsRestricted/webheadercollection_isrestricted.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebHeaderCollection_IsRestricted/VB/webheadercollection_isrestricted.vb" id="Snippet1":::
@@ -2007,7 +2002,6 @@
## Examples
The following example uses the method to remove a header from the . After the header is removed, this example prints all existing headers to the screen to prove that it has been removed.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebHeaderCollection_Remove/CPP/webheadercollection_remove.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebHeaderCollection/Remove/webheadercollection_remove.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebHeaderCollection_Remove/VB/webheadercollection_remove.vb" id="Snippet1":::
@@ -2239,7 +2233,6 @@
## Examples
The following example uses the method to set the value of an existing header.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebHeaderCollection_Set/CPP/webheadercollection_set.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebHeaderCollection/Set/webheadercollection_set.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebHeaderCollection_Set/VB/webheadercollection_set.vb" id="Snippet1":::
diff --git a/xml/System.Net/WebProxy.xml b/xml/System.Net/WebProxy.xml
index 02a21166403..ddf467d9d3b 100644
--- a/xml/System.Net/WebProxy.xml
+++ b/xml/System.Net/WebProxy.xml
@@ -65,36 +65,33 @@
Contains HTTP proxy settings for the class.
- class contains the proxy settings that instances use to determine whether a Web proxy is used to send requests. Global Web proxy settings can be specified in machine and application configuration files, and applications can use instances of the class to customize Web proxy use. The class is the base implementation of the interface.
-
- To obtain instances of the Web proxy class, you can use any of the following methods:
-
-- The constructor.
-
-- The method.
-
-- The method.
-
- These methods each supply a instance that you can further customize; the difference between them is how the instance is initialized before it is returned to your application. The constructor returns an instance of the class with the property set to `null`. When a request uses a instance in this state, no proxy is used to send the request.
-
- The method returns an instance of the class with the , , and properties set to the values used by the local computer.
-
- The method returns an instance of the class with it properties set according to a combination of Internet and configuration file settings.
-
- The class supports automatic detection and execution of proxy configuration scripts. This feature is also known as Web Proxy Auto-Discovery (WPAD). When using automatic proxy configuration, a configuration script, typically named Wpad.dat, must be located, downloaded, compiled, and run. If these operations are successful, the script returns the proxies that can be used for a request.
-
-
-
-## Examples
- The following code example sets up an instance with a instance. The instance uses the proxy to connect to external Internet resources. (For an example that demonstrates using the WPAD feature, see the documentation for the class.)
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic WebProxy Example/CPP/source.cpp" id="Snippet1":::
+
+ To obtain instances of the Web proxy class, you can use any of the following methods:
+
+- The constructor.
+- The method.
+- The method.
+
+ These methods each supply a instance that you can further customize; the difference between them is how the instance is initialized before it is returned to your application. The constructor returns an instance of the class with the property set to `null`. When a request uses a instance in this state, no proxy is used to send the request.
+
+ The method returns an instance of the class with the , , and properties set to the values used by the local computer.
+
+ The method returns an instance of the class with it properties set according to a combination of Internet and configuration file settings.
+
+ The class supports automatic detection and execution of proxy configuration scripts. This feature is also known as Web Proxy Auto-Discovery (WPAD). When using automatic proxy configuration, a configuration script, typically named Wpad.dat, must be located, downloaded, compiled, and run. If these operations are successful, the script returns the proxies that can be used for a request.
+
+
+
+## Examples
+ The following code example sets up an instance with a instance. The instance uses the proxy to connect to external Internet resources. (For an example that demonstrates using the WPAD feature, see the documentation for the class.)
+
:::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/Overview/source.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic WebProxy Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic WebProxy Example/VB/source.vb" id="Snippet1":::
+
]]>
@@ -150,21 +147,20 @@
Initializes an empty instance of the class.
- class with the property set to `null`.
-
- When the property is `null`, the method returns `true` and the method returns the destination address.
-
-
-
-## Examples
- The following code example demonstrates calling this constructor.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebProxy/CPP/nclwebproxy.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet1":::
-
+ class with the property set to `null`.
+
+ When the property is `null`, the method returns `true` and the method returns the destination address.
+
+
+
+## Examples
+ The following code example demonstrates calling this constructor.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet1":::
+
]]>
@@ -209,19 +205,18 @@
The URI of the proxy server.
Initializes a new instance of the class with the specified URI.
- instance is initialized with the property set to a instance containing `Address`.
-
-
-
-## Examples
- The following code example demonstrates calling this constructor.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebProxy/CPP/nclwebproxy.cpp" id="Snippet6":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet6":::
-
+ instance is initialized with the property set to a instance containing `Address`.
+
+
+
+## Examples
+ The following code example demonstrates calling this constructor.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet6":::
+
]]>
@@ -274,19 +269,18 @@
A instance that contains the address of the proxy server.
Initializes a new instance of the class from the specified instance.
- instance is initialized with the property set to the `Address` parameter.
-
-
-
-## Examples
- The following code example demonstrates calling this constructor.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebProxy/CPP/nclwebproxy.cpp" id="Snippet2":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet2":::
-
+ instance is initialized with the property set to the `Address` parameter.
+
+
+
+## Examples
+ The following code example demonstrates calling this constructor.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet2":::
+
]]>
@@ -342,11 +336,11 @@
The context for the serialized data.
Initializes an instance of the class using previously serialized content.
- instance; applications do not call it.
-
+ instance; applications do not call it.
+
]]>
@@ -394,19 +388,18 @@
to bypass the proxy for local addresses; otherwise, .
Initializes a new instance of the class with the specified URI and bypass setting.
- instance is initialized with the property set to a instance that contains `Address` and the property set to `BypassOnLocal`.
-
-
-
-## Examples
- The following code example demonstrates calling this constructor.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebProxy/CPP/nclwebproxy.cpp" id="Snippet7":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet7":::
-
+ instance is initialized with the property set to a instance that contains `Address` and the property set to `BypassOnLocal`.
+
+
+
+## Examples
+ The following code example demonstrates calling this constructor.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet7":::
+
]]>
@@ -455,19 +448,18 @@
The port number on to use.
Initializes a new instance of the class with the specified host and port number.
- instance is initialized with the property set to a instance of the form http:// `Host` : `Port`.
-
-
-
-## Examples
- The following code example demonstrates calling this constructor.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebProxy/CPP/nclwebproxy.cpp" id="Snippet5":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet5":::
-
+ instance is initialized with the property set to a instance of the form http:// `Host` : `Port`.
+
+
+
+## Examples
+ The following code example demonstrates calling this constructor.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet5":::
+
]]>
The URI formed by combining and is not a valid URI.
@@ -522,19 +514,18 @@
to bypass the proxy for local addresses; otherwise, .
Initializes a new instance of the class with the instance and bypass setting.
- instance is initialized with the property set to `Address` and with the property set to `BypassOnLocal`.
-
-
-
-## Examples
- The following code example demonstrates calling this constructor.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebProxy/CPP/nclwebproxy.cpp" id="Snippet3":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet3":::
-
+ instance is initialized with the property set to `Address` and with the property set to `BypassOnLocal`.
+
+
+
+## Examples
+ The following code example demonstrates calling this constructor.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet3":::
+
]]>
@@ -595,19 +586,18 @@
An array of regular expression strings that contain the URIs of the servers to bypass.
Initializes a new instance of the class with the specified URI, bypass setting, and list of URIs to bypass.
- instance is initialized with the property set to a instance that contains `Address`, the property set to `BypassOnLocal`, and the property set to `BypassList`.
-
-
-
-## Examples
- The following code example demonstrates calling this constructor.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebProxy/CPP/nclwebproxy.cpp" id="Snippet8":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet8":::
-
+ instance is initialized with the property set to a instance that contains `Address`, the property set to `BypassOnLocal`, and the property set to `BypassList`.
+
+
+
+## Examples
+ The following code example demonstrates calling this constructor.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet8":::
+
]]>
@@ -678,19 +668,18 @@
An array of regular expression strings that contains the URIs of the servers to bypass.
Initializes a new instance of the class with the specified instance, bypass setting, and list of URIs to bypass.
- instance is initialized with the property set to `Address`, the property set to `BypassOnLocal`, and the property set to `BypassList`.
-
-
-
-## Examples
- The following code example demonstrates calling this constructor.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebProxy/CPP/nclwebproxy.cpp" id="Snippet4":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet4":::
-
+ instance is initialized with the property set to `Address`, the property set to `BypassOnLocal`, and the property set to `BypassList`.
+
+
+
+## Examples
+ The following code example demonstrates calling this constructor.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet4":::
+
]]>
@@ -753,19 +742,18 @@
An instance to submit to the proxy server for authentication.
Initializes a new instance of the class with the specified URI, bypass setting, list of URIs to bypass, and credentials.
- instance is initialized with the property set to a instance that contains `Address`, the property set to `BypassOnLocal`, the property set to `BypassList`, and the property set to `Credentials`.
-
-
-
-## Examples
- The following code example demonstrates calling this constructor.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebProxy/CPP/nclwebproxy.cpp" id="Snippet9":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet9":::
-
+ instance is initialized with the property set to a instance that contains `Address`, the property set to `BypassOnLocal`, the property set to `BypassList`, and the property set to `Credentials`.
+
+
+
+## Examples
+ The following code example demonstrates calling this constructor.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet9":::
+
]]>
@@ -832,19 +820,18 @@
An instance to submit to the proxy server for authentication.
Initializes a new instance of the class with the specified instance, bypass setting, list of URIs to bypass, and credentials.
- instance is initialized with the property set to `Address`, the property set to `BypassOnLocal`, the property set to `BypassList`, and the property set to `Credentials`.
-
-
-
-## Examples
- The following code example demonstrates calling this constructor.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebProxy/CPP/nclwebproxy.cpp" id="Snippet13":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet13":::
-
+ instance is initialized with the property set to `Address`, the property set to `BypassOnLocal`, the property set to `BypassList`, and the property set to `Credentials`.
+
+
+
+## Examples
+ The following code example demonstrates calling this constructor.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet13":::
+
]]>
@@ -889,21 +876,20 @@
Gets or sets the address of the proxy server.
A instance that contains the address of the proxy server.
- property contains the address of the proxy server. When automatic proxy detection is not enabled, and no automatic configuration script is specified, the property and determine the proxy used for a request.
-
- When the property is `null`, requests bypass the proxy and connect directly to the destination host.
-
-
-
-## Examples
- The following code example displays the properties of a object, including its .
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLAutoProxy/CPP/proxy.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/Address/proxy.cs" id="Snippet1":::
-
+ property contains the address of the proxy server. When automatic proxy detection is not enabled, and no automatic configuration script is specified, the property and determine the proxy used for a request.
+
+ When the property is `null`, requests bypass the proxy and connect directly to the destination host.
+
+
+
+## Examples
+ The following code example displays the properties of a object, including its .
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/Address/proxy.cs" id="Snippet1":::
+
]]>
@@ -953,11 +939,11 @@
Gets a list of addresses that do not use the proxy server.
An that contains a list of arrays that represents URIs that do not use the proxy server when accessed.
- is an array list of regular expression strings that describe the URIs that are accessed directly instead of through the proxy server.
-
+ is an array list of regular expression strings that describe the URIs that are accessed directly instead of through the proxy server.
+
]]>
@@ -1007,19 +993,18 @@
Gets or sets an array of addresses that do not use the proxy server.
An array that contains a list of regular expressions that describe URIs that do not use the proxy server when accessed.
- property contains an array of regular expressions that describe URIs that are accessed directly instead of through the proxy server.
-
-
-
-## Examples
- The following code example displays the properties of a object, including its property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLAutoProxy/CPP/proxy.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/Address/proxy.cs" id="Snippet1":::
-
+ property contains an array of regular expressions that describe URIs that are accessed directly instead of through the proxy server.
+
+
+
+## Examples
+ The following code example displays the properties of a object, including its property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/Address/proxy.cs" id="Snippet1":::
+
]]>
@@ -1065,24 +1050,23 @@
to bypass the proxy server for local addresses; otherwise, . The default value is .
- property determines whether to use the proxy server when accessing local Internet resources.
-
- If is `true`, requests to local Internet resources do not use the proxy server. Local requests are identified by the lack of a period (.) in the URI, as in `http://webserver/`, or access the local server, including `http://localhost`, `http://loopback`, or `http://127.0.0.1`. When is `false`, all Internet requests are made through the proxy server.
-
+ property determines whether to use the proxy server when accessing local Internet resources.
+
+ If is `true`, requests to local Internet resources do not use the proxy server. Local requests are identified by the lack of a period (.) in the URI, as in `http://webserver/`, or access the local server, including `http://localhost`, `http://loopback`, or `http://127.0.0.1`. When is `false`, all Internet requests are made through the proxy server.
+
> [!NOTE]
-> Requests to a local host with a URI that contain a period use the proxy. To avoid using a proxy in these cases, create an entry for the host in the .
-
-
-
-## Examples
- The following code example demonstrates calling a constructor that sets this property and getting the value of this property.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebProxy/CPP/nclwebproxy.cpp" id="Snippet7":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet7":::
-
+> Requests to a local host with a URI that contain a period use the proxy. To avoid using a proxy in these cases, create an entry for the host in the .
+
+
+
+## Examples
+ The following code example demonstrates calling a constructor that sets this property and getting the value of this property.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet7":::
+
]]>
@@ -1140,14 +1124,14 @@
Gets or sets the credentials to submit to the proxy server for authentication.
An instance that contains the credentials to submit to the proxy server for authentication.
- property contains the authentication credentials to send to the proxy server in response to an HTTP 407 (proxy authorization) status code. In most client scenarios, you should use the , which are the credentials of the currently logged on user. To do this, set the property to `true` instead of setting this property.
-
+ property contains the authentication credentials to send to the proxy server in response to an HTTP 407 (proxy authorization) status code. In most client scenarios, you should use the , which are the credentials of the currently logged on user. To do this, set the property to `true` instead of setting this property.
+
> [!NOTE]
-> If you set the property to credentials other than the , setting the property to `true` causes a . To prevent this, you must set the property to `null` before setting the property to `true`. Likewise, you cannot set this property to any value when is `true`.
-
+> If you set the property to credentials other than the , setting the property to `true` causes a . To prevent this, you must set the property to `null` before setting the property to `true`. Likewise, you cannot set this property to any value when is `true`.
+
]]>
You attempted to set this property when the property was set to .
@@ -1207,24 +1191,23 @@
Reads the Internet options nondynamic proxy settings.
A instance that contains the nondynamic proxy settings from Internet options.
- method reads the nondynamic proxy settings from the computer's Internet options and creates a instance with those settings.
-
- The method does not pick up any dynamic settings that are generated from scripts run by Internet Explorer, from automatic configuration entries, or from DHCP or DNS lookups.
-
- Applications should use the property instead of the method.
-
+ method reads the nondynamic proxy settings from the computer's Internet options and creates a instance with those settings.
+
+ The method does not pick up any dynamic settings that are generated from scripts run by Internet Explorer, from automatic configuration entries, or from DHCP or DNS lookups.
+
+ Applications should use the property instead of the method.
+
> [!NOTE]
> This property is not supported on .NET Core.
-
-## Examples
- The following code example demonstrates calling this method.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebProxy/CPP/nclwebproxy.cpp" id="Snippet11":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet11":::
-
+
+## Examples
+ The following code example demonstrates calling this method.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet11":::
+
]]>
On .NET Core.
@@ -1273,11 +1256,11 @@
A that specifies the destination for this serialization.
Populates a with the data that is needed to serialize the target object.
- are automatically tracked and serialized by the formatter.
-
+ are automatically tracked and serialized by the formatter.
+
]]>
@@ -1335,23 +1318,22 @@
Returns the proxied URI for a request.
The instance of the Internet resource, if the resource is on the bypass list; otherwise, the instance of the proxy.
- method returns the URI that the instance uses to access the Internet resource.
-
- compares `destination` with the contents of , using the method. If returns `true`, returns `destination` and the instance does not use the proxy server.
-
- If `destination` is not in , the instance uses the proxy server and the property is returned.
-
-
-
-## Examples
- The following code example creates a object and calls this method to get the proxy that is selected for a resource.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLAutoProxy/CPP/proxy.cpp" id="Snippet2":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/Address/proxy.cs" id="Snippet2":::
-
+ method returns the URI that the instance uses to access the Internet resource.
+
+ compares `destination` with the contents of , using the method. If returns `true`, returns `destination` and the instance does not use the proxy server.
+
+ If `destination` is not in , the instance uses the proxy server and the property is returned.
+
+
+
+## Examples
+ The following code example creates a object and calls this method to get the proxy that is selected for a resource.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/Address/proxy.cs" id="Snippet2":::
+
]]>
The parameter is .
@@ -1404,31 +1386,30 @@
if the proxy server should not be used for ; otherwise, .
- method is used to determine whether to bypass the proxy server when accessing an Internet resource.
-
- The and properties control the return value of the method.
-
- returns `true` under any of the following conditions:
-
-- If is `true` and `host` is a local URI. Local requests are identified by the lack of a period (.) in the URI, as in `http://webserver/`.
-
-- If `host` matches a regular expression in .
-
-- If is `null`.
-
- All other conditions return `false`.
-
-
-
-## Examples
- The following code example creates a object and calls this method to check whether the bypass list is properly set.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebProxy/CPP/nclwebproxy.cpp" id="Snippet12":::
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet12":::
-
+ method is used to determine whether to bypass the proxy server when accessing an Internet resource.
+
+ The and properties control the return value of the method.
+
+ returns `true` under any of the following conditions:
+
+- If is `true` and `host` is a local URI. Local requests are identified by the lack of a period (.) in the URI, as in `http://webserver/`.
+
+- If `host` matches a regular expression in .
+
+- If is `null`.
+
+ All other conditions return `false`.
+
+
+
+## Examples
+ The following code example creates a object and calls this method to check whether the bypass list is properly set.
+
+ :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet12":::
+
]]>
The parameter is .
@@ -1488,11 +1469,11 @@
A structure that indicates the destination for this serialization.
Creates the serialization data and context that are used by the system to serialize a object.
-
@@ -1536,22 +1517,22 @@
if the default credentials are used; otherwise, . The default value is .
- object should, if requested by the server, be authenticated using the credentials of the currently logged on user. For client applications, this is the desired behavior in most scenarios. For middle tier applications, such as ASP.NET applications, instead of using this property, you would typically set the property to the credentials of the client on whose behalf the request is made.
-
- The following table shows the effect of setting the value, based on the value of the property.
-
-| value| value|Effect|
-|----------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|
-||`true`|No effect.|
-||`false`| is set to `null`.|
-|`null`|`true`| is set to .|
-|Any value other than or `null`|`true` or `false`|Setting throws an exception.|
-
- If is `false`, you can change the property to any credentials. If is `true`, changing the property from (the value that is set when the property is set to `true`) will throw an exception.
-
+ object should, if requested by the server, be authenticated using the credentials of the currently logged on user. For client applications, this is the desired behavior in most scenarios. For middle tier applications, such as ASP.NET applications, instead of using this property, you would typically set the property to the credentials of the client on whose behalf the request is made.
+
+ The following table shows the effect of setting the value, based on the value of the property.
+
+| value| value|Effect|
+|----------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|
+||`true`|No effect.|
+||`false`| is set to `null`.|
+|`null`|`true`| is set to .|
+|Any value other than or `null`|`true` or `false`|Setting throws an exception.|
+
+ If is `false`, you can change the property to any credentials. If is `true`, changing the property from (the value that is set when the property is set to `true`) will throw an exception.
+
]]>
You attempted to set this property when the property contains credentials other than the default credentials.
diff --git a/xml/System.Net/WebRequest.xml b/xml/System.Net/WebRequest.xml
index 16717bf0597..694bb8620a8 100644
--- a/xml/System.Net/WebRequest.xml
+++ b/xml/System.Net/WebRequest.xml
@@ -95,7 +95,6 @@
## Examples
The following example shows how to create a instance and return the response.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebRequestSimple/CPP/webrequestget.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/Overview/webrequestget.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebRequestSimple/VB/webrequestget.vb" id="Snippet1":::
@@ -173,7 +172,6 @@
## Examples
The following example shows how to create a instance by calling the method on the class.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic WebRequest.WebRequest Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/.ctor/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic WebRequest.WebRequest Example/VB/source.vb" id="Snippet1":::
@@ -379,7 +377,6 @@
## Examples
The following code example sets the value of this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCredPolicy/CPP/NCLCredPolicy.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/IntranetZoneCredentialPolicy/Overview/websample.cs" id="Snippet1":::
]]>
@@ -456,7 +453,6 @@
## Examples
The following example uses the to asynchronously obtain the request stream.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebRequest_BeginGetRequest/CPP/webrequest_begingetrequest.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/BeginGetRequestStream/webrequest_begingetrequest.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebRequest_BeginGetRequest/VB/webrequest_begingetrequest.vb" id="Snippet3":::
@@ -623,7 +619,6 @@
## Examples
The following code example demonstrates setting the cache policy for a Web request.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSimpleCache/CPP/NCLSimpleCache.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet2":::
]]>
@@ -764,7 +759,6 @@
## Examples
The following example sets the property to the amount of bytes in the outgoing byte buffer.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebRequest_ContentType/CPP/webrequest_contenttype.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/ContentLength/webrequest_contenttype.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebRequest_ContentType/VB/webrequest_contenttype.vb" id="Snippet4":::
@@ -843,7 +837,6 @@
## Examples
The following example sets the property to the appropriate media type.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebRequest_ContentType/CPP/webrequest_contenttype.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/ContentLength/webrequest_contenttype.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebRequest_ContentType/VB/webrequest_contenttype.vb" id="Snippet4":::
@@ -946,7 +939,6 @@
## Examples
The following example uses to instantiate an instance. A string representing the target URL is used as the constructor parameter.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebResponse_ResponseUri/CPP/webresponse_responseuri.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/Create/webresponse_responseuri.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebResponse_ResponseUri/VB/webresponse_responseuri.vb" id="Snippet1":::
@@ -1048,7 +1040,6 @@ Note: In .NET for Win
## Examples
The following example uses to instantiate an instance. A Uri representing the target URL is used as the constructor parameter.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebRequest_Create/CPP/webrequest_create.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/Create/webrequest_create.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebRequest_Create/VB/webrequest_create.vb" id="Snippet1":::
@@ -1399,7 +1390,6 @@ This property allows an application to determine which property using the default credentials of the current user. When the request is made, credentials stored in this property are used to validate the client. This is identical to setting the property to `true`.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLWebRequestSimple/CPP/webrequestget.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/Overview/webrequestget.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/NCLWebRequestSimple/VB/webrequestget.vb" id="Snippet2":::
@@ -1480,7 +1470,6 @@ This property allows an application to determine which
@@ -1627,7 +1616,6 @@ This property allows an application to determine which . The method completes the asynchronous call to .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebRequest_BeginGetRequest/CPP/webrequest_begingetrequest.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/BeginGetRequestStream/webrequest_begingetrequest.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebRequest_BeginGetRequest/VB/webrequest_begingetrequest.vb" id="Snippet3":::
@@ -1837,7 +1825,6 @@ This property allows an application to determine which method to obtain a stream and then writes data that stream.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebRequest_ContentType/CPP/webrequest_contenttype.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/ContentLength/webrequest_contenttype.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebRequest_ContentType/VB/webrequest_contenttype.vb" id="Snippet4":::
@@ -1970,7 +1957,6 @@ This property allows an application to determine which property to 10000 milliseconds. If the timeout period expires before the resource can be returned, a is thrown.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebRequest_Timeout/CPP/webrequest_timeout.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/GetResponse/webrequest_timeout.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebRequest_Timeout/VB/webrequest_timeout.vb" id="Snippet1":::
@@ -2155,7 +2141,6 @@ This property allows an application to determine which property to POST to indicate that the request will post data to the target host.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebRequest_BeginGetRequest/CPP/webrequest_begingetrequest.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/BeginGetRequestStream/webrequest_begingetrequest.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebRequest_BeginGetRequest/VB/webrequest_begingetrequest.vb" id="Snippet3":::
@@ -2430,7 +2414,6 @@ This property allows an application to determine which property to determine the site originally requested.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebRequest_RequestUri1/CPP/webrequest_requesturi.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/RequestUri/webrequest_requesturi.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebRequest_RequestUri1/VB/webrequest_requesturi.vb" id="Snippet1":::
@@ -2768,7 +2750,6 @@ This property allows an application to determine which property to 10000 milliseconds. If the timeout period expires before the resource can be returned, a is thrown.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebRequest_Timeout/CPP/webrequest_timeout.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/GetResponse/webrequest_timeout.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebRequest_Timeout/VB/webrequest_timeout.vb" id="Snippet1":::
diff --git a/xml/System.Net/WebResponse.xml b/xml/System.Net/WebResponse.xml
index 725a079bf17..3f1f962cf09 100644
--- a/xml/System.Net/WebResponse.xml
+++ b/xml/System.Net/WebResponse.xml
@@ -88,7 +88,6 @@
## Examples
The following example creates a instance from a .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Classic WebRequest Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebResponse/Overview/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/Classic WebRequest Example/VB/source.vb" id="Snippet1":::
@@ -292,7 +291,6 @@
## Examples
The following example uses the method to close the `WebResponse`.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebResponse_Close/CPP/webresponse_close.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebResponse/Close/webresponse_close.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebResponse_Close/VB/webresponse_close.vb" id="Snippet1":::
@@ -362,7 +360,6 @@
## Examples
The following example uses the property to obtain the Length of the resource returned.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebResponse_ContentLength_Type/CPP/webresponse_contentlength_type.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebResponse/ContentLength/webresponse_contentlength_type.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebResponse_ContentLength_Type/VB/webresponse_contentlength_type.vb" id="Snippet1":::
@@ -432,7 +429,6 @@
## Examples
The following example uses the property to obtain the content type of the response.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebResponse_ContentLength_Type/CPP/webresponse_contentlength_type.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebResponse/ContentLength/webresponse_contentlength_type.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebResponse_ContentLength_Type/VB/webresponse_contentlength_type.vb" id="Snippet1":::
@@ -679,7 +675,6 @@
## Examples
The following example uses to return a instance. A small local buffer is used to read data from the and output it to the console.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebResponse_GetResponseStream/CPP/webresponse_getresponsestream.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebResponse/GetResponseStream/webresponse_getresponsestream.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebResponse_GetResponseStream/VB/webresponse_getresponsestream.vb" id="Snippet1":::
@@ -745,7 +740,6 @@
## Examples
The following example displays all of the header name-value pairs returned in the .
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebResponse_Headers/CPP/webresponse_headers.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebResponse/Headers/webresponse_headers.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebResponse_Headers/VB/webresponse_headers.vb" id="Snippet1":::
@@ -869,7 +863,6 @@
## Examples
The following code example checks the value of this property.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLCredPolicy/CPP/NCLCredPolicy.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/IntranetZoneCredentialPolicy/Overview/websample.cs" id="Snippet1":::
]]>
@@ -935,7 +928,6 @@
## Examples
The following example uses the property to determine the location from which the originated.
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/WebResponse_ResponseUri/CPP/webresponse_responseuri.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/Create/webresponse_responseuri.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Remoting/WebResponse_ResponseUri/VB/webresponse_responseuri.vb" id="Snippet1":::
From 78d278e993e85277b2a399ebadae9c82019c9546 Mon Sep 17 00:00:00 2001
From: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Date: Tue, 3 Jun 2025 16:26:02 -0700
Subject: [PATCH 2/2] delete the snippet files
---
.../CPP/authenticationmanager_unregister2.cpp | 63 -
.../CPP/authorization_constructor3.cpp | 104 --
.../CPP/authorization_protectionrealm.cpp | 192 ---
.../CPP/source.cpp | 25 -
.../Classic Dns Example/CPP/source.cpp | 20 -
.../CPP/source.cpp | 20 -
.../CPP/source.cpp | 16 -
.../CPP/source.cpp | 23 -
.../CPP/source.cpp | 25 -
.../CPP/source.cpp | 20 -
.../CPP/source.cpp | 36 -
.../CPP/source.cpp | 20 -
.../CPP/source.cpp | 53 -
.../CPP/source.cpp | 17 -
.../CPP/source.cpp | 24 -
.../CPP/source.cpp | 34 -
.../CPP/source.cpp | 62 -
.../CPP/source.cpp | 32 -
.../CPP/source.cpp | 30 -
.../CPP/source.cpp | 106 --
.../Classic TcpListenerExample/CPP/source.cpp | 83 --
.../CPP/source.cpp | 38 -
.../CPP/source.cpp | 280 -----
.../Classic UdpClientExample/CPP/source.cpp | 45 -
.../Classic Uri Example/CPP/source.cpp | 34 -
.../CPP/source.cpp | 30 -
.../CPP/source.cpp | 20 -
.../CPP/source.cpp | 20 -
.../CPP/source.cpp | 18 -
.../Classic Uri.Host Example/CPP/source.cpp | 20 -
.../CPP/source.cpp | 29 -
.../Classic Uri.Port Example/CPP/source.cpp | 20 -
.../Classic Uri.Scheme Example/CPP/source.cpp | 20 -
.../Classic Uri.Uri Example/CPP/source.cpp | 18 -
.../Classic Uri.Uri1 Example/CPP/source.cpp | 18 -
.../Classic Uri.Uri3 Example/CPP/source.cpp | 20 -
.../Classic Uri.Uri4 Example/CPP/source.cpp | 12 -
.../CPP/source.cpp | 21 -
.../CPP/source.cpp | 18 -
.../CPP/source.cpp | 18 -
.../CPP/source.cpp | 18 -
.../CPP/source.cpp | 18 -
.../Classic WebProxy Example/CPP/source.cpp | 22 -
.../Classic WebRequest Example/CPP/source.cpp | 24 -
.../CPP/source.cpp | 15 -
.../CPP/source.cpp | 248 ----
.../CPP/CookieCollection_Item_1.cpp | 147 ---
.../CPP/CookieCollection_Item_2.cpp | 143 ---
.../CPP/credentialcache_add_remove.cpp | 84 --
.../credentialcache_defaultcredentials.cpp | 82 --
.../CPP/credentialcache_getcredential.cpp | 86 --
.../CPP/credentialcache_getenumerator.cpp | 92 --
.../CPP/dnspermission_constructor.cpp | 69 --
.../CPP/dnspermission_copy.cpp | 67 -
.../CPP/dnspermission_fromxml.cpp | 95 --
.../CPP/dnspermission_issubsetof.cpp | 84 --
.../CPP/dnspermission_isunrestricted.cpp | 73 --
.../CPP/dns_begin_endresolve.cpp | 80 --
.../CPP/dns_gethostbyaddress_ipaddress.cpp | 80 --
.../CPP/dns_gethostbyname.cpp | 73 --
.../Dns_GetHostName/CPP/dns_gethostname.cpp | 45 -
.../Dns_Resolve/CPP/dns_resolve.cpp | 84 --
.../CPP/filewebrequest_contentlength.cpp | 72 --
.../CPP/filewebrequest_reqbeginend.cpp | 118 --
.../CPP/filewebrequest_resbeginend.cpp | 105 --
.../CPP/filewebresponse_close.cpp | 58 -
...ewebresponse_contentlength_contenttype.cpp | 56 -
.../CPP/filewebresponse_getresponsestream.cpp | 77 --
.../CPP/filewebresponse_headers.cpp | 57 -
.../CPP/filewebresponse_responseuri.cpp | 56 -
.../CPP/httpversion_version10.cpp | 49 -
.../CPP/httpwebrequest_accept.cpp | 92 --
.../CPP/httpwebrequest_allowautoredirect.cpp | 60 -
...tpwebrequest_allowwritestreambuffering.cpp | 81 --
.../httpwebrequest_begingetrequeststream.cpp | 97 --
.../CPP/httpwebrequest_begingetresponse.cpp | 158 ---
.../CPP/httpwebrequest_connection.cpp | 94 --
.../CPP/httpwebrequest_contentlength.cpp | 102 --
.../CPP/httpwebrequest_headers.cpp | 57 -
.../CPP/httpwebrequest_ifmodifiedsince.cpp | 90 --
.../CPP/httpwebrequest_pipelined.cpp | 86 --
.../CPP/httpwebrequest_protocolversion.cpp | 67 -
.../CPP/httpwebrequest_referer.cpp | 89 --
.../CPP/httpwebrequest_sendchunked.cpp | 112 --
.../CPP/httpwebrequest_timeout.cpp | 61 -
.../CPP/httpwebrequest_useragent.cpp | 58 -
.../CPP/httpwebresponse_close.cpp | 52 -
.../CPP/source.cpp | 82 --
.../CPP/httpwebresponse_getresponseheader.cpp | 70 --
.../CPP/httpwebresponse_getresponsestream.cpp | 73 --
.../CPP/httpwebresponse_headers.cpp | 61 -
.../CPP/httpwebresponse_lastmodified.cpp | 67 -
.../CPP/httpwebresponse_method_server.cpp | 59 -
.../CPP/httpwebresponse_protocolversion.cpp | 59 -
.../CPP/httpwebresponse_responseuri.cpp | 63 -
...bresponse_statuscode_statusdescription.cpp | 56 -
.../CPP/httpwebrequest_haveresponse.cpp | 78 --
.../CPP/httpwebrequest_proxy.cpp | 110 --
.../ICredential/CPP/icredential.cpp | 125 --
.../CPP/ipaddress_broadcast_loopback.cpp | 33 -
.../CPP/ipaddress_networktohost.cpp | 87 --
.../IPAddress_None/CPP/ipaddress_none.cpp | 22 -
.../CPP/ipendpoint_properties.cpp | 123 --
.../CPP/iphostentry_addresslist.cpp | 59 -
.../CPP/iwebproxy_interface.cpp | 87 --
.../NCLAutoProxy/CPP/proxy.cpp | 235 ----
.../NCLCookies/CPP/cookiessnippets.cpp | 77 --
.../NCLEmptyWebProxy/CPP/test.cpp | 31 -
.../NCLFtpAsync/CPP/async.cpp | 227 ----
.../NCLFtpClient/CPP/ftptests.cpp | 842 -------------
.../NCLMailSync/CPP/NclMailSync.cpp | 1082 -----------------
.../NCLNetInfo2/CPP/networkexamples.cpp | 1010 ---------------
.../NCLNetInfoReport/CPP/netinfo.cpp | 603 ---------
.../CPP/NCLPhysicalAddress.cpp | 140 ---
.../NCLPingSampler/CPP/pingtest.cpp | 249 ----
.../NCLResponse1/CPP/httpwebrequest1.cpp | 51 -
.../NCLServicePoint/CPP/nclservicepoint.cpp | 88 --
.../NCLSimpleCache/CPP/NCLSimpleCache.cpp | 274 -----
.../CPP/nclsocketenhancements.cpp | 713 -----------
.../CPP/iocontrolserver.cpp | 68 --
.../NCLSocketIoControl1/CPP/iocontrolcode.cpp | 70 --
.../NCLTcpClientSync/CPP/tcpclient.cpp | 36 -
.../CPP/nclurienhancements.cpp | 150 ---
.../NCLUriExamples/CPP/uriexamples.cpp | 271 -----
.../NCLWebProxy/CPP/nclwebproxy.cpp | 186 ---
.../NCLWebRequestSimple/CPP/webrequestget.cpp | 45 -
.../CPP/source.cpp | 40 -
.../NclMailASync/cpp/mailasync.cpp | 94 --
.../NclNetAddressChanged1/CPP/changed.cpp | 27 -
.../NclPingAsync/CPP/asyncping.cpp | 115 --
.../NclPingSync/CPP/syncping.cpp | 48 -
.../NclSslClientSync/CPP/clientsync.cpp | 260 ----
.../CPP/NclSslServerAsync.cpp | 265 ----
.../NclSslServerSync/CPP/NclSslServerSync.cpp | 235 ----
.../NclTcpServerSync/cpp/tcplistener.cpp | 39 -
.../CPP/networkcredential_constructor2.cpp | 67 -
.../CPP/networkcredential_getcredential.cpp | 68 --
...orkcredential_username_password_domain.cpp | 74 --
.../CPP/source.cpp | 51 -
.../CPP/source.cpp | 108 --
.../SelectModeExample/CPP/source.cpp | 65 -
.../SerializationAttributes/CPP/s.cpp | 77 --
.../SocketPropertyTester/CPP/class1.cpp | 105 --
.../Socket_Select/CPP/source.cpp | 75 --
.../Socket_Send_Receive/CPP/source.cpp | 128 --
.../Socket_Socket_Options/CPP/source.cpp | 105 --
.../Socket_Sync_Send_Receive/CPP/source.cpp | 449 -------
.../CPP/custombasicauthentication.cpp | 355 ------
.../System.Net.Dns/CPP/dnsnewmethods.cpp | 145 ---
.../CPP/getresponse.cpp | 120 --
.../CPP/getrequeststream.cpp | 134 --
.../CPP/noneanyloopback.cpp | 140 ---
.../CPP/isloopback.cpp | 75 --
.../System.Net.IPAddress.Parse/CPP/parse.cpp | 73 --
.../System.Net.IPAddress/CPP/ipaddress.cpp | 142 ---
.../System.Net.IPEndPoint/CPP/ipendpoint.cpp | 230 ----
.../CPP/servicepoint.cpp | 203 ----
.../cpp/servicepoint.cpp | 241 ----
.../CPP/custombasicauthentication.cpp | 344 ------
.../CPP/listener.cpp | 130 --
.../CPP/sender.cpp | 107 --
.../CPP/beginconnect.cpp | 128 --
.../CPP/sendgeneric.cpp | 175 ---
.../CPP/tcpclient.cpp | 118 --
.../CPP/newtcpclient.cpp | 125 --
.../CPP/tcpserver.cpp | 226 ----
.../cpp/tcpserver.cpp | 150 ---
.../CPP/joinmulticastgroup.cpp | 326 -----
.../CPP/newudpclient.cpp | 88 --
.../cpp/asyncudp.cpp | 261 ----
.../CPP/source.cpp | 44 -
.../UriBuilderSample/cpp/main.cpp | 27 -
.../CPP/webexception_constructor1.cpp | 63 -
.../CPP/webexception_constructor2.cpp | 62 -
.../CPP/webexception_constructor3.cpp | 62 -
.../CPP/webexception_constructor4.cpp | 64 -
.../CPP/webexception_constructor5.cpp | 117 --
.../CPP/webexception_status_response.cpp | 40 -
.../CPP/webheadercollection_add.cpp | 67 -
.../CPP/webheadercollection_getvalues_1.cpp | 58 -
.../CPP/webheadercollection_isrestricted.cpp | 49 -
.../CPP/webheadercollection_remove.cpp | 79 --
.../CPP/webheadercollection_set.cpp | 65 -
.../CPP/webrequest_begingetrequest.cpp | 92 --
.../CPP/webrequest_contenttype.cpp | 95 --
.../CPP/webrequest_create.cpp | 60 -
.../CPP/webrequest_headers.cpp | 44 -
.../WebRequest_Proxy/CPP/webrequest_proxy.cpp | 108 --
.../CPP/webrequest_requesturi.cpp | 49 -
.../CPP/webrequest_timeout.cpp | 66 -
.../CPP/webresponse_close.cpp | 58 -
.../CPP/webresponse_contentlength_type.cpp | 59 -
.../CPP/webresponse_getresponsestream.cpp | 81 --
.../CPP/webresponse_headers.cpp | 64 -
.../CPP/webresponse_responseuri.cpp | 67 -
.../CPP/dnspermission_union_intersect.cpp | 97 --
196 files changed, 21467 deletions(-)
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/AuthenticationManager_UnRegister2/CPP/authenticationmanager_unregister2.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Authorization_Constructor3/CPP/authorization_constructor3.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Authorization_ProtectionRealm/CPP/authorization_protectionrealm.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic CredentialCache.Add Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic Dns Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic GlobalProxySelection Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic HttpWebRequest Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic HttpWebRequest.RequestUri Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic HttpWebResponse Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic LingerOption Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic NetworkCredential Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic ServicePoint Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic ServicePointManager.CertificatePolicy Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic Socket.Accept Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic Socket.Bind Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic Socket.Close Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic Socket.Connect Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic Socket.Listen Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic SocketAddressExample/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic TcpListener.PublicMethodsAndPropertiesExample/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic TcpListenerExample/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.ProtectedMethodsAndPropertiesExample/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic UdpClientExample/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic Uri Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic Uri.AbsolutePath Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic Uri.AbsoluteUri Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic Uri.Authority Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic Uri.CheckHostName Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic Uri.Host Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic Uri.PathAndQuery Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic Uri.Port Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic Uri.Scheme Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic Uri.Uri Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic Uri.Uri1 Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic Uri.Uri3 Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic Uri.Uri4 Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic UriBuilder.Fragment Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic UriBuilder.UriBuilder3 Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic UriBuilder.UriBuilder4 Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic UriBuilder.UriBuilder5 Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic UriBuilder.UriBuilder6 Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic WebProxy Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic WebRequest Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Classic WebRequest.WebRequest Example/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/ClassicTcpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/CookieCollection_Item_1/CPP/CookieCollection_Item_1.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/CookieCollection_Item_2/CPP/CookieCollection_Item_2.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/CredentialCache_Add_Remove/CPP/credentialcache_add_remove.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/CredentialCache_DefaultCredentials/CPP/credentialcache_defaultcredentials.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/CredentialCache_GetCredential/CPP/credentialcache_getcredential.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/CredentialCache_GetEnumerator/CPP/credentialcache_getenumerator.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/DnsPermission_Constructor/CPP/dnspermission_constructor.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/DnsPermission_Copy/CPP/dnspermission_copy.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/DnsPermission_FromXml/CPP/dnspermission_fromxml.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/DnsPermission_IsSubsetOf/CPP/dnspermission_issubsetof.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/DnsPermission_IsUnrestricted/CPP/dnspermission_isunrestricted.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Dns_Begin_EndResolve/CPP/dns_begin_endresolve.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Dns_GetHostByAddress_IPAddress/CPP/dns_gethostbyaddress_ipaddress.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Dns_GetHostByName/CPP/dns_gethostbyname.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Dns_GetHostName/CPP/dns_gethostname.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Dns_Resolve/CPP/dns_resolve.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/FileWebRequest_ContentLength/CPP/filewebrequest_contentlength.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/FileWebRequest_ReqBeginEnd/CPP/filewebrequest_reqbeginend.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/FileWebRequest_ResBeginEnd/CPP/filewebrequest_resbeginend.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/FileWebResponse_Close/CPP/filewebresponse_close.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/FileWebResponse_ContentLength_ContentType/CPP/filewebresponse_contentlength_contenttype.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/FileWebResponse_GetResponseStream/CPP/filewebresponse_getresponsestream.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/FileWebResponse_Headers/CPP/filewebresponse_headers.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/FileWebResponse_ResponseUri/CPP/filewebresponse_responseuri.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpVersion_Version10/CPP/httpversion_version10.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_Accept/CPP/httpwebrequest_accept.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_AllowAutoRedirect/CPP/httpwebrequest_allowautoredirect.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_AllowWriteStreamBuffering/CPP/httpwebrequest_allowwritestreambuffering.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_BeginGetRequestStream/CPP/httpwebrequest_begingetrequeststream.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_BeginGetResponse/CPP/httpwebrequest_begingetresponse.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_Connection/CPP/httpwebrequest_connection.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_ContentLength/CPP/httpwebrequest_contentlength.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_Headers/CPP/httpwebrequest_headers.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_IfModifiedSince/CPP/httpwebrequest_ifmodifiedsince.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_PipeLined/CPP/httpwebrequest_pipelined.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_ProtocolVersion/CPP/httpwebrequest_protocolversion.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_Referer/CPP/httpwebrequest_referer.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_SendChunked/CPP/httpwebrequest_sendchunked.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_Timeout/CPP/httpwebrequest_timeout.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebRequest_UserAgent/CPP/httpwebrequest_useragent.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_Close/CPP/httpwebresponse_close.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_ContentEncoding_CharacterSet/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_GetResponseHeader/CPP/httpwebresponse_getresponseheader.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_GetResponseStream/CPP/httpwebresponse_getresponsestream.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_Headers/CPP/httpwebresponse_headers.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_LastModified/CPP/httpwebresponse_lastmodified.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_Method_Server/CPP/httpwebresponse_method_server.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_ProtocolVersion/CPP/httpwebresponse_protocolversion.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_ResponseUri/CPP/httpwebresponse_responseuri.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_StatusCode_StatusDescription/CPP/httpwebresponse_statuscode_statusdescription.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Httpwebrequest_HaveResponse/CPP/httpwebrequest_haveresponse.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Httpwebrequest_proxy/CPP/httpwebrequest_proxy.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/ICredential/CPP/icredential.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/IPAddress_Broadcast_Loopback/CPP/ipaddress_broadcast_loopback.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/IPAddress_NetworkToHost/CPP/ipaddress_networktohost.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/IPAddress_None/CPP/ipaddress_none.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/IPEndPoint_Properties/CPP/ipendpoint_properties.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/IPHostEntry_AddressList/CPP/iphostentry_addresslist.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/IWebProxy_Interface/CPP/iwebproxy_interface.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCLAutoProxy/CPP/proxy.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCLEmptyWebProxy/CPP/test.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCLFtpAsync/CPP/async.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCLFtpClient/CPP/ftptests.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCLMailSync/CPP/NclMailSync.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCLNetInfo2/CPP/networkexamples.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCLNetInfoReport/CPP/netinfo.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCLPhysicalAddress/CPP/NCLPhysicalAddress.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCLPingSampler/CPP/pingtest.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCLResponse1/CPP/httpwebrequest1.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCLServicePoint/CPP/nclservicepoint.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCLSimpleCache/CPP/NCLSimpleCache.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCLSocketEnhancements/CPP/nclsocketenhancements.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCLSocketIoControl/CPP/iocontrolserver.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCLSocketIoControl1/CPP/iocontrolcode.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCLTcpClientSync/CPP/tcpclient.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCLUriEnhancements/CPP/nclurienhancements.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCLUriExamples/CPP/uriexamples.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCLWebProxy/CPP/nclwebproxy.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCLWebRequestSimple/CPP/webrequestget.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NCL_Credential.Cache.Add_SMTP/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NclMailASync/cpp/mailasync.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NclNetAddressChanged1/CPP/changed.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NclPingAsync/CPP/asyncping.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NclPingSync/CPP/syncping.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NclSslClientSync/CPP/clientsync.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NclSslServerAsync/CPP/NclSslServerAsync.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NclSslServerSync/CPP/NclSslServerSync.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NclTcpServerSync/cpp/tcplistener.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NetworkCredential_Constructor2/CPP/networkcredential_constructor2.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NetworkCredential_GetCredential/CPP/networkcredential_getcredential.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NetworkCredential_UserName_Password_Domain/CPP/networkcredential_username_password_domain.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NetworkStream_Protected_Members/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/NetworkStream_Synch_SendAndReceive/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/SelectModeExample/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/SerializationAttributes/CPP/s.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/SocketPropertyTester/CPP/class1.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Socket_Select/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Socket_Send_Receive/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Socket_Socket_Options/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/Socket_Sync_Send_Receive/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.Authentication/CPP/custombasicauthentication.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.Dns/CPP/dnsnewmethods.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.FileWebRequest.GetResponse/CPP/getresponse.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.FileWebRequest/CPP/getrequeststream.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.IPAddress.IPv6NoneAnyLoopback/CPP/noneanyloopback.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.IPAddress.IsLoopback/CPP/isloopback.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.IPAddress.Parse/CPP/parse.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.IPAddress/CPP/ipaddress.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.IPEndPoint/CPP/ipendpoint.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePoint/CPP/servicepoint.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.ServicePointWhidbey/cpp/servicepoint.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.Authentication/CPP/custombasicauthentication.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.MulticastOptionListener/CPP/listener.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.MulticastOptionSender/CPP/sender.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.Socket.BeginConnect/CPP/beginconnect.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.Socketgenerics/CPP/sendgeneric.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.TcpClient/CPP/tcpclient.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.TcpClient1/CPP/newtcpclient.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.TcpListener/CPP/tcpserver.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.TcpListener1/cpp/tcpserver.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient.JoinMulticastGroup/CPP/joinmulticastgroup.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient/CPP/newudpclient.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient1/cpp/asyncudp.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/TcpListener_Pending_LocalEndPoint/CPP/source.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/UriBuilderSample/cpp/main.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebException_Constructor1/CPP/webexception_constructor1.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebException_Constructor2/CPP/webexception_constructor2.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebException_Constructor3/CPP/webexception_constructor3.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebException_Constructor4/CPP/webexception_constructor4.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebException_Constructor5/CPP/webexception_constructor5.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebException_Status_Response/CPP/webexception_status_response.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebHeaderCollection_Add/CPP/webheadercollection_add.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebHeaderCollection_GetValues_1/CPP/webheadercollection_getvalues_1.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebHeaderCollection_IsRestricted/CPP/webheadercollection_isrestricted.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebHeaderCollection_Remove/CPP/webheadercollection_remove.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebHeaderCollection_Set/CPP/webheadercollection_set.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebRequest_BeginGetRequest/CPP/webrequest_begingetrequest.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebRequest_ContentType/CPP/webrequest_contenttype.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebRequest_Create/CPP/webrequest_create.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebRequest_Headers/CPP/webrequest_headers.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebRequest_Proxy/CPP/webrequest_proxy.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebRequest_RequestUri1/CPP/webrequest_requesturi.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebRequest_Timeout/CPP/webrequest_timeout.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebResponse_Close/CPP/webresponse_close.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebResponse_ContentLength_Type/CPP/webresponse_contentlength_type.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebResponse_GetResponseStream/CPP/webresponse_getresponsestream.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebResponse_Headers/CPP/webresponse_headers.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/WebResponse_ResponseUri/CPP/webresponse_responseuri.cpp
delete mode 100644 snippets/cpp/VS_Snippets_Remoting/dnspermission_union_intersect/CPP/dnspermission_union_intersect.cpp
diff --git a/snippets/cpp/VS_Snippets_Remoting/AuthenticationManager_UnRegister2/CPP/authenticationmanager_unregister2.cpp b/snippets/cpp/VS_Snippets_Remoting/AuthenticationManager_UnRegister2/CPP/authenticationmanager_unregister2.cpp
deleted file mode 100644
index eaec1a8cfc9..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/AuthenticationManager_UnRegister2/CPP/authenticationmanager_unregister2.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-// System.Net.AuthenticationManager.UnRegister(String).
-// System.Net.AuthenticationManager.Register.
-// Grouping Clause : 1,3 AND 2,3.
-
-/*This program demonstrates the 'UnRegister(String)' and 'Register' methods of
-'AuthenticationManager' class. It gets all the authentication modules registered with the system into an
-IEnumerator instance ,unregisters the first authentication module and displays to show that it was
-unregistered. Then registers the same module back again and displays all the modules again.*/
-
-#using
-
-using namespace System;
-using namespace System::Net;
-using namespace System::Collections;
-
-//
-void DisplayAllModules()
-{
- IEnumerator^ registeredModules = AuthenticationManager::RegisteredModules;
- Console::WriteLine( "\n\tThe following modules are now registered with the system:" );
- while ( registeredModules->MoveNext() )
- {
- Console::WriteLine( "\n\t\tModule : {0}", registeredModules->Current );
- IAuthenticationModule^ currentAuthenticationModule = dynamic_cast(registeredModules->Current);
- Console::WriteLine( "\t\t\t CanPreAuthenticate : {0}", currentAuthenticationModule->CanPreAuthenticate );
- }
-}
-//
-
-int main()
-{
- try
- {
-//
-//
- IEnumerator^ registeredModules = AuthenticationManager::RegisteredModules;
- // Display all the modules that are already registered with the system.
- DisplayAllModules();
- registeredModules->Reset();
- registeredModules->MoveNext();
- // Get the first Authentication module registered with the system.
- IAuthenticationModule^ authenticationModule1 = dynamic_cast(registeredModules->Current);
- // Call the UnRegister() method to unregister the first authentication module from the system.
- String^ authenticationScheme = authenticationModule1->AuthenticationType;
- AuthenticationManager::Unregister( authenticationScheme );
- Console::WriteLine( "\nSuccessfully unregistered '{0}'.", authenticationModule1 );
- // Display all modules to see that the module was unregistered.
- DisplayAllModules();
-//
- // Calling 'Register()' method to register 'authenticationModule1' module back again.
- AuthenticationManager::Register( authenticationModule1 );
- Console::WriteLine( "\nSuccessfully re-registered '{0}'.", authenticationModule1 );
- // Display the modules to verify that 'authenticationModule1' has been registered back again.
- DisplayAllModules();
-//
- Console::WriteLine( "Press any key to continue" );
- Console::ReadLine();
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( "\n The following Exception was raised : {0}", e->Message );
- }
-}
diff --git a/snippets/cpp/VS_Snippets_Remoting/Authorization_Constructor3/CPP/authorization_constructor3.cpp b/snippets/cpp/VS_Snippets_Remoting/Authorization_Constructor3/CPP/authorization_constructor3.cpp
deleted file mode 100644
index 9d25d5c5604..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Authorization_Constructor3/CPP/authorization_constructor3.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-// System::Net::Authorization::Authorization(String*, bool, String*)
-/* This program demonstrates the contructor 'Authorization(String*, bool, String*)' of the authorization
-* class.
-*
-* We implement the interface S"IAuthenticationModule*" to make CloneBasic which is a custom authentication module.
-* The custom authentication module encodes username and password as base64 strings and then returns
-* back an authorization instance. This authorization is internally used by the HttpWebRequest for
-* authentication.
-* *
-* Please Note : This program has to be compiled as a dll.
-*/
-#using
-
-using namespace System;
-using namespace System::Net;
-using namespace System::Text;
-
-namespace CloneBasicAuthentication
-{
- public ref class CloneBasic: public IAuthenticationModule
- {
- private:
- String^ m_authenticationType;
- bool m_canPreAuthenticate;
-
- public:
- CloneBasic()
- {
- m_authenticationType = "CloneBasic";
- m_canPreAuthenticate = false;
- }
-
- property String^ AuthenticationType
- {
- virtual String^ get()
- {
- return m_authenticationType;
- }
- }
-
- property bool CanPreAuthenticate
- {
- virtual bool get()
- {
- return m_canPreAuthenticate;
- }
- }
-
- //
- virtual Authorization^ Authenticate( String^ challenge, WebRequest^ request, ICredentials^ credentials )
- {
- try
- {
- String^ message;
-
- // Check if Challenge String* was raised by a site which requires CloneBasic authentication.
- if ( (challenge == nullptr) || ( !challenge->StartsWith( "CloneBasic" )) )
- return nullptr;
- NetworkCredential^ myCredentials;
- if ( dynamic_cast(credentials) == nullptr )
- {
- myCredentials = credentials->GetCredential( request->RequestUri, "CloneBasic" );
- if ( myCredentials == nullptr )
- return nullptr;
- }
- else
- myCredentials = dynamic_cast(credentials);
-
- // Message encryption scheme :
- // a)Concatenate username and password seperated by space;
- // b)Apply ASCII encoding to obtain a stream of bytes;
- // c)Apply Base64 Encoding to this array of bytes to obtain our encoded authorization message.
- message = String::Concat( myCredentials->UserName, " ", myCredentials->Password );
-
- // Apply AsciiEncoding to our user name and password to obtain it as an array of bytes.
- Encoding^ asciiEncoding = Encoding::ASCII;
- array^byteArray = gcnew array(asciiEncoding->GetByteCount( message ));
- byteArray = asciiEncoding->GetBytes( message );
-
- // Perform Base64 transform.
- message = Convert::ToBase64String( byteArray );
-
- // The following overloaded contructor sets the 'Message' property of authorization to the base64 String*;
- // that we just formed and it also sets the 'Complete' property to true and the connection group id;
- // to the domain of the NetworkCredential Object*.
- Authorization^ myAuthorization = gcnew Authorization( String::Concat( "CloneBasic ", message, true, request->ConnectionGroupName ) );
- return myAuthorization;
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( "Exception Raised ...: {0}", e->Message );
- return nullptr;
- }
- }
- //
-
- virtual Authorization^ PreAuthenticate( WebRequest^ request, ICredentials^ credentials )
- {
- return nullptr;
- }
- };
-}
diff --git a/snippets/cpp/VS_Snippets_Remoting/Authorization_ProtectionRealm/CPP/authorization_protectionrealm.cpp b/snippets/cpp/VS_Snippets_Remoting/Authorization_ProtectionRealm/CPP/authorization_protectionrealm.cpp
deleted file mode 100644
index 6f0a633e81e..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Authorization_ProtectionRealm/CPP/authorization_protectionrealm.cpp
+++ /dev/null
@@ -1,192 +0,0 @@
-
-
-// System::Net::Authorization::Authorization(String*, bool);System::Net::Authorization::ProtectionRealm
-/* This program demonstrates the 'ProtectionRealm' property and 'Authorization(String*, bool)' constructor of
-the S"Authorization" class. The S"IAuthenticationModule*" interface is implemented in 'CloneBasic' to make
-it a custom authentication module. The custom authentication module encodes username and password as
-base64 strings and then returns back an 'Authorization' instance. The 'Authorization' instance encapsulates
-a list of Uri's for which it is applicable using the S"ProtectionRealm" property.
-*/
-#using
-
-using namespace System;
-using namespace System::Net;
-using namespace System::Text;
-void GetPage( String^ url, String^ username, String^ passwd )
-{
- try
- {
- String^ challenge = nullptr;
- HttpWebRequest^ myHttpWebRequest = nullptr;
- try
- {
- // Create a 'HttpWebRequest' Object* for the above 'url'.
- myHttpWebRequest = dynamic_cast(WebRequest::Create( url ));
-
- // The following method call throws the 'WebException'.
- HttpWebResponse^ myHttpWebResponse = dynamic_cast(myHttpWebRequest->GetResponse());
-
- // Release resources of response Object*.
- myHttpWebResponse->Close();
- }
- catch ( WebException^ e )
- {
- for ( int i = 0; i < e->Response->Headers->Count; ++i )
-
- // Retrieve the challenge String* from the header S"WWW-Authenticate".
- if ( (String::Compare( e->Response->Headers->Keys[ i ], "WWW-Authenticate", true ) == 0) )
- challenge = e->Response->Headers[ i ];
- }
-
- if ( challenge != nullptr )
- {
- // Challenge was raised by the client.Declare your credentials.
- NetworkCredential^ myCredentials = gcnew NetworkCredential( username,passwd );
-
- // Pass the challenge , 'NetworkCredential' Object* and the 'HttpWebRequest' Object* to the
- // 'Authenticate' method of the S"AuthenticationManager" to retrieve an S"Authorization" ;
- // instance.
- Authorization^ urlAuthorization = AuthenticationManager::Authenticate( challenge, myHttpWebRequest, myCredentials );
- if ( urlAuthorization != nullptr )
- {
- Console::WriteLine( "\nSuccessfully Created 'Authorization' object with authorization Message:\n \" {0}\"", urlAuthorization->Message );
- Console::WriteLine( "\n\nThis authorization is valid for the following Uri's:" );
- int count = 0;
- System::Collections::IEnumerator^ myEnum = urlAuthorization->ProtectionRealm->GetEnumerator();
- while ( myEnum->MoveNext() )
- {
- String^ uri = safe_cast(myEnum->Current);
- ++count;
- Console::WriteLine( "\nUri->Item[ {0}]: {1}", count, uri );
- }
- }
- else
- Console::WriteLine( "\nAuthorization Object* was returned as 0. Please check if site accepts 'CloneBasic' authentication" );
- }
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( "\n The following exception was raised : {0}", e->Message );
- }
-}
-
-void PrintUsage()
-{
- Console::WriteLine( "\r\nUsage: Try a site which requires CloneBasic(custom made) authentication as below" );
- Console::WriteLine( " Authorization_ProtectionRealm URLname username password" );
- Console::WriteLine( "\nExample:" );
- Console::WriteLine( "\n Authorization_ProtectionRealm http://www.microsoft.com/net/ george george123" );
-}
-
-// The 'CloneBasic' authentication module class implements 'IAuthenticationModule*'.
-public ref class CloneBasic: public IAuthenticationModule
-{
-private:
- String^ m_authenticationType;
- bool m_canPreAuthenticate;
-
-public:
- CloneBasic()
- {
- m_authenticationType = "CloneBasic";
- m_canPreAuthenticate = false;
- }
-
- property String^ AuthenticationType
- {
- virtual String^ get()
- {
- return m_authenticationType;
- }
- }
-
- property bool CanPreAuthenticate
- {
- virtual bool get()
- {
- return m_canPreAuthenticate;
- }
- }
-
- //
- //
- virtual Authorization^ Authenticate( String^ challenge, WebRequest^ request, ICredentials^ credentials )
- {
- try
- {
- String^ message;
-
- // Check if Challenge String* was raised by a site which requires 'CloneBasic' authentication.
- if ( (challenge == nullptr) || ( !challenge->StartsWith( "CloneBasic" )) )
- return nullptr;
- NetworkCredential^ myCredentials;
- if ( dynamic_cast(credentials) == nullptr )
- {
- myCredentials = credentials->GetCredential( request->RequestUri, "CloneBasic" );
- if ( myCredentials == nullptr )
- return nullptr;
- }
- else
- myCredentials = dynamic_cast(credentials);
-
- // Message encryption scheme :
- // a)Concatenate username and password seperated by space;
- // b)Apply ASCII encoding to obtain a stream of bytes;
- // c)Apply Base64 Encoding to this array of bytes to obtain our encoded authorization message.
- message = String::Concat( myCredentials->UserName, " ", myCredentials->Password );
-
- // Apply AsciiEncoding to 'message' String* to obtain it as an array of bytes.
- Encoding^ ascii = Encoding::ASCII;
- array^byteArray = gcnew array(ascii->GetByteCount( message ));
- byteArray = ascii->GetBytes( message );
-
- // Performing Base64 transformation.
- message = Convert::ToBase64String( byteArray );
- Authorization^ myAuthorization = gcnew Authorization( String::Concat( "CloneBasic ", message, true ) );
- array^protectionRealm = gcnew array(1);
- protectionRealm[ 0 ] = request->RequestUri->AbsolutePath;
- myAuthorization->ProtectionRealm = protectionRealm;
- return myAuthorization;
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( "The following exception was raised in Authenticate method: {0}", e->Message );
- return nullptr;
- }
- }
- //
- //
-
- virtual Authorization^ PreAuthenticate( WebRequest^ request, ICredentials^ credentials )
- {
- return nullptr;
- }
-};
-
-// The 'Client' class is defined here to test the above custom authentication module.
-int main()
-{
- array^args = Environment::GetCommandLineArgs();
- String^ url;
- String^ userName;
- String^ passwd;
- if ( args->Length < 3 )
- {
- PrintUsage();
- return 0;
- }
- else
- {
- url = args[ 0 ];
- userName = args[ 1 ];
- passwd = args[ 2 ];
- }
-
- Console::WriteLine();
- CloneBasic^ authenticationModule = gcnew CloneBasic;
- AuthenticationManager::Register( authenticationModule );
- AuthenticationManager::Unregister( "Basic" );
-
- // Get response from Uri.
- GetPage( url, userName, passwd );
-}
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic CredentialCache.Add Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic CredentialCache.Add Example/CPP/source.cpp
deleted file mode 100644
index eb8a5c280ac..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic CredentialCache.Add Example/CPP/source.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-#using
-
-using namespace System;
-using namespace System::Net;
-public ref class Class
-{
-private:
- void Method1()
- {
- String^ UserName = Console::ReadLine();
- String^ SecurelyStoredPassword = Console::ReadLine();
- String^ Domain = Console::ReadLine();
-
- WebRequest^ wReq = WebRequest::Create( "http://www.contoso.com" );
-
- //
- CredentialCache^ myCache = gcnew CredentialCache;
-
- myCache->Add( gcnew Uri( "http://www.contoso.com/" ), "Basic", gcnew NetworkCredential( UserName,SecurelyStoredPassword ) );
- myCache->Add( gcnew Uri( "http://www.contoso.com/" ), "Digest", gcnew NetworkCredential( UserName,SecurelyStoredPassword,Domain ) );
-
- wReq->Credentials = myCache;
- //
- }
-};
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic Dns Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic Dns Example/CPP/source.cpp
deleted file mode 100644
index 1902e81255b..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic Dns Example/CPP/source.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#using
-#using
-#using
-#using
-
-using namespace System;
-using namespace System::Data;
-using namespace System::Net;
-using namespace System::Windows::Forms;
-public ref class Form1: public Form
-
-{
-protected:
- void Method()
- {
- //
- IPHostEntry^ hostInfo = Dns::GetHostEntry( "www.contoso.com" );
- //
- }
-};
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic GlobalProxySelection Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic GlobalProxySelection Example/CPP/source.cpp
deleted file mode 100644
index e4aa5aedcd2..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic GlobalProxySelection Example/CPP/source.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#using
-#using
-#using
-
-using namespace System;
-using namespace System::Net;
-using namespace System::IO;
-using namespace System::Windows::Forms;
-
-public ref class Form1: public Form
-{
-public:
- void Method()
- {
- //
- Uri^ proxyURI = gcnew Uri( "http://webproxy:80" );
- GlobalProxySelection::Select = gcnew WebProxy( proxyURI );
- //
- }
-};
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic HttpWebRequest Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic HttpWebRequest Example/CPP/source.cpp
deleted file mode 100644
index 16cbdf361c8..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic HttpWebRequest Example/CPP/source.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-#using
-
-using namespace System;
-using namespace System::Net;
-public ref class Sample
-{
-public:
- void Method()
- {
- //
- HttpWebRequest^ myReq = dynamic_cast(WebRequest::Create( "http://www.contoso.com/" ));
- //
- }
-};
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic HttpWebRequest.RequestUri Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic HttpWebRequest.RequestUri Example/CPP/source.cpp
deleted file mode 100644
index 352469e1bea..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic HttpWebRequest.RequestUri Example/CPP/source.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-#using
-#using
-#using
-
-using namespace System;
-using namespace System::Net;
-using namespace System::Web;
-using namespace System::Web::UI;
-
-public ref class Page1: public Page
-{
-private:
- void Page_Load( Object^, EventArgs^ )
- {
- HttpWebRequest^ req = dynamic_cast(WebRequest::Create( "http://www.contoso.com/" ));
-
- //
- bool hasChanged = req->RequestUri->Equals( req->Address );
- //
- }
-};
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic HttpWebResponse Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic HttpWebResponse Example/CPP/source.cpp
deleted file mode 100644
index 945bd743eee..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic HttpWebResponse Example/CPP/source.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-#using
-#using
-#using
-
-using namespace System;
-using namespace System::Net;
-using namespace System::Web;
-using namespace System::Web::UI;
-
-public ref class Page1: public Page
-{
-private:
- void Page_Load( Object^, EventArgs^ )
- {
- //
- HttpWebRequest^ HttpWReq = dynamic_cast(WebRequest::Create( "http://www.contoso.com" ));
- HttpWebResponse^ HttpWResp = dynamic_cast(HttpWReq->GetResponse());
-
- // Insert code that uses the response object.
- HttpWResp->Close();
- //
- }
-};
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic LingerOption Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic LingerOption Example/CPP/source.cpp
deleted file mode 100644
index ef840b46dcf..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic LingerOption Example/CPP/source.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-#using
-
-using namespace System;
-using namespace System::IO;
-using namespace System::Net;
-using namespace System::Net::Sockets;
-
-public ref class Sample
-{
-protected:
- void Method( Socket^ mySocket )
- {
- //
- LingerOption^ myOpts = gcnew LingerOption( true,1 );
- mySocket->SetSocketOption( SocketOptionLevel::Socket, SocketOptionName::Linger, myOpts );
- //
- }
-};
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic NetworkCredential Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic NetworkCredential Example/CPP/source.cpp
deleted file mode 100644
index c92542655c2..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic NetworkCredential Example/CPP/source.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-#using
-#using
-#using
-
-using namespace System;
-using namespace System::Net;
-using namespace System::Net::Http;
-using namespace System::IO;
-using namespace System::Windows::Forms;
-
-public ref class Form1: public Form
-{
-public:
- void Method()
- {
- String^ SecurelyStoredUserName = "";
- String^ SecurelyStoredPassword = "";
- String^ SecurelyStoredDomain = "";
-
- //
- NetworkCredential^ myCred = gcnew NetworkCredential(
- SecurelyStoredUserName,SecurelyStoredPassword,SecurelyStoredDomain );
-
- CredentialCache^ myCache = gcnew CredentialCache;
-
- myCache->Add( gcnew Uri( "http://www.contoso.com" ), "Basic", myCred );
- myCache->Add( gcnew Uri( "http://app.contoso.com" ), "Basic", myCred );
-
- // HttpClient lifecycle management best practices:
- // https://learn.microsoft.com/dotnet/fundamentals/networking/http/httpclient-guidelines#recommended-use
- HttpClientHandler^ handler = gcnew HttpClientHandler();
- handler->Credentials = myCache;
- HttpClient^ client = gcnew HttpClient(handler);
- //
- }
-};
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic ServicePoint Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic ServicePoint Example/CPP/source.cpp
deleted file mode 100644
index 1a04a196a24..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic ServicePoint Example/CPP/source.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#using
-#using
-#using
-
-using namespace System;
-using namespace System::Net;
-using namespace System::IO;
-using namespace System::Windows::Forms;
-
-public ref class Form1: public Form
-{
-public:
- void Method()
- {
- //
- Uri^ myUri = gcnew Uri( "http://www.contoso.com/" );
- ServicePoint^ mySP = ServicePointManager::FindServicePoint( myUri );
- //
- }
-};
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic ServicePointManager.CertificatePolicy Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic ServicePointManager.CertificatePolicy Example/CPP/source.cpp
deleted file mode 100644
index 7a9fdb44639..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic ServicePointManager.CertificatePolicy Example/CPP/source.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-#using
-#using
-#using
-#using
-
-using namespace System;
-using namespace System::Net;
-using namespace System::IO;
-using namespace System::Windows::Forms;
-using namespace System::Web;
-using namespace System::Web::Services;
-
-// Class added so sample will compile
-public ref class MyCertificatePolicy: public ICertificatePolicy
-{
-public:
- virtual bool CheckValidationResult( System::Net::ServicePoint^, System::Security::Cryptography::X509Certificates::X509Certificate^, System::Net::WebRequest^, int )
- {
- return true;
- }
-};
-
-public ref class Form1: public Form
-{
-public:
- void Method( Uri^ myUri )
- {
- //
- ServicePointManager::CertificatePolicy = gcnew MyCertificatePolicy;
-
- // Create the request and receive the response
- try
- {
- WebRequest^ myRequest = WebRequest::Create( myUri );
- WebResponse^ myResponse = myRequest->GetResponse();
- ProcessResponse( myResponse );
- myResponse->Close();
- }
- // Catch any exceptions
- catch ( WebException^ e )
- {
- if ( e->Status == WebExceptionStatus::TrustFailure )
- {
- // Code for handling security certificate problems goes here.
- }
- // Other exception handling goes here
- }
- //
- }
-
- // Method added so sample will compile
- void ProcessResponse( WebResponse^ ){}
-};
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Accept Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Accept Example/CPP/source.cpp
deleted file mode 100644
index e1e657e660b..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Accept Example/CPP/source.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-#using
-
-using namespace System;
-using namespace System::IO;
-using namespace System::Net;
-using namespace System::Net::Sockets;
-
-public ref class Sample
-{
- //
-protected:
- void AcceptMethod( Socket^ listeningSocket )
- {
- Socket^ mySocket = listeningSocket->Accept();
- }
- //
-};
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Bind Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Bind Example/CPP/source.cpp
deleted file mode 100644
index 6c46b3b92d7..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Bind Example/CPP/source.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-#using
-
-using namespace System;
-using namespace System::IO;
-using namespace System::Net;
-using namespace System::Net::Sockets;
-
-public ref class Sample
-{
-protected:
- void Method( Socket^ aSocket, EndPoint^ anEndPoint )
- {
- //
- try
- {
- aSocket->Bind( anEndPoint );
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( "Winsock error: {0}", e );
- }
- //
- }
-};
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Close Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Close Example/CPP/source.cpp
deleted file mode 100644
index 2e51128de63..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Close Example/CPP/source.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-#using
-
-using namespace System;
-using namespace System::IO;
-using namespace System::Net;
-using namespace System::Net::Sockets;
-using namespace System::Security::Permissions;
-
-public ref class Sample
-{
-protected:
- [SecurityPermission(SecurityAction::Demand, Flags=SecurityPermissionFlag::UnmanagedCode)]
- void Method( Socket^ aSocket )
- {
- //
- try
- {
- aSocket->Shutdown(SocketShutdown::Both);
- aSocket->Close();
- }
- catch (...)
- {
- aSocket->Close();
- throw;
- }
-
- if ( aSocket->Connected )
- {
- Console::WriteLine( "Winsock error: {0}", Convert::ToString(
- System::Runtime::InteropServices::Marshal::GetLastWin32Error() ) );
- }
- //
- }
-};
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Connect Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Connect Example/CPP/source.cpp
deleted file mode 100644
index 6693a8bdfcc..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Connect Example/CPP/source.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-#using
-
-using namespace System;
-using namespace System::IO;
-using namespace System::Net;
-using namespace System::Net::Sockets;
-
-static void ConnectAndCheck( Socket^ client, EndPoint^ anEndPoint )
-{
- //
- client->Connect( anEndPoint );
- if ( !client->Connected )
- {
- Console::WriteLine( "Winsock error: {0}", Convert::ToString(
- System::Runtime::InteropServices::Marshal::GetLastWin32Error() ) );
- }
-
- // This is how you can determine whether a socket is still connected.
- bool blockingState = client->Blocking;
- try
- {
- array^tmp = gcnew array(1);
- client->Blocking = false;
- client->Send( tmp, 0, static_cast(0) );
- Console::WriteLine( L"Connected!" );
- }
- catch ( SocketException^ e )
- {
- // 10035 == WSAEWOULDBLOCK
- if ( e->NativeErrorCode.Equals( 10035 ) )
- {
- Console::WriteLine( "Connected from an exception!" );
- }
- else
- {
- Console::WriteLine( "Disconnected: {0}!", e->NativeErrorCode );
- }
- }
- finally
- {
- client->Blocking = blockingState;
- }
-
- Console::WriteLine( "Connected: {0}", client->Connected );
- //
-}
-
-[STAThread]
-int main()
-{
- Socket^ s = gcnew Socket( AddressFamily::InterNetwork,
- SocketType::Stream,
- ProtocolType::Tcp );
-
- String^ host = "localhost";
- int port = 80;
-
- IPHostEntry^ hostEntry = Dns::Resolve( host );
- IPEndPoint^ EPHost = gcnew IPEndPoint( hostEntry->AddressList[ 0 ],port );
-
- ConnectAndCheck( s, EPHost );
-}
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Listen Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Listen Example/CPP/source.cpp
deleted file mode 100644
index 66f68944d86..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic Socket.Listen Example/CPP/source.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-#using
-
-using namespace System;
-using namespace System::IO;
-using namespace System::Net;
-using namespace System::Net::Sockets;
-
-void CreateAndListen( int port, int backlog )
-{
- //
- // create the socket
- Socket^ listenSocket = gcnew Socket( AddressFamily::InterNetwork,
- SocketType::Stream,
- ProtocolType::Tcp );
-
- // bind the listening socket to the port
- IPAddress^ hostIP = ( Dns::Resolve( IPAddress::Any->ToString() ) )->AddressList[ 0 ];
- IPEndPoint^ ep = gcnew IPEndPoint( hostIP,port );
- listenSocket->Bind( ep );
-
- // start listening
- listenSocket->Listen( backlog );
- //
-}
-
-[STAThread]
-int main()
-{
- CreateAndListen( 10042, 10 );
- Console::WriteLine( "enter to exit" );
- Console::Read();
-}
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic SocketAddressExample/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic SocketAddressExample/CPP/source.cpp
deleted file mode 100644
index 27d0003bd8b..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic SocketAddressExample/CPP/source.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-#using
-
-using namespace System;
-using namespace System::Text;
-using namespace System::Net;
-using namespace System::Net::Sockets;
-
-void MySerializeIPEndPointClassMethod()
-{
- //
- //Creates an IpEndPoint.
- IPAddress^ ipAddress = Dns::Resolve( "www.contoso.com" )->AddressList[ 0 ];
- IPEndPoint^ ipLocalEndPoint = gcnew IPEndPoint( ipAddress,11000 );
-
- //Serializes the IPEndPoint.
- SocketAddress^ socketAddress = ipLocalEndPoint->Serialize();
-
- //Verifies that ipLocalEndPoint is now serialized by printing its contents.
- Console::WriteLine( "Contents of the socketAddress are: {0}", socketAddress );
- //Checks the Family property.
- Console::WriteLine( "The address family of the socketAddress is: {0}", socketAddress->Family );
- //Checks the underlying buffer size.
- Console::WriteLine( "The size of the underlying buffer is: {0}", socketAddress->Size );
- //
-}
-
-int main()
-{
- MySerializeIPEndPointClassMethod();
-}
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic TcpListener.PublicMethodsAndPropertiesExample/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic TcpListener.PublicMethodsAndPropertiesExample/CPP/source.cpp
deleted file mode 100644
index 719fbbc6521..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic TcpListener.PublicMethodsAndPropertiesExample/CPP/source.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-#using
-
-using namespace System;
-using namespace System::Net;
-using namespace System::Net::Sockets;
-using namespace System::Text;
-using namespace System::Threading;
-
-int main()
-{
- array^args = Environment::GetCommandLineArgs();
- if ( args->Length == 1 )
- {
- Console::WriteLine( "Enter a selection" );
- return 0;
- }
-
- if ( args[ 1 ] == "endpointExample" )
- {
- //
- //Creates an instance of the TcpListener class by providing a local endpoint.
-
- IPAddress^ ipAddress = Dns::Resolve( Dns::GetHostName() )->AddressList[ 0 ];
- IPEndPoint^ ipLocalEndPoint = gcnew IPEndPoint( ipAddress,11000 );
-
- try
- {
- TcpListener^ tcpListener = gcnew TcpListener( ipLocalEndPoint );
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( e->ToString() );
- }
- //
- }
- else
- if ( args[ 1 ] == "ipAddressExample" )
- {
- //
- //Creates an instance of the TcpListener class by providing a local IP address and port number.
-
- IPAddress^ ipAddress = Dns::Resolve( "localhost" )->AddressList[ 0 ];
-
- try
- {
- TcpListener^ tcpListener = gcnew TcpListener( ipAddress,13 );
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( e->ToString() );
- }
- //
- }
- else
- if ( args[ 1 ] == "portNumberExample" )
- {
- //
- //Creates an instance of the TcpListener class by providing a local port number.
-
- IPAddress^ ipAddress = Dns::Resolve( "localhost" )->AddressList[ 0 ];
-
- try
- {
- TcpListener^ tcpListener = gcnew TcpListener( ipAddress,13 );
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( e->ToString() );
- }
- //
- }
- else
- {
- IPAddress^ ipAddress = Dns::Resolve( "localhost" )->AddressList[ 0 ];
- TcpListener^ tcpListener = gcnew TcpListener( ipAddress,13 );
- tcpListener->Start();
- Console::WriteLine( "Waiting for a connection...." );
-
- try
- {
- //
- // Accepts the pending client connection and returns a socket for communciation.
- Socket^ socket = tcpListener->AcceptSocket();
- Console::WriteLine( "Connection accepted." );
-
- String^ responseString = "You have successfully connected to me";
-
- //Forms and sends a response string to the connected client.
- array^sendBytes = Encoding::ASCII->GetBytes( responseString );
- int i = socket->Send( sendBytes );
- Console::WriteLine( "Message Sent /> : {0}", responseString );
- //
-
- //Any communication with the remote client using the socket can go here.
-
- //Closes the tcpListener and the socket.
- socket->Shutdown( SocketShutdown::Both );
- socket->Close();
- tcpListener->Stop();
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( e->ToString() );
- }
- }
-}
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic TcpListenerExample/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic TcpListenerExample/CPP/source.cpp
deleted file mode 100644
index c216c7fe3f7..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic TcpListenerExample/CPP/source.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-//
-/**
-* This program shows how to use the TcpListener class.
-* It creates a TcpListener that listens on the specified port (13000).
-* To run this program at the command line you enter:
-* cs_tcpserver
-* Any TcpClient that wants to use this server
-* has to explicitly connect to an address obtained by the combination of
-* the server on which this TcpServer is running and the port 13000.
-* This TcpServer simply echoes back the message sent by the TcpClient, after
-* translating it into uppercase.
-**/
-
-#using
-
-using namespace System;
-using namespace System::IO;
-using namespace System::Net;
-using namespace System::Net::Sockets;
-using namespace System::Text;
-
-int main()
-{
- try
- {
-
- // Set the TcpListener on port 13000.
- Int32 port = 13000;
- TcpListener^ server = gcnew TcpListener(IPAddress::Any, port);
-
- // Start listening for client requests.
- server->Start();
-
- // Buffer for reading data
- array^bytes = gcnew array(256);
- String^ data = nullptr;
-
- // Enter the listening loop.
- while ( true )
- {
- Console::Write( "Waiting for a connection... " );
-
- // Perform a blocking call to accept requests.
- // You could also use server.AcceptSocket() here.
- TcpClient^ client = server->AcceptTcpClient();
- Console::WriteLine( "Connected!" );
- data = nullptr;
-
- // Get a stream object for reading and writing
- NetworkStream^ stream = client->GetStream();
- Int32 i;
-
- // Loop to receive all the data sent by the client.
- while ( (i = stream->Read( bytes, 0, bytes->Length )) != 0 )
- {
-
- // Translate data bytes to a ASCII string.
- data = System::Text::Encoding::ASCII->GetString( bytes, 0, i );
- Console::WriteLine( String::Format( "Received: {0}", data ) );
-
- // Process the data sent by the client.
- data = data->ToUpper();
- array^msg = System::Text::Encoding::ASCII->GetBytes( data );
-
- // Send back a response.
- stream->Write( msg, 0, msg->Length );
- Console::WriteLine( String::Format( "Sent: {0}", data ) );
- }
-
- // Shutdown and end connection
- client->Close();
- }
- }
- catch ( SocketException^ e )
- {
- Console::WriteLine( "SocketException: {0}", e );
- }
-
- Console::WriteLine( "\nHit enter to continue..." );
- Console::Read();
-}
-
-//
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.ProtectedMethodsAndPropertiesExample/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.ProtectedMethodsAndPropertiesExample/CPP/source.cpp
deleted file mode 100644
index 8c3fe289538..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.ProtectedMethodsAndPropertiesExample/CPP/source.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-#using
-
-using namespace System;
-using namespace System::Text;
-using namespace System::Net;
-using namespace System::Net::Sockets;
-
-//
-// This derived class demonstrate the use of three protected methods belonging to the UdpClient class.
-public ref class MyUdpClientDerivedClass: public UdpClient
-{
-public:
- MyUdpClientDerivedClass()
- : UdpClient()
- {}
-
- void UsingProtectedMethods()
- {
- //Uses the protected Active property belonging to the UdpClient base class to determine if a connection is established.
- if ( this->Active )
- {
- //Calls the protected Client property belonging to the UdpClient base class.
- Socket^ s = this->Client;
-
- //Uses the Socket returned by Client to set an option that is not available using UdpClient.
- s->SetSocketOption( SocketOptionLevel::Socket, SocketOptionName::Broadcast, 1 );
- }
- }
-};
-//
-
-int main()
-{
- MyUdpClientDerivedClass^ myUdpClientDerivedClass = gcnew MyUdpClientDerivedClass;
- myUdpClientDerivedClass->UsingProtectedMethods();
-}
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp
deleted file mode 100644
index 9ac0d6b76e3..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/CPP/source.cpp
+++ /dev/null
@@ -1,280 +0,0 @@
-#using
-
-using namespace System;
-using namespace System::Text;
-using namespace System::Net;
-using namespace System::Net::Sockets;
-
-public ref class MyUdpClientExample
-{
-public:
- // MyUdpClientConstructor is just used to illustrate the different constructors available in in the UdpClient class.
- static void MyUdpClientConstructor( String^ myConstructorType )
- {
- if ( myConstructorType->Equals( "PortNumberExample" ) )
- {
- //
- //Creates an instance of the UdpClient class to listen on
- // the default interface using a particular port.
- try
- {
- UdpClient^ udpClient = gcnew UdpClient( 11000 );
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( e->ToString() );
- }
- //
- }
- else if ( myConstructorType->Equals( "LocalEndPointExample" ) )
- {
- //
- //Creates an instance of the UdpClient class using a local endpoint.
- IPAddress^ ipAddress = Dns::Resolve( Dns::GetHostName() )->AddressList[ 0 ];
- IPEndPoint^ ipLocalEndPoint = gcnew IPEndPoint( ipAddress,11000 );
-
- try
- {
- UdpClient^ udpClient = gcnew UdpClient( ipLocalEndPoint );
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( e->ToString() );
- }
- //
- }
- else if ( myConstructorType->Equals( "HostNameAndPortNumExample" ) )
- {
- //
- //Creates an instance of the UdpClient class with a remote host name and a port number.
- try
- {
- UdpClient^ udpClient = gcnew UdpClient( "www.contoso.com",11000 );
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( e->ToString() );
- }
- //
- }
- else if ( myConstructorType->Equals( "DefaultExample" ) )
- {
- //
- //Creates an instance of the UdpClient class using the default constructor.
- UdpClient^ udpClient = gcnew UdpClient;
- //
- }
- else
- {
- // Do nothing.
- }
- }
-
- // MyUdpClientConnection method is just used to illustrate the different connection methods of UdpClient class.
- static void MyUdpClientConnection( String^ myConnectionType )
- {
- if ( myConnectionType->Equals( "HostnameAndPortNumExample" ) )
- {
- //
- //Uses a host name and port number to establish a socket connection.
- UdpClient^ udpClient = gcnew UdpClient;
- try
- {
- udpClient->Connect( "www.contoso.com", 11002 );
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( e->ToString() );
- }
- //
- }
- else if ( myConnectionType == "IPAddressAndPortNumExample" )
- {
- //
- //Uses the IP address and port number to establish a socket connection.
- UdpClient^ udpClient = gcnew UdpClient;
- IPAddress^ ipAddress = Dns::Resolve( "www.contoso.com" )->AddressList[ 0 ];
- try
- {
- udpClient->Connect( ipAddress, 11003 );
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( e->ToString() );
- }
- //
- }
- else if ( myConnectionType == "RemoteEndPointExample" )
- {
- //
- //Uses a remote endpoint to establish a socket connection.
- UdpClient^ udpClient = gcnew UdpClient;
- IPAddress^ ipAddress = Dns::Resolve( "www.contoso.com" )->AddressList[ 0 ];
- IPEndPoint^ ipEndPoint = gcnew IPEndPoint( ipAddress,11004 );
- try
- {
- udpClient->Connect( ipEndPoint );
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( e->ToString() );
- }
- //
- }
- else
- {
- // Do nothing.
- }
- }
-
- // This class demonstrates sending and receiving using a Udp socket.
- static void MyUdpClientCommunicator( String^ mySendType )
- {
- if ( mySendType == "EndPointExample" )
- {
- //
- UdpClient^ udpClient = gcnew UdpClient;
- IPAddress^ ipAddress = Dns::Resolve( "www.contoso.com" )->AddressList[ 0 ];
- IPEndPoint^ ipEndPoint = gcnew IPEndPoint( ipAddress,11004 );
-
- array^ sendBytes = Encoding::ASCII->GetBytes( "Is anybody there?" );
- try
- {
- udpClient->Send( sendBytes, sendBytes->Length, ipEndPoint );
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( e->ToString() );
- }
- //
- }
- else if ( mySendType == "HostNameAndPortNumberExample" )
- {
- //
- UdpClient^ udpClient = gcnew UdpClient;
-
- array^ sendBytes = Encoding::ASCII->GetBytes( "Is anybody there" );
- try
- {
- udpClient->Send( sendBytes, sendBytes->Length, "www.contoso.com", 11000 );
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( e->ToString() );
- }
- //
- }
- else if ( mySendType == "StraightSendExample" )
- {
- //
- UdpClient^ udpClient = gcnew UdpClient( "www.contoso.com",11000 );
- array^ sendBytes = Encoding::ASCII->GetBytes( "Is anybody there" );
- try
- {
- udpClient->Send( sendBytes, sendBytes->Length );
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( e->ToString() );
- }
- //
- }
- else
- {
- // Do nothing.
- }
-
- //
- //Creates a UdpClient for reading incoming data.
- UdpClient^ receivingUdpClient = gcnew UdpClient( 11000 );
-
- //Creates an IPEndPoint to record the IP Address and port number of the sender.
- // The IPEndPoint will allow you to read datagrams sent from any source.
- IPEndPoint^ RemoteIpEndPoint = gcnew IPEndPoint( IPAddress::Any,0 );
- try
- {
- // Blocks until a message returns on this socket from a remote host.
- array^receiveBytes = receivingUdpClient->Receive( RemoteIpEndPoint );
-
- String^ returnData = Encoding::ASCII->GetString( receiveBytes );
-
- Console::WriteLine( "This is the message you received {0}", returnData );
- Console::WriteLine( "This message was sent from {0} on their port number {1}",
- RemoteIpEndPoint->Address, RemoteIpEndPoint->Port );
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( e->ToString() );
- }
- //
- }
-
- // This example class demonstrates methods used to join and drop multicast groups.
- static void MyUdpClientMulticastConfiguration( String^ myAction )
- {
- if ( myAction == "JoinMultiCastExample" )
- {
- //
- UdpClient^ udpClient = gcnew UdpClient;
- IPAddress^ multicastIpAddress = Dns::Resolve( "MulticastGroupName" )->AddressList[ 0 ];
- try
- {
- udpClient->JoinMulticastGroup( multicastIpAddress );
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( e->ToString() );
- }
- //
- }
- else if ( myAction == "JoinMultiCastWithTimeToLiveExample" )
- {
- //
- UdpClient^ udpClient = gcnew UdpClient;
- // Creates an IPAddress to use to join and drop the multicast group.
- IPAddress^ multicastIpAddress = IPAddress::Parse( "239.255.255.255" );
-
- try
- {
- // The packet dies after 50 router hops.
- udpClient->JoinMulticastGroup( multicastIpAddress, 50 );
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( e->ToString() );
- }
- //
-
- //
- // Informs the server that you want to remove yourself from the multicast client list.
- try
- {
- udpClient->DropMulticastGroup( multicastIpAddress );
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( e->ToString() );
- }
- //
-
- //
- // Closes the UDP client by calling the public method Close().
- udpClient->Close();
- //
- }
- else
- {
- // Do nothing.
- }
- }
-};
-//end class
-
-int main()
-{
- // For our example, we will use the default constructor.
- MyUdpClientExample::MyUdpClientConstructor( "defaultExample" );
- MyUdpClientExample::MyUdpClientConnection( "HostNameAndPortNumExample" );
- MyUdpClientExample::MyUdpClientCommunicator( "EndPointExample" );
- MyUdpClientExample::MyUdpClientMulticastConfiguration( "JoinMultiCastExample" );
-}
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic UdpClientExample/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic UdpClientExample/CPP/source.cpp
deleted file mode 100644
index 12a033e105e..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic UdpClientExample/CPP/source.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-#using
-
-using namespace System;
-using namespace System::Text;
-using namespace System::Net;
-using namespace System::Net::Sockets;
-
-int main()
-{
- //
- // With this constructor the local port number is arbitrarily assigned.
- UdpClient^ udpClient = gcnew UdpClient;
- try
- {
- udpClient->Connect( "host.contoso.com", 11000 );
-
- // Send message to the host to which you have connected.
- array^sendBytes = Encoding::ASCII->GetBytes( "Is anybody there?" );
- udpClient->Send( sendBytes, sendBytes->Length );
-
- // Send message to a different host using optional hostname and port parameters.
- UdpClient^ udpClientB = gcnew UdpClient;
- udpClientB->Send( sendBytes, sendBytes->Length, "AlternateHostMachineName", 11000 );
-
- //IPEndPoint object will allow us to read datagrams sent from any source.
- IPEndPoint^ RemoteIpEndPoint = gcnew IPEndPoint( IPAddress::Any,0 );
-
- // Block until a message returns on this socket from a remote host.
- array^receiveBytes = udpClient->Receive( RemoteIpEndPoint );
- String^ returnData = Encoding::ASCII->GetString( receiveBytes );
-
- // Use the IPEndPoint object to determine which of these two hosts responded.
- Console::WriteLine( String::Concat( "This is the message you received ", returnData->ToString() ) );
- Console::WriteLine( String::Concat( "This message was sent from ", RemoteIpEndPoint->Address->ToString(), " on their port number ", RemoteIpEndPoint->Port.ToString() ) );
- udpClient->Close();
- udpClientB->Close();
- }
- catch ( Exception^ e )
- {
- Console::WriteLine( e->ToString() );
- }
- //
-}
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic Uri Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic Uri Example/CPP/source.cpp
deleted file mode 100644
index 072abfddaab..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic Uri Example/CPP/source.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-#using
-#using
-#using
-#using
-
-using namespace System;
-using namespace System::Data;
-using namespace System::Net;
-using namespace System::Net::Http;
-using namespace System::Windows::Forms;
-
-public ref class Form1: public Form
-{
-protected:
- void Method()
- {
- //
- Uri^ siteUri = gcnew Uri("http://www.contoso.com/");
-
- // HttpClient lifecycle management best practices:
- // https://learn.microsoft.com/dotnet/fundamentals/networking/http/httpclient-guidelines#recommended-use
- HttpClient^ client = gcnew HttpClient;
- HttpRequestMessage^ request = gcnew HttpRequestMessage(HttpMethod::Get, siteUri);
- HttpResponseMessage^ response = client->Send(request);
- //
- }
-};
-
-void main()
-{
- Form1^ f = gcnew Form1;
-}
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic Uri.AbsolutePath Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic Uri.AbsolutePath Example/CPP/source.cpp
deleted file mode 100644
index 1d511f22f6b..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic Uri.AbsolutePath Example/CPP/source.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-#using
-#using
-#using
-#using
-#using
-
-using namespace System;
-using namespace System::Data;
-using namespace System::Security::Principal;
-using namespace System::Windows::Forms;
-
-public ref class Form1: public Form
-{
-protected:
- void Method()
- {
- //
- Uri^ baseUri = gcnew Uri( "http://www.contoso.com/" );
- Uri^ myUri = gcnew Uri( baseUri,"catalog/shownew.htm?date=today" );
- Console::WriteLine( myUri->AbsolutePath );
- //
- }
-};
-
-void main()
-{
- Form1^ f = gcnew Form1;
-}
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic Uri.AbsoluteUri Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic Uri.AbsoluteUri Example/CPP/source.cpp
deleted file mode 100644
index f5adb1e6dc0..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic Uri.AbsoluteUri Example/CPP/source.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-#using
-#using
-#using
-#using
-
-using namespace System;
-using namespace System::Data;
-using namespace System::Security::Principal;
-using namespace System::Windows::Forms;
-
-void main()
-{
- //
- Uri^ baseUri = gcnew Uri( "http://www.contoso.com" );
- Uri^ myUri = gcnew Uri( baseUri,"catalog/shownew.htm?date=today" );
- Console::WriteLine( myUri->AbsoluteUri );
- //
-}
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic Uri.Authority Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic Uri.Authority Example/CPP/source.cpp
deleted file mode 100644
index 2cb8990b9d0..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic Uri.Authority Example/CPP/source.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-#using
-#using
-#using
-#using
-
-using namespace System;
-using namespace System::Data;
-using namespace System::Security::Principal;
-using namespace System::Windows::Forms;
-
-void main()
-{
- //
- Uri^ baseUri = gcnew Uri( "http://www.contoso.com:8080/" );
- Uri^ myUri = gcnew Uri( baseUri,"shownew.htm?date=today" );
- Console::WriteLine( myUri->Authority );
- //
-}
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic Uri.CheckHostName Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic Uri.CheckHostName Example/CPP/source.cpp
deleted file mode 100644
index 0d5b9b87897..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic Uri.CheckHostName Example/CPP/source.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-#using
-#using
-#using
-#using
-
-using namespace System;
-using namespace System::Data;
-using namespace System::Security::Principal;
-using namespace System::Windows::Forms;
-
-void main()
-{
- //
- Console::WriteLine( Uri::CheckHostName( "www.contoso.com" ) );
- //
-}
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic Uri.Host Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic Uri.Host Example/CPP/source.cpp
deleted file mode 100644
index db24745352e..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic Uri.Host Example/CPP/source.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-#using
-#using
-#using
-#using
-
-using namespace System;
-using namespace System::Data;
-using namespace System::Security::Principal;
-using namespace System::Windows::Forms;
-
-void main()
-{
- //
- Uri^ baseUri = gcnew Uri( "http://www.contoso.com:8080/" );
- Uri^ myUri = gcnew Uri( baseUri,"shownew.htm?date=today" );
- Console::WriteLine( myUri->Host );
- //
-}
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic Uri.PathAndQuery Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic Uri.PathAndQuery Example/CPP/source.cpp
deleted file mode 100644
index 77b48ab3d82..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic Uri.PathAndQuery Example/CPP/source.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-#using
-#using
-#using
-#using
-
-using namespace System;
-using namespace System::Data;
-using namespace System::Security::Principal;
-using namespace System::Windows::Forms;
-
-void main()
-{
- //
- Uri^ baseUri = gcnew Uri( "http://www.contoso.com/" );
- Uri^ myUri = gcnew Uri( baseUri, "catalog/shownew.htm?date=today" );
-
- Console::WriteLine( myUri->PathAndQuery );
- //
-}
-
-void Method2()
-{
- //
- Uri^ baseUri = gcnew Uri( "http://www.contoso.com/" );
- Uri^ myUri = gcnew Uri( baseUri, "catalog/shownew.htm?date=today" );
-
- Console::WriteLine( myUri->Query );
- //
-}
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic Uri.Port Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic Uri.Port Example/CPP/source.cpp
deleted file mode 100644
index 2298149c102..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic Uri.Port Example/CPP/source.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-#using
-#using
-#using
-#using
-
-using namespace System;
-using namespace System::Data;
-using namespace System::Security::Principal;
-using namespace System::Windows::Forms;
-
-void main()
-{
- //
- Uri^ baseUri = gcnew Uri( "http://www.contoso.com/" );
- Uri^ myUri = gcnew Uri( baseUri,"catalog/shownew.htm?date=today" );
- Console::WriteLine( myUri->Port );
- //
-}
diff --git a/snippets/cpp/VS_Snippets_Remoting/Classic Uri.Scheme Example/CPP/source.cpp b/snippets/cpp/VS_Snippets_Remoting/Classic Uri.Scheme Example/CPP/source.cpp
deleted file mode 100644
index 2a79562ae4c..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/Classic Uri.Scheme Example/CPP/source.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-#using
-#using
-#using