Exemplo n.º 1
0
        public void GetColumnIndex(string colName, out int index)
        {
            int count = ColNames.Count();

            for (int i = 0; i < count; i++)
            {
                if (ColNames[i] == colName)
                {
                    index = i;
                    return;
                }
            }
            index = -1;
            return;
        }
Exemplo n.º 2
0
 public Object[] GetColumnsFromRow(int index)
 {
     try
     {
         int      n    = ColNames.Count();
         Object[] temp = new Object[n];
         for (int i = 0; i < n; i++)
         {
             temp[i] = Columns[i].Values[index];
         }
         return(temp);
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
         return(null);
     }
 }
Exemplo n.º 3
0
 public bool ColumnIsExist(string columnName)
 {
     try
     {
         int count = ColNames.Count();
         for (int i = 0; i < count; i++)
         {
             if (ColNames[i] == columnName)
             {
                 return(true);
             }
         }
         return(false);
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
         return(false);
     }
 }