What can I do with a protected/private static variable?

前端 未结 7 2280
悲&欢浪女
悲&欢浪女 2021-01-01 18:00

I see I can write :

protected static

in my C# class (in my case, an aspx.cs). As well as :

private static

7条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-01 18:20

    One use is that you can create private static fields, and expose using public static methods/properties (to apply some custom business logic like singleton, etc)

提交回复
热议问题