How do I get a human-readable file size in bytes abbreviation using .NET?
Example: Take input 7,326,629 and display 6.98 MB
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This may not the most efficient or optimized way to do it, but it’s easier to read if you are not familiar with log maths, and should be fast enough for most scenarios.