I have an alias
using SpecialFunction = System.Func<SomeClass, SomeOtherClass, AnotherClass>
I'd like to be able to use this alias in multiple classes without having to rewrite it every time. I'm open to this being a class instead of an alias. Is it possible to do this?
I tried inheriting the type as shown below but as System.Func
is sealed this doesn't work.
// This doesn't work as System.Func is sealed
public class SpecialFunction : System.Func<SomeClass, SomeOtherClass, AnotherClass> { }
I have read this question about aliasing types and this question about inheriting directives. I don't believe they provide solutions for this case.