>>>I have updated my answer
>>
>>I have a compiler warning (green underline) under this test
>>
>>
>> public static Int32 Occurs(this String source, char pattern)
>> {
>> if (null==pattern)
>> return 0;
>> return source.Split(pattern).Length - 1;
>> }
>>
>>It is saying that value of type int never equals null.
>>
>>So, do I really need this test here for char?
>
>Value types are never null - unless declared as nullable
So, I do not need a test above.
BTW, now I am facing a really weird situation. Yesterday I ran the tests, all was well. Today I am getting this error about the method not found :(
I re-added the references in all 3 projects in the solution and now it passes again. Weird.
If it's not broken, fix it until it is.
My Blog