option for Implement interface to use lambda implementation

NetMage
edited October 2025 in General

Is there a way to have Implement interface use lambda implementation for one line method bodies?

It would also be nice if the implementations didn't add unnecessary casting when implementing via a field (e.g. don't cast for direct members of the Interface itself).

(PS Why doesn't shift cursor move work properly in the forum search box?)

Best Answer

  • LINQPad uses the Roslyn code fix for this refactoring. I'd have to write one from scratch in order to offer this option.

    The forum is a hosted service.