C# Field Naming Guidelines?

后端 未结 17 1314
天命终不由人
天命终不由人 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:27

    Following Microsoft's naming conventions, private fields should be prefixed with an underscore.

    For example:

    private int _myValue;
    

    Good luck!

提交回复
热议问题