C#

C#

Made by DeepSource

Consider making static readonly fields const CS-P1003

Performance
Major

Expressions marked as static readonly do not require an object/instance of a class and can be accessed directly. Since they're marked as static, they cannot be modified outside a static constructor. If such fields exist in a class without a static constructor, it is recommended that you mark them as const since expressions marked as const are fully evaluated at the compile-time.

Bad Practice

static readonly string lang = "C#";

Recommended

const string lang = "C#";

Reference