Is there a point to using the C# discard operator for method return values?
问题 Visual Studio 2019's code analysis and code suggestions started to highlight every line of code where I call a method that returns a value but don't use that value at all and tells me to use the discard operator _ . I don't fully understand why that matters and it even seems wrong for Fluent API style code. Is there a functional difference between the two following lines? private int SomeMethod() => 0; ... SomeMethod(); _ = SomeMethod(); ... Would it matter more if the return value is a