Dot net Utilility Classes

Posted by vishalneeraj-24503 under ASP.NET category on | Points: 40 | Views : 1062
Hi, here i am going to tell you about Utility classes.

These classes are in-built classes provide by Microsoft.

Following are utility classes -

1). System.IO.Path.GetFileName(string file_full_path)
It will retun you only file name with extension ->abc.txt

2). System.IO.Path.GetFileNameWithoutExtension(string file_full_path)
It will retun you only file name without extension ->abc

3). If you want to get full path then use
string folder = "your folder path"
then write,
System.IO.Path.Combine(folder, "abc.txt");

4). Instead of writing "\r\n" for line-break in Windows Application use

5). If you declare any string variable assign it as string.empty instead of "";
as private string value = string.empty.


Comments or Responses

Login to post response