Here you can see how ReSharper is suggesting a change
Now here you can see how Resharper is changing up the code but the result is not correct because it is newing up a class, assigning a value to a property on it and then returning a totally new instance of that class that doesn't have the value assigned to it.
I had cursor on the new keyword. Pressed Alt+Enter and chose the option called "use object initializer".
Is this a possible bug in ReSharper or am I just missing something here?
It seems that it is not looking correctly. It should look like:
return new FlightRetrievalResponese
{
test = "this is a test"
};
What is your R# version?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With