Is it bad to have an object subscribe to an event multiple times?

I forget the actual context, but in a project I have a class that has a method that subscribes to an event of another object if that object is not null. I don't think I could figure out a way to check if the event has been subscribed to already. Is it a performance cost to keep re-subscribing to an event every time this method is called? Or is C#/.NET smart enough to ignore multiple requests from the same object to subscribe to the same event?

by nickcut via /r/csharp

Leave a Reply