示例#1
0
 public string GetHeaderForKey(string columnKey)
 {
     if (HeadersDict.ContainsKey(columnKey))
     {
         return(HeadersDict[columnKey]);
     }
     else
     {
         return(columnKey);
     }
 }
示例#2
0
 /// <summary>
 /// Sets a list of headers for the table
 /// </summary>
 /// <param name="headers"></param>
 public void SetHeaders(params string[] headers)
 {
     if (headers.Length != Keys.Count)
     {
         throw new Exception("Mismatch between the number of columns in the table and the number of headers provided");
     }
     else
     {
         HeadersDict.Clear();
         for (int i = 0; i < Keys.Count; i++)
         {
             HeadersDict.Add(Keys[i], headers[i]);
         }
     }
 }
示例#3
0
 /// <summary>
 /// Wipes the KeyList to a blank state.
 /// </summary>
 new public void Clear()
 {
     Keys.Clear();
     HeadersDict.Clear();
     Rows = new RowEnum(this);
 }