我在vb.net中看到了以下类声明:
Public Class [Interface] Implements TestInterface
Run Code Online (Sandbox Code Playgroud)
以上是什么意思?c#中有等价物吗?
这是一个名为的普通类Interface.
由于Interface也是一个关键字,它必须用括号括起来强制编译器将其解析为标识符.
在C#中,您可以编写 public class @interface : TestInterface (必须小写才能与C#关键字冲突).
无论使用哪种语言,都不要这样做.它令人困惑,没有任何目的.