Naming conventions [Answered]
I am arguing with my friend about what casing to use in variable names. To settle the argument whatever the first naming convention that someone says (within reason say the actual one that you use) we will use
ie what to use on public, private and method params
C# has an official naming convention, why not use that?
you can also enforce the official coding conventions by fetching a
dotnet new editorconfig
to summarise it, types (classes, records, structs etc) and methods get
PascalCasenames, local variables and parameters get
camelCasenames and private fields get
to add, fields should never be public
right. a "public field" should be a property instead, and those are also
fields should only ever be
private protected, or
protected. properties are
feel like i'm missing one
the convention to add
s_to static things isn't a great one imo
i don't do that personally
dont do protected?
nah this i meant
to close your thread, use
✅ This post has been marked as answered!