C# UnicodeEncoding EncodingName

Description

UnicodeEncoding EncodingName When overridden in a derived class, gets the human-readable description of the current encoding.

Syntax

UnicodeEncoding.EncodingName has the following syntax.


public virtual string EncodingName { get; }

Example


using System;/*from   ww  w.  j a  v a  2  s  .  co  m*/
using System.Text;

public class SamplesEncoding  {

   public static void Main()  {
      foreach( EncodingInfo ei in Encoding.GetEncodings() )  {
         Encoding e = ei.GetEncoding();
         Console.Write( "{0,-18} ", e.EncodingName );
      }
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Text »




ASCIIEncoding
Encoding
EncodingInfo
StringBuilder
UnicodeEncoding
UTF8Encoding