コード例 #1
0
 public static int GetColIndexByColName(this HtmlTable @this, string colName)
 {
     for (int index = 0; index < @this.ColumnCount; index++)
     {
         string title = @this.GetHeaderCellByColumnIndex(index).InnerText;
         if (colName.Equals(title, StringComparison.CurrentCultureIgnoreCase))
         {
             return(index);
         }
     }
     return(0);
 }