• 0

[.NET] Collection In Class Or As Needed


Question

I was wondering if anyone could shed some light on which of the following two code segments is preferable and explain why - or are they equal?

public class ContainerEventArgs : EventArgs
{
  ....
   public int ID {get;}
  ....
}
public event EventHandler<IEnumerable<ContainerEventArgs>> MyContainerEvent;

or

public class ContainerEventArgs : EventArgs, IEnumerable<int>
{
   ....
   public IEnumerable<int> IDs {get;}
   ....
}
public event EventHandlerContainerEventArgs> MyContainerEvent;

Thanks.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.