Instead of this can i write it in such a way that the definition is inside the function?
delegate object ObjFunc(long c);
static Object MyFunc(this SqlConnection conn, ObjFunc func)
{
return func(1);
}
Instead of this can i write it in such a way that the definition is inside the function?
delegate object ObjFunc(long c);
static Object MyFunc(this SqlConnection conn, ObjFunc func)
{
return func(1);
}
You can't. But you may want to use Func<long, object>
already present in .NET 3.5.