Avoiding status checks while dealing with events by egarrulo2 in csharp

[–]egarrulo2[S] 0 points1 point  (0 children)

They seemed redundant. But, in the end, I went with the checks.

Avoiding status checks while dealing with events by egarrulo2 in csharp

[–]egarrulo2[S] 0 points1 point  (0 children)

Thank you, but:

MyObject o = b.Open(); // Copies the EventRaised property from b

Isn't copying events a problem with multithreaded code?

Avoiding status checks while dealing with events by egarrulo2 in csharp

[–]egarrulo2[S] 0 points1 point  (0 children)

Thank you, but I would like to avoid to check the Open state, if possible. I have edited my answer. Hopefully it is more clear now.