Discards are equivalent to unassigned variables; they don't have a value. A discard communicates intent to the compiler and others that read your code: You intended to ignore the result of an expression.
What is the use of discard?
1 : to get rid of especially as useless or unwanted a pile of discarded tires They quickly discarded the idea.
What _ means in C#?
_ means nothing in C#, it is just the name of the variable, would be exactly the same if you leave the _ out.