The SLAR on System.Text.ASCIIEncoding


Continuing in the series on sharing some of the information in the .NET Framework Standard Library Annotated Reference Vol 1 here are some of the annotations on the ASCIIEncoding class.


Brad Abrams:Regrettably, the ASCIIEncoding class does not follow the standard naming

convention: it should really be called AsciiEncoding. We settled on the naming

convention for abbreviations too late in the cycle to fix this.


Brian Grunkemeyer:    We hope that users will not choose ASCII for persisting data in files when they

can control the file format. We have fully shifted to Unicode, and our recommended

text transfer format is UTF-8, which is as compact as ASCII for US English text, yet

also supports all Unicode characters.


Jeff Richter: Normally, there is no need for your application code to construct an Encodingderived

object (such as ASCIIEncoding). Instead, you normally obtain an Encodingderived

object by calling one of Encoding class’s static, read-only properties. Here is an


ASCIIEncoding asciiEncoding = Encoding.ASCII;

This is more efficient because it returns a reference to a single ASCIIEncoding object

rather than creating new ASCIIEncoding objects.