I've read the naming convention in https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions.
However, I couldn't find the answer for this example below:
public class A
{
private int _b;
// Should I use "_" + camel case to name this member:
private string _c => _b.ToString();
// Or should I use pascal case to name this member:
private string C => b.ToString();
}
Should the member
_c
orC
be called "private property" with a getter method or "private calculated field"? why?If we want to use a member private internally with an expression body(
=>
) similar to this example. What is the naming convention for it?