private Result Execute(
out T returnValue,
string storedProcedureName,
Hashtable parameters,
ExecuteType executeType)
where T : class
What does the following error mean, and how can I fix it?
Error at where :Constrains are not allowed at non-generic declaration
private Result Execute<T>(
out T returnValue,
string storedProcedureName,
Hashtable parameters,
ExecuteType executeType
) where T : class
Note the required <T>
after Execute
.
Yes It works with extension methods also.
class Class1<T> where T:class
{
public void MethodA()
{
Console.WriteLine("Method A");
}
}
static class ExtenstionTest
{
public static void MethodA<T>(this Class1<T> A1, int a) where T : class
{
Console.WriteLine("Extension Method A" + a);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With