Is it possible to create an extension method using ReSharper?

atreeon

I would like to Alt+Enter on the Update method below (it doesn't exist) to create a new extension method. Is there a way to do this in ReSharper?

List<FootyTeam> existingTeams = GetFootyTeams();
List<XmlTeam> newTeams = GetXmlTeams();

existingTeams.Update(xmlTeams);

(note, I'm new to ReSharper)

Jochen van Wylick

I'm affraid this isn't possible at the moment ( even up to 9.1.3 ). There's the Static Method to Extension Method conversion, but not the refactoring you want.

Convert Static to Extension Method

This new refactoring converts a static method to an extension method. For the conversion to be carried out successfully, the static method must (1) have at least one argument and (2) reside in a static class. The reverse functionality is available with 'Convert Extension Method to Plain Static'.

Source: https://www.jetbrains.com/resharper/features/code_refactoring.html

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Is it possible to create an extension method that is called when the object is created?

From Dev

How to create custom extension point in ReSharper plugin

From Dev

How do I do a Resharper structural search for this generic extension method?

From Dev

using extension method for dropdown

From Dev

Possible to create a "shorthand" method?

From Dev

How To Create ToJsonAsync Extension Method?

From Dev

Resharper possible null reference warning on XElement Element method

From Dev

Using custom extension (/x) in resharper 9.0 command line inspection

From Dev

Do I need to consider possible re-entrant coding issues when using the await operator in an extension method?

From Dev

is there possible calling gwt jsni method with chrome extension using chrome.tab.executeScript?

From Dev

Is it possible to create "extension methods" like in C#, using macro in C++ ?

From Dev

Is it possible to use .AsParallel Extension Method in PCL?

From Dev

Kotlin Annotation Processing: is it possible to generate an extension method?

From Dev

Is it possible to write an extension method for a generic Enum type?

From Dev

Is using an array as a method possible?

From Java

Is it possible to create an interface in a typescript method?

From Dev

Is possible create a method with an undefined type?

From Dev

How to create MVC Extension Method for Dynamic type

From Dev

How to create an extension method on IHtmlHelper<dynamic>

From Dev

How to create extension method for Enum type argument?

From Dev

How to create extension method for Enum type argument?

From Dev

Create Array.ReturnLength() extension method?

From Dev

How to create a linq extension method with Func<>?

From Dev

How to create the IQueryable version of IEnumerable extension method?

From Dev

Is it possible to use Specflow with Resharper?

From Dev

Is it possible to extend a generic class using extension methods?

From Dev

Is it possible to load the Sqlite JSON Extension using SQL?

From Dev

Create method using ASM

From Dev

Is it possible to create a Method to iterate through a menu using a 2d array?

Related Related

  1. 1

    Is it possible to create an extension method that is called when the object is created?

  2. 2

    How to create custom extension point in ReSharper plugin

  3. 3

    How do I do a Resharper structural search for this generic extension method?

  4. 4

    using extension method for dropdown

  5. 5

    Possible to create a "shorthand" method?

  6. 6

    How To Create ToJsonAsync Extension Method?

  7. 7

    Resharper possible null reference warning on XElement Element method

  8. 8

    Using custom extension (/x) in resharper 9.0 command line inspection

  9. 9

    Do I need to consider possible re-entrant coding issues when using the await operator in an extension method?

  10. 10

    is there possible calling gwt jsni method with chrome extension using chrome.tab.executeScript?

  11. 11

    Is it possible to create "extension methods" like in C#, using macro in C++ ?

  12. 12

    Is it possible to use .AsParallel Extension Method in PCL?

  13. 13

    Kotlin Annotation Processing: is it possible to generate an extension method?

  14. 14

    Is it possible to write an extension method for a generic Enum type?

  15. 15

    Is using an array as a method possible?

  16. 16

    Is it possible to create an interface in a typescript method?

  17. 17

    Is possible create a method with an undefined type?

  18. 18

    How to create MVC Extension Method for Dynamic type

  19. 19

    How to create an extension method on IHtmlHelper<dynamic>

  20. 20

    How to create extension method for Enum type argument?

  21. 21

    How to create extension method for Enum type argument?

  22. 22

    Create Array.ReturnLength() extension method?

  23. 23

    How to create a linq extension method with Func<>?

  24. 24

    How to create the IQueryable version of IEnumerable extension method?

  25. 25

    Is it possible to use Specflow with Resharper?

  26. 26

    Is it possible to extend a generic class using extension methods?

  27. 27

    Is it possible to load the Sqlite JSON Extension using SQL?

  28. 28

    Create method using ASM

  29. 29

    Is it possible to create a Method to iterate through a menu using a 2d array?

HotTag

Archive