System.Text.UTF8Encoding.UTF8Encoder.UTF8Encoder C# (CSharp) Method

UTF8Encoder() private method

private UTF8Encoder ( SerializationInfo info, StreamingContext context ) : System
info SerializationInfo
context StreamingContext
return System
            internal UTF8Encoder(SerializationInfo info, StreamingContext context)
            {
                // Any info?
                if (info==null) throw new ArgumentNullException("info");

                // Get common info
                this.m_encoding = (Encoding)info.GetValue("encoding", typeof(Encoding));

                // SurrogateChar happens to mean the same thing
                this.surrogateChar = (int)info.GetValue("surrogateChar", typeof(int));

                try 
                {
                    this.m_fallback = (EncoderFallback) info.GetValue("m_fallback", typeof(EncoderFallback));
                } 
                catch (SerializationException)
                {
                    this.m_fallback = null;
                }
            }

Same methods

UTF8Encoding.UTF8Encoder::UTF8Encoder ( UTF8Encoding encoding ) : System