do interfaces belong in files of their own

c#, coding-style, interface

Solution

I would split them into 2 files. I often found classes starting to go unmanageable when they are not in their own files.

Imagine trying to find class Foo in a file named IBar.cs or vice versa.

Problem

As as rule of thumb I generally put classes in a file of their own. Visual studio seems to encourage this but what is appropriate with regards to interfaces? e.g. I have Class Foo that implements interface Bar ``` public interface IBar { } public class Foo : IBar { } ``` it seems natural to group these within the same file until another class implements the interface but to dedicate a file to 2 lines code seems excessive but correct. What is appropriate?

Original source