METHOD
Encoding.UTF8.GetByteCount
Measures UTF-8 encoded byte count for the provided text under the encoding fallback policy.
Formal Syntax & Structure
csharp syntaxcsharp
Encoding.UTF8.GetByteCount(text)Working Example
Example Snippetcsharp
int bytes = System.Text.Encoding.UTF8.GetByteCount("A");