C# ASCIIEncoding EncodingName
Description
ASCIIEncoding EncodingName
When overridden in a derived
class, gets the human-readable description of the current encoding.
Syntax
ASCIIEncoding.EncodingName
has the following syntax.
public virtual string EncodingName { get; }
Example
using System;/*from w w w. jav a 2 s . c o m*/
using System.Text;
public class SamplesEncoding
{
public static void Main()
{
foreach (EncodingInfo ei in Encoding.GetEncodings())
{
Encoding e = ei.GetEncoding();
Console.WriteLine(ei.Name);
Console.WriteLine(e.EncodingName);
}
}
}
The code above generates the following result.