.NET Tools
Essential productivity kit for .NET and game developers
ReSharper 2023.1 EAP2 Is Available!
Let’s take a quick look at the changes we’ve made in the EAP 2 build, which you can download from this page.
![](https://blog.jetbrains.com/wp-content/uploads/2023/01/RS_231_EAP_Blog_Featured_image_1280x600_ReSharper-2x.png)
C# support
Extract common property pattern
If you use property pattern matching heavily, try our new inspection with a quick-fix to extract common elements from several property patterns when they come together in the code flow. The code generated by the Extract common property pattern
quick-fix helps you reduce code repetition by moving common property patterns to a higher level pattern.
![Extract common property pattern](https://blog.jetbrains.com/wp-content/uploads/2023/01/cs-property-pattern.png)
Reducing the number of lookups in collections
We’ve introduced a set of inspections with corresponding quick-fixes to optimize and speed up your work with different types of collections by reducing the number of lookups in collections:
- To remove a
Contains(item)
, check before adding the itemAdd(item)
into anISet
collection.
![To remove a Contains(item)](https://blog.jetbrains.com/wp-content/uploads/2023/01/cs-hashset-contains.png)
- To remove a
ContainsKey(key)
, check before adding or overriding a value into anIDictionary
collection when possible.
![To remove a ContainsKey(key)](https://blog.jetbrains.com/wp-content/uploads/2023/01/cs-idict-containskey.png)
- To use
TryAdd(key, value)
for anIDictionary
collection when possible.
![To use TryAdd(key, value)](https://blog.jetbrains.com/wp-content/uploads/2023/01/cs-idict-tryadd.png)
- To use
TryGetValue(key, out value)
for anIDictionary
collection when possible.
![To use TryGetValue(key, out value)](https://blog.jetbrains.com/wp-content/uploads/2023/01/cs-dict-trygetvalue.png)
Check out this page for the full list of fixes and improvements.
ReSharper С++
We’ve significantly reworked the macro substitution preview. You can now see the macro expansion with syntax highlighting and proper code formatting in tooltips on hover!
![](https://blog.jetbrains.com/wp-content/uploads/2023/01/image-56.png)
In the Quick Documentation popup (Ctrl+Shift+F1), you can now click any entity from the substitution preview to check out its documentation.
This EAP build also brings new inspections and improves code completion for C++20 modules. To learn more about these features, read this ReSharper C++ blog post.