Skip to content

Support defining aliases for generic definition types. #68013

@Dogwei

Description

@Dogwei

I've heard that C#12 will improve type aliases, so here's my opinion:
I hope to support defining aliases for generic definition types, example:

 using Map<TKey, TValue> = System.Collections.Generic.Dictionary<TKey, TValue>;
 using IntegerMap<TValue> = System.Collections.Generic.Dictionary<int, TValue>;

If this feature is available, it will be more convenient to rewrite code from other languages into C#.
And it can also solve the problem of generic definition type name conflicts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions