Пример #1
0
        public int GetBytes(byte[] array, int offset)
        {
            if (array == null)
            {
                throw new ArgumentNullException("array");
            }
            if (0 > offset)
            {
                throw new ArgumentOutOfRangeException("offset");
            }
            if (this.address == null)
            {
                return(0);
            }
            int length = this.Length;

            if (length == 0)
            {
                return(0);
            }
            if (length > array.Length - offset)
            {
                throw new ArgumentException(DataStrings.InsufficientSpace);
            }
            return(MimeInternalHelpers.StringToBytes(this.address, 0, length, array, offset, MimeInternalHelpers.IsEaiEnabled()));
        }
Пример #2
0
 public byte[] GetBytes()
 {
     if (this.address == null)
     {
         return(null);
     }
     return(MimeInternalHelpers.StringToBytes(this.address, MimeInternalHelpers.IsEaiEnabled()));
 }