checking files using c#
-
plz any one help i need code in c# for checking afile is exisisting if it exists display that file if does not exists create a file in any folder using c# its very urgent if any ine have htis in vb.net also u can give me thanks
-
plz any one help i need code in c# for checking afile is exisisting if it exists display that file if does not exists create a file in any folder using c# its very urgent if any ine have htis in vb.net also u can give me thanks
If you need code, then it's lucky you know how to program isn't it? If not I can send you my consultancy fees - an "urgent" job on a Sunday oh boy oh boy this is going to cost you. Do you have a house you can sell, I'm not quite sure selling the car will do it? :) 1) Look at System.IO.File.Exists (static method), or alternative System.IO.FileInfo.Exists (member method on the FileInfo class) 2) Opening it is not clear enough. Do you want it to open with the standard registered program (so if it is a .doc file start Word) or display the data in your own program. If you want to open with the registered program, look at System.Diagnostics.Process.Start (you can give it a path to the file and it will resolve the correct executable for you). If you need to display it yourself use the System.IO namespace to read file (FileStream/StreamReader/BinaryReader are classes you need to know), then build whatever GUI required on top of the data using whatever you require and are familier with: WinForm, ASP.NET, or WPF.
-
plz any one help i need code in c# for checking afile is exisisting if it exists display that file if does not exists create a file in any folder using c# its very urgent if any ine have htis in vb.net also u can give me thanks
-
plz any one help i need code in c# for checking afile is exisisting if it exists display that file if does not exists create a file in any folder using c# its very urgent if any ine have htis in vb.net also u can give me thanks
ramyanaidu wrote:
its very urgent
That is a very rude thing to say around here. Your post is a simple one that a quick google search can do for you.
"Find it your bloody self - immediately!" - Dave Kreskowiak