I know this is a stupid question maybe, but what is the naming standard for generics?
Of t or Of TEntity or Of... it doesn't really matter?
I see IQueryable(Of T) but then DBSet(Of TEntity).
Microsoft makes the following recommendations in Generics FAQ: Best Practices:
Name generic type parameters with descriptive names, unless a single letter name is completely self explanatory and a descriptive name would not add value. [...] If you have no additional contextual information about the type parameter, you should use the letter T.
Public Class SomeClass(Of T)
Public Interface ISessionChannel(Of TSession)
I generally follow Microsoft's naming conventions unless I have a really good reason not to, if only because so many other devs do as well, and it's easy to move around different codebases.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With