Something wrong with "Use 'throw' expression"


I'm running ReSharper 2016.3.2

Considering the following code

if (store == null) throw new ArgumentNullException(nameof(store)); = store;

RS's suggestion is to replace the 1st line with Use 'throw' expression, which will looks like this after use = store ?? throw new ArgumentNullException(nameof(store));

However, after refactoring ?? is highlighted with an error "Expression expected"

Could you please advise if there's some way to fix that?

Comment actions Permalink
Official comment

Hello Ivan,

Please try disabling ReSharper via Tools | Options | ReSharper Ultimate | Suspend Now - will "Use 'throw' expression" suggestion still be in Code Editor? It looks like a Roslyn suggestion.

ReSharper will support such construction in R# 2017.1 


Please sign in to leave a comment.