memesearch
Contains Internally Uses IndexOf

Contains Internally Uses IndexOf

Download Find similar pictures
Text on the meme
public bool Contains(string value, StringComparison comparisonType) { #pragma warning disable CA2249 // Consider using 'string.Contains' instead of 'string.IndexOf' ... this is the implementation of Contains! return IndexOf(value, comparisonType) >= 0; #pragma warning restore CA2249 }
What it means

A C# code snippet shows that the implementation of `Contains` calls `IndexOf`, while suppressing the warning that recommends using `Contains` instead of `IndexOf`. The joke is the circular and self-referential implementation: the method being recommended is already built on the supposedly discouraged method. EN: A C# code snippet shows that the implementation of `Contains` calls `IndexOf`, while suppressing the warning that recommends using `Contains` instead of `IndexOf`. The joke is the circular and self-referential implementation: the method being recommended is already built on the supposedly discouraged method.

Objects
Tags
Source
Type
image
Size
800×78 · 13.7 KiB
Mood
ironic
Language
en
Added