示例#1
0
        /// <summary>
        /// 设置 CSV 数据对象数据
        /// </summary>
        /// <param name="item"></param>
        /// <param name="ignorePrefix">数据忽略前缀</param>
        /// <returns>是否设置成功,数据列不存在时返回 false</returns>
        public bool SetObject(ReaderItem item, char ignorePrefix)
        {
            tryCreateNextObject(ref item);
            int index = getIndex(item.Col);

            if (index >= 0)
            {
                currentObject.ValueArray[index] = item.GetString(ignorePrefix);
                return(true);
            }
            return(false);
        }
示例#2
0
 public void AppendName(ReaderItem item, char ignorePrefix)
 {
     appendName(item.GetString(ignorePrefix), item.Col);
 }