O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

ASCIIEncoding

Synopsis

This class is a character encoding that encodes Unicode characters as 7-bit ASCII characters. ASCII uses the first 128 characters of a Unicode encoding.

public class ASCIIEncoding : Encoding {
// Public Constructors
   public method ASCIIEncoding();  
// Public Instance Methods
   public override method int GetByteCount(char[] chars,         // overrides Encoding
        int index, int count);  
   public override method int GetByteCount(string chars);       // overrides Encoding
   public override method int GetBytes(char[] chars,             // overrides Encoding
        int charIndex, int charCount, byte[] bytes, 
        int byteIndex);  
   public override method int GetBytes(string chars,             // overrides Encoding
        int charIndex, int charCount, byte[] bytes, 
        int byteIndex);  
   public override method int GetCharCount(byte[] bytes,         // overrides Encoding
        int index, int count);  
   public override method int GetChars(byte[] bytes,             // overrides Encoding
        int byteIndex, int byteCount, char[] chars, 
        int charIndex);  
   public override method int GetMaxByteCount(int charCount);    // overrides Encoding
   public override method int GetMaxCharCount(int byteCount);    // overrides Encoding
   public override method string GetString(byte[] bytes);       // overrides Encoding
   public override method string GetString(byte[] bytes,         // overrides Encoding
        int byteIndex, int byteCount);  
}

Hierarchy

System.Object→Encoding→ASCIIEncoding

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required