C# ASCIIEncoding BodyName
Description
ASCIIEncoding BodyName
When overridden in a derived
class, gets a name for the current encoding that can be used with mail agent
body tags.
Syntax
ASCIIEncoding.BodyName
has the following syntax.
public virtual string BodyName { get; }
Example
using System;//w ww . j av a2s .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} ", ei.Name);
Console.Write("{0,-9} ", e.CodePage);
Console.WriteLine("{0} ", e.EncodingName);
}
}
}
The code above generates the following result.