rspec/rules/S3876/csharp/rule.adoc

11 lines
332 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
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
}
----