The reason I ask is because I wrote an extension method for use in Silverlight just to find out that this function magically began to work in silver light.
There is a public bool string.Contains(string) method public bool string.Contains(string) for all .NET versions starting from version 2.0 ( 2.0 , 3.0 , 3.5 , 4.0 , SL 3/4 WP 7.0 / 7.1 ).
It is interesting to note that the SL version is specified only from SL 3/4 - is it possible that you updated the solution 2.0? . Then this could be taken into account.
Otherwise, a particular method always takes precedence over an extension method, so your extension method should never be called (we can exclude .NET 1.1, since the C # 1.2 compiler does not include extension methods).
For MSDN.NET 2.0 documents, this is how:
This method searches for words (case-sensitive and culture-sensitive) using the current culture. The search starts from the first character position of this line and continues to the last character position.
All other versions (including Silverlight) are listed as:
This method performs an ordinal (case-sensitive and culture-insensitive) comparison. The search starts from the first character position of this line and continues to the last character position.
If you see otherwise (please check the high frequencies), this may be a wireframe error ... but I cautiously expect a simpler explanation.
source share