C
C#2y ago
devhl

File names for generic class

I usually name my generic classes like Foo`1.cs. I believe Microsoft used to do that too, but looks like they've moved away from that. Is there a reason not to? Or a preferred alternative?
7 Replies
devhl
devhl2y ago
And if I have both? Msft seems to be using an underscore now. Pretty sure that's not how most do it.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
ero
ero2y ago
NameSpace.For.Foo
NameSpace.For.Foo.Generic
NameSpace.For.Foo
NameSpace.For.Foo.Generic
use that as the folder structure too and name both files Foo.cs
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
devhl
devhl2y ago
Yes just the file name. I use the ` and i haven't had any problems.
ero
ero2y ago
why even ask if you don't plan on taking any advice lol
devhl
devhl2y ago
Only advice I didn't take was to put the classes in the same file.