Is there any C# naming convention for a variable used in a property?

后端 未结 12 1674
无人及你
无人及你 2021-01-31 07:26

Let\'s say, we have a variable, which we want named Fubar

Let\'s say that Fubar is a String!

That means, we would define F

12条回答
  •  一整个雨季
    2021-01-31 08:21

    Another way to declare with a default value

        private string _fubar = "Default Value";
        public string Fubar
        {
            get { return _fubar; }
            set { _fubar = value; }
        }
    

提交回复
热议问题