|
CodePanic! > C#.NET Tips > 今ここ■ファイルが存在するか調べるSystem.IO.File.Exists()関数を使います。 指定ファイルが存在するか否かを調べ 結果の真偽値を得ます。 System.IO.File.Exists()関数を利用します。 if ( System.IO.File.Exists(@"c:\HP\index.html") ) MessageBox.Show( "あったよママン!" ); else MessageBox.Show( "ないよぉ orz" ); Tweet |