csharp system.io check if file exists

Code Example - csharp system.io check if file exists

                
                        gem install iocheck
                    
                
 

csharp check file exists

                        
                                if (File.Exists(@"D:\myfile.txt")) {
   Console.WriteLine("The file exists.");
}
                            
                        
 

csharp file exist

                        
                                if (File.Exists("file.exe"))
{
	//file exist
} else {
  //does not exist
}