C# Compiler Error – CS8505 a default literal ‘default’ is not valid

In this blog post, you’ll learn more about the C# Compiler Error – CS8505 and the related message description

C# Compiler Error Code

CS8505

C# Compiler Description for the Code :CS8505

A default literal ‘default’ is not valid as a pattern. Use another literal (e.g. ‘0’ or ‘null’) as appropriate. To match everything, use a discard pattern ‘_’.