C# UnicodeEncoding CodePage

Description

UnicodeEncoding CodePage When overridden in a derived class, gets the code page identifier of the current Encoding.

Syntax

UnicodeEncoding.CodePage has the following syntax.


public virtual int CodePage { get; }

Example


//  ww w  .j ava  2  s .  co  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( "{0,-18} ", e.CodePage );
      }
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Text »




ASCIIEncoding
Encoding
EncodingInfo
StringBuilder
UnicodeEncoding
UTF8Encoding