2004-06-03から1日間の記事一覧

文字列からIPAddressの生成

C#

001 using System.Net; 002 003 IPAddress IP; 004 005 try 006 { 007 IP = IPAddress.Parse("127.0.0.1"); 008 } 009 catch (FormatException e) 010 { // IP アドレスのフォーマットが不正 011 } 012 catch (ArgumentNullException e) 013 { // null が指…