SyntaxFix
Write A Post
Hire A Developer
Questions
You can use encoding like ASCII to get a character per byte by using the System.Text.Encoding class.
System.Text.Encoding
or try this
System.Text.ASCIIEncoding.Unicode.GetByteCount(string); System.Text.ASCIIEncoding.ASCII.GetByteCount(string);