How to access an column with special characters using DataTable.Select()?

前端 未结 2 1610
心在旅途
心在旅途 2021-01-26 05:19

I have a DataTable with column such as # of Students and would like to sort by this in descending order. Here is my code:

...
dt.Column         


        
2条回答
  •  执念已碎
    2021-01-26 05:56

    You should use [] brackets, like this :

    var rows = dt.Select("","[# of Students] desc");
    

提交回复
热议问题