Open utterances-bot opened 1 year ago
I kind of agree with you but use this as my preferred approach:
const string User_Table = "User_Table";
You get the power of a constant but the value won't change if someone renames it.
I'm totally fine with it - the const name can be in whatever format. But its value should not depend on how we named it.
C# Tip: do NOT use nameof to give constants a value - Code4IT
In C#, nameof can be quite useful. But it has some drawbacks, if used the wrong way.
https://www.code4it.dev/csharptips/do-not-use-nameof-for-constants