I have the following code:
foreach (string p in dirs)
{
string path = p;
string lastAccessTime = File.GetLastAccessTime(path).ToString();
bool DirFile = File.Exists(path);
FileInfo fInf = new FileInfo(path);
DateTime lastWriteTime = File.GetLastWriteTime(p);
dirFiles.Add(p + "|" + lastAccessTime.ToString() + "|" + DirFile.ToString() + "|" + lastWriteTime.ToString() + "|" + fInf.Length.ToString());
}
I have a fInf.Length.ToString() and i'd like to measure the output in terms of kbs. Any ideas on how do accomplish this? For example, instead of getting 2048 as a File Size, i'd like to just get 2Kb.
Thanks in advance for help