Dns.BeginGetHostByName(String, AsyncCallback, Object) Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Perhatian
BeginGetHostByName is obsoleted for this type, please use BeginGetHostEntry instead. https://go.microsoft.com/fwlink/?linkid=14202
Perhatian
BeginGetHostByName has been deprecated. Use BeginGetHostEntry instead.
Perhatian
BeginGetHostByName is obsoleted for this type, please use BeginGetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202
Memulai permintaan asinkron untuk IPHostEntry informasi tentang nama host DNS yang ditentukan.
public:
static IAsyncResult ^ BeginGetHostByName(System::String ^ hostName, AsyncCallback ^ requestCallback, System::Object ^ stateObject);
[System.Obsolete("BeginGetHostByName is obsoleted for this type, please use BeginGetHostEntry instead. https://go.microsoft.com/fwlink/?linkid=14202")]
public static IAsyncResult BeginGetHostByName (string hostName, AsyncCallback? requestCallback, object? stateObject);
[System.Obsolete("BeginGetHostByName has been deprecated. Use BeginGetHostEntry instead.")]
public static IAsyncResult BeginGetHostByName (string hostName, AsyncCallback? requestCallback, object? stateObject);
[System.Obsolete("BeginGetHostByName is obsoleted for this type, please use BeginGetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202")]
public static IAsyncResult BeginGetHostByName (string hostName, AsyncCallback requestCallback, object stateObject);
[System.Obsolete("BeginGetHostByName is obsoleted for this type, please use BeginGetHostEntry instead. https://go.microsoft.com/fwlink/?linkid=14202")]
public static IAsyncResult BeginGetHostByName (string hostName, AsyncCallback requestCallback, object stateObject);
public static IAsyncResult BeginGetHostByName (string hostName, AsyncCallback requestCallback, object stateObject);
[<System.Obsolete("BeginGetHostByName is obsoleted for this type, please use BeginGetHostEntry instead. https://go.microsoft.com/fwlink/?linkid=14202")>]
static member BeginGetHostByName : string * AsyncCallback * obj -> IAsyncResult
[<System.Obsolete("BeginGetHostByName has been deprecated. Use BeginGetHostEntry instead.")>]
static member BeginGetHostByName : string * AsyncCallback * obj -> IAsyncResult
[<System.Obsolete("BeginGetHostByName is obsoleted for this type, please use BeginGetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202")>]
static member BeginGetHostByName : string * AsyncCallback * obj -> IAsyncResult
static member BeginGetHostByName : string * AsyncCallback * obj -> IAsyncResult
Public Shared Function BeginGetHostByName (hostName As String, requestCallback As AsyncCallback, stateObject As Object) As IAsyncResult
Parameter
- hostName
- String
Nama DNS host.
- requestCallback
- AsyncCallback
Delegasi AsyncCallback yang mereferensikan metode yang akan dipanggil saat operasi selesai.
- stateObject
- Object
Objek yang ditentukan pengguna yang berisi informasi tentang operasi. Objek ini diteruskan ke requestCallback
delegasi ketika operasi selesai.
Mengembalikan
Instans IAsyncResult yang mereferensikan permintaan asinkron.
- Atribut
Pengecualian
hostName
adalah null
.
Terjadi kesalahan saat menjalankan kueri DNS.
Keterangan
Operasi asinkron BeginGetHostByName harus diselesaikan dengan memanggil EndGetHostByName metode . Biasanya, metode ini dipanggil oleh requestCallback
delegasi.
Metode ini tidak memblokir sampai operasi selesai. Untuk memblokir hingga operasi selesai, gunakan GetHostByName metode .
Untuk informasi mendetail tentang menggunakan model pemrograman asinkron, lihat Memanggil Metode Sinkron Secara Asinkron.
Catatan
Anggota ini memancarkan informasi pelacakan saat Anda mengaktifkan pelacakan jaringan di aplikasi Anda. Untuk informasi selengkapnya, lihat Pelacakan Jaringan di .NET Framework.