System.Net.Mail.Message.Message C# (CSharp) Méthode

Message() private méthode

private Message ( string from, string to ) : System.Net.Mime
from string
to string
Résultat System.Net.Mime
        internal Message(string from, string to) : this()
        {
            if (from == null)
                throw new ArgumentNullException(nameof(from));

            if (to == null)
                throw new ArgumentNullException(nameof(to));

            if (from == string.Empty)
                throw new ArgumentException(SR.Format(SR.net_emptystringcall, nameof(from)), nameof(from));

            if (to == string.Empty)
                throw new ArgumentException(SR.Format(SR.net_emptystringcall, nameof(to)), nameof(to));

            _from = new MailAddress(from);
            MailAddressCollection collection = new MailAddressCollection();
            collection.Add(to);
            _to = collection;
        }

Same methods

Message::Message ( ) : System.Net.Mime
Message::Message ( System.Net.Mail.MailAddress from, System.Net.Mail.MailAddress to ) : System.Net.Mime