C# EncodingInfo Name

Description

EncodingInfo Name Gets the name registered with the Internet Assigned Numbers Authority (IANA) for the encoding.

Syntax

EncodingInfo.Name has the following syntax.


public string Name { get; }

Example

Gets the name registered with the Internet Assigned Numbers Authority (IANA) for the encoding.


//from www  .j a  v  a  2s.  c  om
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.Name );
      }
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Text »




ASCIIEncoding
Encoding
EncodingInfo
StringBuilder
UnicodeEncoding
UTF8Encoding