C# EncodingInfo DisplayName

Description

EncodingInfo DisplayName Gets the human-readable description of the encoding.

Syntax

EncodingInfo.DisplayName has the following syntax.


public string DisplayName { get; }

Example

Gets the human-readable description of the encoding.


/* w w  w  .ja v a  2s .c  o m*/

using System;
using System.Text;

public class SamplesEncoding  {

   public static void Main()  {
      foreach( EncodingInfo ei in Encoding.GetEncodings() )  {
         Encoding e = ei.GetEncoding();
         Console.Write(ei.DisplayName );
      }
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Text »




ASCIIEncoding
Encoding
EncodingInfo
StringBuilder
UnicodeEncoding
UTF8Encoding