Dns.BeginResolve(String, AsyncCallback, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
BeginResolve has been deprecated. Use BeginGetHostEntry instead.
Caution
BeginResolve is obsoleted for this type, please use BeginGetHostEntry instead. https://go.microsoft.com/fwlink/?linkid=14202
Caution
BeginResolve is obsoleted for this type, please use BeginGetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202
Begins an asynchronous request to resolve a DNS host name or IP address to an IPAddress instance.
public:
static IAsyncResult ^ BeginResolve(System::String ^ hostName, AsyncCallback ^ requestCallback, System::Object ^ stateObject);
[System.Obsolete("BeginResolve has been deprecated. Use BeginGetHostEntry instead.")]
public static IAsyncResult BeginResolve(string hostName, AsyncCallback? requestCallback, object? stateObject);
[System.Obsolete("BeginResolve is obsoleted for this type, please use BeginGetHostEntry instead. https://go.microsoft.com/fwlink/?linkid=14202")]
public static IAsyncResult BeginResolve(string hostName, AsyncCallback? requestCallback, object? stateObject);
[System.Obsolete("BeginResolve is obsoleted for this type, please use BeginGetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202")]
public static IAsyncResult BeginResolve(string hostName, AsyncCallback requestCallback, object stateObject);
[System.Obsolete("BeginResolve is obsoleted for this type, please use BeginGetHostEntry instead. https://go.microsoft.com/fwlink/?linkid=14202")]
public static IAsyncResult BeginResolve(string hostName, AsyncCallback requestCallback, object stateObject);
public static IAsyncResult BeginResolve(string hostName, AsyncCallback requestCallback, object stateObject);
[<System.Obsolete("BeginResolve has been deprecated. Use BeginGetHostEntry instead.")>]
static member BeginResolve : string * AsyncCallback * obj -> IAsyncResult
[<System.Obsolete("BeginResolve is obsoleted for this type, please use BeginGetHostEntry instead. https://go.microsoft.com/fwlink/?linkid=14202")>]
static member BeginResolve : string * AsyncCallback * obj -> IAsyncResult
[<System.Obsolete("BeginResolve is obsoleted for this type, please use BeginGetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202")>]
static member BeginResolve : string * AsyncCallback * obj -> IAsyncResult
static member BeginResolve : string * AsyncCallback * obj -> IAsyncResult
Public Shared Function BeginResolve (hostName As String, requestCallback As AsyncCallback, stateObject As Object) As IAsyncResult
Parameters
- hostName
- String
The DNS name of the host.
- requestCallback
- AsyncCallback
An AsyncCallback delegate that references the method to invoke when the operation is complete.
- stateObject
- Object
A user-defined object that contains information about the operation. This object is passed to the requestCallback delegate when the operation is complete.
Returns
An IAsyncResult instance that references the asynchronous request.
- Attributes
Exceptions
hostName is null.
The caller does not have permission to access DNS information.
Remarks
The asynchronous BeginResolve operation must be completed by calling the EndResolve 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 Resolve method.
For more information about using the asynchronous programming model, see 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 .NET Framework.