Co nazw muszę dostać moje rozszerzenie do pracymetodę rozszerzenia w C# 2.0
Tu jest moja metoda Extension
using System; using System.Collections.Generic; using System.Web; using System.Data; namespace MyUtilities { public static class DataReaderExtensions { public static DataTable ToDataTable(IDataReader reader) { DataTable table = new DataTable(); table.Load(reader); return table; } } }
Kiedy próbuję użyć go w tak
Session["Master"] = cust.GetCustomerOrderSummary((string)Session["CustomerNumber"]).ToDataTable();
to nie działa. To jest .net 2.0