1
static DataTable SelectDistinct(string ReturnTableName, DataTable SourceTable, string ReturnFieldName, string AdditionalFilterExpression)
2
后来这样写:2
1
private DataTable SelectDistinct(DataTable sourceTable, string sourceColumn)
2
2
再后来又这样写:
1
object[] distinctRoomType = GetDistinctValues(dt,"Roomtype");
2
3
Here is the method definition.
4
5
public object[] GetDistinctValues(DataTable dtable,string colName)
6
现在.NET FX 2.0中只要一句就可以搞定了,方便了许多:
2
3
4
5
6
1
);