// NetworkURLIP.cpp : メイン プロジェクト ファイルです。 #include "stdafx.h" using namespace System; using namespace System::Net; int main(array ^args) { String^ host = "www.yahoo.co.jp"; try { IPHostEntry^ hostInfo = Dns::GetHostEntry(host); for(int index = 0; index < hostInfo->AddressList->Length; index++) { Console::WriteLine(hostInfo->AddressList[index]); } } catch(Exception^ e) { Console::WriteLine(e->Message); } return 0; }