阅读背景:

'密封班级中的受保护成员'警告(单人班级)

来源:互联网 

I've implemented a singleton class and keep getting the warning that a method I'm writing is a 'new protected member declared in a seal class.' It's not affecting the build but I don't really want to ignore the warning in case it causes problems later on? I understand a sealed class is a class that cannot be inherited - so it's methods cannot be overridden, but I still don't get why the following code would give me the warning (is it due to the use of the singleton design?):I've implemented a singleton class and keep get




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: