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 |
Code for Using Keyboard Events?
what is the value that reside in a hidden field when no value is assigned to it?how it can be used in a if statement??
working with fileUpload ?
How to integrate the regional language in asp.net and c# like Telugu, Hindi etc,. send a sample program
3 Answers Concept, NIIT, Wipro,
ArrayList declaration in .net
How to Bind Nested XML to a Repeater Control with Container.DataItem?
How we use ajax in asp.net through javaScript. Please givee me an example.
how to create a search bar which access data from various websites and retrieves the data
hold checkbox values
Listview design in .net
Give coding for Implementing a Fixed GridView Header in ASP.NET?
Code for Getting Information About A File?