Code for Getting Information About A File?
here we have the system.io base class in .net
FileInfo is the class which has the properties and methods
to display information about the file.
example code
FileInfo fi = new FileInfo("givepath");
Console.WriteLine("File Name:"+fi.Name);
Console.WriteLine("FullName:"+fi.FullName);
Console.WriteLine("Creation Time:"+fi.CreationTime);
Console.WriteLine("Last Access Time:"+fi.LastAccessTime);
Console.WriteLine("File Deleted :"+fi.Delete());
We can similarly know about the directory information using
DirectoryInfo di = new DirectoryInfo("path");
| Is This Answer Correct ? | 8 Yes | 0 No |
hold checkbox values
how to design a ListView control?
Coding for .NET Delegates?
Code for Communicating over Sockets?
how to convert Dataset to Object Array or list in c# .net
HOw to Build a Nested GridView Control with ASP.NET?
Give coding for Exception Handling Techniques in ASP.NET?
What is the code of Password Recovery or Forget your password? Plz tell in c # language.
how to upload an excel in c# ASP.Net?
How to Bind Nested XML to a Repeater Control with Container.DataItem?
Code for a Simple Way to Write XML in .NET (XmlTextWriter)
Code for Using Keyboard Events?