Alias Any Type in C#12

Shervan360 1,661 Reputation points
2024-08-23T06:11:15.7766667+00:00

Hello,

I want to use the new feature in C#12, but the compiler doesn't know this feature.

Screenshot 2024-08-23 093329

Developer technologies | C#
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 78,236 Reputation points Volunteer Moderator
    2024-08-23T15:25:11.9833333+00:00

    Your issue is that type alias definitions are not allowed in code blocks. Move the definition to before the class definition.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.