11 lines
332 B
Plaintext
11 lines
332 B
Plaintext
Strings and integral types are typically used as indexers. When some other type is required, it typically indicates design problems, and potentially a situation where a method should be used instead.
|
|
|
|
== Noncompliant Code Example
|
|
|
|
----
|
|
public int this[MyCustomClass index] // Noncompliant
|
|
{
|
|
// get and set accessors
|
|
}
|
|
----
|