コード例 #1
0
        public static void RemoveHeaderField(DataStringCollection source, HeaderFieldList fieldList, string name)
        {
            HeaderField field = fieldList[name];

            if (field != null)
            {
                fieldList.Remove(field);
                int index = int.Parse(field.Value);
                source.RemoveAt(index);
                while (index < source.Count)
                {
                    string str = source[index];
                    if (StringUtils.IsEmpty(str) || ((str[0] != '\t') && (str[0] != ' ')))
                    {
                        break;
                    }
                    source.RemoveAt(index);
                }
            }
        }