Why does Resharper say, “Co-variant array conversion from string[] to object[] can cause run-time exception on write operation” with this code? [duplicate]

The method comboBoxMonth.Items.AddRange expects an object[] parameter. months.ToArray() is string[]. A cast from string[] to object[] is valid, but if the method tries to modify elements of the array, you will get run-time errors. In this case it doesn’t, so you can ignore the warning. If it annoys you, you can use ToArray<object>() comboBoxMonth.Items.AddRange(UsageRptConstsAndUtils.months.ToArray<object>()); It … Read more

Why does Resharper think that an inner class with property “SomeValue” hides a property with the same name in the outer class?

I’m guessing because it means using SomeValue in the inner class means you get the value assigned to the inner class rather than the outer class. Consider this: public static class Super { public static class Sub { public static string OtherValue {get{return SomeValue;}} // Remove this line and OtherValue will return Outer public static … Read more

Can ReSharper be set to warn if IDisposable not handled correctly?

Correct automatic Dispose analysis requires DFA (Data Flow Analysis) in a global way. It is unlikely that you create an IDisposable object and doesn’t call any method on it and do not pass it around as an argument. If disposable object is passed to other methods (including calling its members, when “this” is implicitly passed), … Read more

Uninstall of CodeRush and ReSharper – Intellisense Not Working

Here are a couple of settings to check: Tools > Options > Text Editor > C# > General > Statement completion “Auto list members” and “Parameter information” should be checked. Tools > Options > Text Editor > C# > General > IntelliSense “Show completion list after a character is typed” and “Committed by pressing the … Read more