Reputation: 122442
Does C# have a typedef for reference types? I know that there's a using TypeName = RealType
, but does that take effect across multiple files, or just the local scope?
Edit: If it's just in the current file, is there a way to make it global?
Upvotes: 2
Views: 561
Reputation: 48137
There is no global typedef in C#. The closest you can get is subclassing. For instance, you might use it to clean up a complicated generic:
public class FunctionLookups : Dictionary<string, IEnumerable<Func<string, bool>>> {}
Upvotes: 1