c#: Actions incomparable?
问题 I'm trying to compare two Actions. The comparison with == always returns false as does the Equals-method even though it's the same instance. My question is: Is it really not possible or am I doing it wrong? Cheers AC 回答1: You are doing it wrong. If I am to believe you, when you say "even though it's the same instance", then the following code executed through LINQPad tells me that you must be doing something wrong, or the "same instance" is incorrect: void Main() { Action a = () => Debug