String.Contains(char c)

This is something I didn’t know until I stumbled over it by writing some code in a test project, copying it to my main application and getting build errors.

Everybody knows that you have a Contains method on the String class taking another string as argument. But it’s also possible to pass in a char parameter if you’re using the System.Linq namespace (and it just happened to me that this using statement was removed in my main application).

Licensed under CC BY-NC-SA 4.0; code samples licensed under MIT.
comments powered by Disqus
Built with Hugo - Based on Theme Stack designed by Jimmy