KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Can a method in C# return a method? A method could return a lambda expression for example, but I don't know what kind of type parameter could I give to such a method, because a method isn't Type . Such a returned method could be assigned to some delegate. Consider this concept as an example: public <unknown type> QuadraticFunctionMaker(float a , float b , float c) { return (x) => { return a * x * x + b * x + c; }; } delegate float Function(float x); Function QuadraticFunction = QuadraticFunctionMaker(1f,4f,3f);
Tags (comma-separated)
Save Edits
Cancel