I suppose I must have a strange setting in my options or something, cause I can't imagine this being an unnoticed bug.
I create a Windows Form Application in VS2008. Then I go to the forms properties and create an event handler for the MouseDown event. In it, I want to use a switch statement to see which mouse button was pushed, so I start with this:
public partial class Form1 : Form
private void Form1_MouseDown(object sender, MouseEventArgs e)
If I then type the word case
inside the switch(mouseButtons), ReSharper's Intellisense isn't offering me anything. If I go ahead and type MouseButtons
followed by a dot, ReSharper automatically changes it to the fully qualified System.Windows.Forms.MouseButtons.
which doesn't make sense (as there is already a using System.Windows.Forms in the code file).
I would've expected Intellisense to offer me a list showing the MouseButtons enumeration. I do get that list if I turn ReSharper off.
If I create a class with a method that defines a MouseButtons variable, the case
still doesn't offer me anything, but when I type MouseButtons followed by a dot, at least it doesn't include the fully qualified name.
If I start typing if (e.Button ==
, IntelliSense does
show me a list with options, with the MouseButtons.Left semi active. In order to actually get the MouseButtons.Right entry, I have to push my down arrow first in order to actually select the item.
I'm not sure what should
happen exactly. I think I would expect Smart Completion to kick in (I have the option to Automatically complete single item with... all turned on). I want to be able to type in case .R<tab>
in order to get case MouseButtons.Right
, as VS2008 does without ReSharper.
If I trigger Smart Completion myself by pressing Ctrl+Alt+Space, it does work (I get the MouseButtons enumeration and ReSharper doesn't add the fully qualified name). Although I still can't type .Right
in order to get that option from the list. I would have to hit the down arrow key to go that the Right enumeration value. VS2008 itself will just show MouseButtons where Smart Completion only shows the members of MouseButtons.
So I have two questions
- Based on the default ReSharper settings, what should happen after typing case?
- What would be the fasted way to type in the case statement? Like I said, in VS2008 itself I can type in
case .r: (case<space><dot>r<colon>) or
if (e.b== .r)
It seems like I have to use more keypresses in ReSharper to get the same result.