0

Came across this during a code review and had never seen it before, apparently this is fairly standard.

Two classes one generic and one not with the same name.

public class Bacon
{
}

Filename bacon.cs

public class Bacon<T> : Bacon
{
}

Filename bacon`1.cs

My question is about the file naming. Is this correct? And is there any particular reasoning for this?

Colin Bacon
  • 15,436
  • 7
  • 52
  • 72
  • Whenever I have a generic class that inherits from a non-generic base class of the same name, I put them in the same file. – Dan Jan 27 '15 at 15:07
  • When you decompile code or navigate with visual studio you will see similar names (e.g. List`1) – Nikolay Kostov Jan 27 '15 at 15:08

0 Answers0