string GetSizeInString(long size)
{
string[] postfix = {"байт", "Kb", "Mb", "Gb", "Tb" };
int i = 1;
double temp = (double)size;
while ((temp /= 1024) > 1024 && i++ < postfix.Length) ;
return String.Format("{0:F}", temp) + " " + postfix[i];
}
0.00 (0%) 0 votes






