This project is read-only.

Fields must be declared with private access. Use properties to expose fields.

Feb 1, 2012 at 6:33 AM

Hi There,


I get this warning from stylecop always. this makes sense from class perspective. fields should be private and use property to expose the fields

but i have a codebehind where i have declared a control as below. and this warning doesn't make sense.

         /// <summary>
        /// Table used to generate the UI
        /// </summary>
        protected Table HighlightTable;

i don't want to make my controls has private or property and expose it. it has to protected.

please can some clarify this.