示例#1
0
        public static TableLine FromStringCollection(IEnumerable <string> collection)
        {
            var tableLine = new TableLine();
            var props     = tableLine.GetType().GetProperties();

            foreach (var zip in collection.Zip(props, (s, p) => new { s, p }))
            {
                zip.p.SetValue(tableLine, zip.s);
            }

            return(tableLine);
        }