C# Field Naming Guidelines?

后端 未结 17 1315
天命终不由人
天命终不由人 2020-12-02 16:37

I am going to be working on a bit of C# code on my own but I want to make sure that I follow the most widely accepted naming conventions in case I want to bring on other dev

17条回答
  •  感动是毒
    2020-12-02 17:21

    The convention I use to distinguish between private class variables and method parameters is:

    private string baseName;
    private string prefixName;
    private string suffixName;
    
    public GameItem(string baseName, string prefixName, string suffixName)
    {
        this.baseName = baseName;
        this.prefixName = prefixName;
        this.suffixName = suffixName;
    }
    

提交回复
热议问题