SoFunction
Updated on 2025-03-01

Uncommon syntax of C# (4.0)


/// <summary>
/// Query the records of the specified table
/// </summary>
/// <param name="table">table name</param>
/// <param name="fields">List of field names for SELECT clause</param>
/// <param name="condition">Query conditions</param>
/// <param name="args">Class of command parameter names separated by half-width commas</param>
/// <param name="vals">Command parameter value array (optional)</param>
/// <returns>Query results</returns>
public static DataTable QueryTable(this string table, string fields = null, int? limit = null, string condition = null, string args = null, params object[] vals)
{
return GetTable((fields, limit, condition, args, vals), 0);
}