System.Text.UnicodeEncoding.GetChars C# (CSharp) Method

GetChars() private method

private GetChars ( byte bytes, int byteCount, char chars, int charCount ) : int
bytes byte
byteCount int
chars char
charCount int
return int
        public unsafe override int GetChars(byte* bytes, int byteCount, char* chars, int charCount)
        {
            throw null;
        }

Same methods

UnicodeEncoding::GetChars ( byte bytes, int byteIndex, int byteCount, char chars, int charIndex ) : int

Usage Example

 private static EMFFont Process(byte[] RecordData)
 {
     //put the Data into a stream and use a binary reader to read the data
     MemoryStream _ms = null;
     BinaryReader _br = null;
     try
     {
         _ms = new MemoryStream(RecordData);
         _br = new BinaryReader(_ms);
         UInt32 Version = _br.ReadUInt32();
         Single EmSize = _br.ReadSingle();
         UInt32 SizeUnit = _br.ReadUInt32();
         Int32 FontStyleFlags = _br.ReadInt32();
         _br.ReadUInt32();
         UInt32 NameLength = _br.ReadUInt32();
         char[] FontFamily = new char[NameLength]; 
         System.Text.UnicodeEncoding d = new System.Text.UnicodeEncoding();
         d.GetChars(_br.ReadBytes((int)NameLength * 2),0,(int)NameLength * 2,FontFamily,0);                
         Font aFont = new Font(new String(FontFamily), EmSize, (FontStyle)FontStyleFlags, (GraphicsUnit)SizeUnit);
         EMFFont ThisFont = new EMFFont();
         ThisFont.myFont = aFont;
         return ThisFont;
     }
     finally
     {
         if (_br != null)
             _br.Close();               
         if (_ms != null)
             _ms.Dispose();            
     }
 }
All Usage Examples Of System.Text.UnicodeEncoding::GetChars