C#

C#

Made by DeepSource

Attribute suffix is redundant when using an attribute CS-R1075

Anti-pattern
Major

Attributes in C# are of the form [NameOftheAttribute]. One such example is [Optional]. Since the attribute syntax uses square brackets, there's no need to use the Attribute suffix, even if the name itself has it.

Bad Practice

public void Foo([OptionalAttribute] int x)
{
}

Recommended

public void Foo([Optional] int x)
{
}