简体   繁体   中英

Are there equivalents to “this” for static variables in c#

I was wondering if I can make my code clearer by indicating one variable is a static class variable. If it wasn't static I could use this.variableName, and everyone would look at it and immediately know that.

I know I could adopt a naming convention like s_variableName, but that seems a little odd to me and increases the learning curve of the code.

Is there an equivalent of "this" for static variables?

使用类型名称对其进行限定:

TypeName.staticVariableName

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM