This is probably a pretty obvious question, but how would I go about creating a List
that has multiple parameters without creating a class.
Example:
Get Schema Name and Table Name from a database.
public IList> ListTables()
{
DataTable dt = con.GetSchema("Tables");
var tables = new List>();
foreach (DataRow row in dt.Rows)
{
string schemaName = (string)row[1];
string tableName = (string)row[2];
//AddToList();
tables.Add(Tuple.Create(schemaName, tableName));
Console.WriteLine(schemaName +" " + tableName) ;
}
return tables;
}