String.Contains(char c)

Tags: .NET, 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).


comments powered by Disqus