C
C#3y 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
devhlOP3y 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 User3y ago
Message Not Public
Sign In & Join Server To View
ero
ero3y 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 User3y ago
Message Not Public
Sign In & Join Server To View
devhl
devhlOP3y ago
Yes just the file name. I use the ` and i haven't had any problems.
ero
ero3y ago
why even ask if you don't plan on taking any advice lol
devhl
devhlOP3y ago
Only advice I didn't take was to put the classes in the same file.
Want results from more Discord servers?
Add your server