Name

UTF8Encoding

Synopsis

This class encodes Unicode characters as UTF-8, 8-bit characters. The overloaded constructor allows zero, one, or two boolean parameters. The first argument indicates whether the encoder should both emit the UTF-8 byte order mark code and recognize it. The second boolean argument specifies whether to throw an exception when invalid bytes are encountered.

Public Class UTF8Encoding : Inherits Encoding
' Public Constructors
   Public Sub New() 
   Public Sub New(
        ByVal encoderShouldEmitUTF8Identifier As Boolean) 
   Public Sub New(
        ByVal encoderShouldEmitUTF8Identifier As Boolean, 
        ByVal throwOnInvalidBytes As Boolean) 
' Public Instance Methods
   Overrides Public Function Equals(
        ByVal value As Object) As Boolean  
   Overrides Public Function GetByteCount(
        ByVal chars As Char(), ByVal index As Integer, 
        ByVal count As Integer) As Integer  
   Overrides Public Function GetByteCount(
        ByVal chars As String) As Integer  
   Overrides Public Function GetBytes(
        ByVal s As String) As Byte()  
   Overrides Public Function GetBytes(ByVal chars As Char(), 
        ByVal charIndex As Integer, 
        ByVal charCount As Integer, ByVal bytes As Byte(), 
        ByVal byteIndex As Integer) As Integer  
   Overrides Public Function GetBytes(ByVal s As String, 
        ByVal charIndex As Integer, 
        ByVal charCount As Integer, ByVal bytes As Byte(), 
        ByVal byteIndex As Integer) As Integer  
   Overrides Public Function GetCharCount(
        ByVal bytes As Byte(), ByVal index As Integer, 
        ByVal count As Integer) As Integer  
   Overrides Public Function GetChars(ByVal ...

Get VB.NET Core Classes in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.