Rider: Where is "Add method to class"?

Hi

I have just realised that I had assumed Resharper was included with JetBrains Rider. Was I wrong about this? Below is a description of a problem I was having finding a Resharper option I am used to having available, but maybe the problem is that Resharper is not included with Rider? I also can't find a Resharper plugin? I do own a Resharper Ultimate subscription, if that helps?

I have just started using Rider on a Mac - I normally use Visual Studio in Windows.

When I am in Visual Studio, there is one Resharper feature I use a lot: I will make a call to a method that doesn't exist, it will highlight the relevant text in some way (I can't remember exactly how and I don't currently have access to Windows so can't check). I then use Alt + Enter to bring up a context menu which gives an option called something like "Add method to class/interface" - again I don't have access to it, so I don't know exactly what it says.

Anyway, in Rider I can't seem to find this option?

 

I have tried googling and searching this forum but because I can't remember exactly what the normal message is, I'm struggling to find anything.

Best wishes

Clare.

3 comments
Comment actions Permalink

Hello Clare!

 

Thank you for contacting us.

Do you mean 'Create method' option? It is presented in Alt+Enter menu in Rider as well:

Thank you.

0
Comment actions Permalink

Hi

It's ok, I've realised the reason it wasn't there is that the object I added the non-existent method to was of generic type. I guess I hoped it would pick up the correct interface for me to add the method to (the generic is specified as implementing a particular interface - I think this would work in Resharper in Visual Studio?), but it's an edge case. In most cases I'm finding "Create method" is indeed there, so it's not too bad.

Here is a screenshot to illustrate what I mean:

You can see that the 'record' object is of type TRecordType, which implements the interface ICSVRecord, so I would hope it would work out that I want to add the method to the ICSVRecord interface - but it doesn't seem to be able to work this out.

Cheers

Clare.

0
Comment actions Permalink

Hello Clare!

 

Thank you for the provided info.

Actually ReSharper doesn't provide suggestion in this case too. 

Here's corresponding issue reported - https://youtrack.jetbrains.com/issue/RSRP-464303.

You are welcome to comment or vote for it.

Thank you.

0

Please sign in to leave a comment.