ReSharper sluggishness
Turn off the on-the-fly compilation (which, unfortunately, is one of its best features)
Turn off the on-the-fly compilation (which, unfortunately, is one of its best features)
You should probably go to ReSharper > Options > Tools > External Sources and configure settings in this page the way that would allow decompiling – for example, select an option different than Default Visual Studio navigation
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
Technically Resharper is correct in that the “else” is unnecessary, I prefer the former version though as the intent is more obvious. Having said that, I’d rather go with: return attr != null ? attr.Value : string.Empty;
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
var reader = new StreamReader(response.GetResponseStream()); I suspect StreamReader constructor’s parameter has a notnull attribute. Try the following: var stream = response.GetResponseStream(); if (stream == null) // throw an exception var reader = new StreamReader(stream);
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
I agree with Giorgi that performance is not the main reason. A code analyzer could just as well determine that a variable declared with let is not ever reassigned and optimize it the same as if you had declared it with const. (Heck, linters have rules to detect this and suggest using const instead of … Read more
I found my solution in the “Options – Text Editor – General” settings. This was on VS 2017 thou.
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