private TableSchema(DataTable dt) { int count = dt.Rows.Count; Fields = new FieldSchema[count]; for (int i = 0; i < count; i++) Fields[i] = new FieldSchema(dt.Rows[i]); }
string createProperty(FieldSchema fs) { string sProperty = string.Empty; sProperty += indent; sProperty += indent; string sType = TypeConvertor.ToCSharpType(fs.DataType); sProperty += string.Format("public {0} {1} {{ get; set; }}", sType, fs.ColumnName); sProperty += "\n"; return sProperty; }