コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the ColumnModel class with an array of strings
        /// representing TextColumns
        /// </summary>
        /// <param name="columns">An array of strings that represent the Columns of
        /// the ColumnModel</param>
        public ColumnModel(string[] columns)
        {
            if (columns == null)
            {
                throw new ArgumentNullException("columns", "string[] cannot be null");
            }

            this.Init();

            if (columns.Length > 0)
            {
                Column[] cols = new Column[columns.Length];

                for (int i = 0; i < columns.Length; i++)
                {
                    cols[i] = new TextColumn(columns[i]);
                }

                this.Columns.AddRange(cols);
            }
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the ColumnModel class with an array of strings 
        /// representing TextColumns
        /// </summary>
        /// <param name="columns">An array of strings that represent the Columns of 
        /// the ColumnModel</param>
        public ColumnModel(string[] columns)
        {
            if (columns == null)
            {
                throw new ArgumentNullException("columns", "string[] cannot be null");
            }

            this.Init();

            if (columns.Length > 0)
            {
                Column[] cols = new Column[columns.Length];

                for (int i=0; i<columns.Length; i++)
                {
                    cols[i] = new TextColumn(columns[i]);
                }

                this.Columns.AddRange(cols);
            }
        }