I use a DataTable with Information about Users and I want search a user or a list of users in this DataTable. I try it butit don't work :(
Here is my c# code:
public DataTable GetEntriesBySearch(string username,string location,DataTable table)
{
list = null;
list = table;
string expression;
string sortOrder;
expression = "Nachname = 'test'";
sortOrder = "nachname DESC";
DataRow[] rows = list.Select(expression, sortOrder);
list = null; // for testing
list = new DataTable(); // for testing
foreach (DataRow row in rows)
{
list.ImportRow(row);
}
return list;
}
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…