/// <summary>字节单位换算</summary>
public static string ByteConversion(double length)
{
string temp;

if (length < 1024)
{
temp = Math.Round(length, 0) + "B";
}

else if (length < 1024 * 1024)
{
temp = Math.Round(length / (1024), 0) + "KB";
}

else if (length < 1024 * 1024 * 1024)
{
temp = Math.Round(length / (1024 * 1024), 2) + "MB";
}

else
{
temp = Math.Round(length / (1024 * 1024 * 1024), 2) + "GB";
}

return temp;
}