[] jako argument w metodzie

0

Hej co to oznacza że w danej metodzie pojawia się np.

[Values(1,2,3)]int nazwa_zmiennej
6

Attributes (C#)

The following example shows how to apply attributes to methods, method parameters, and method return values in C#.

// default: applies to method
[ValidatedContract]
int Method1() { return 0; }

// applies to method
[method: ValidatedContract]
int Method2() { return 0; }

// applies to parameter
int Method3([ValidatedContract] string contract) { return 0; }

// applies to return value
[return: ValidatedContract]
int Method4() { return 0; }

0 użytkowników online, w tym zalogowanych: 0, gości: 0