开发者

Can we define a constructor in Vb.Net with a 'Friend' modifier?

Can we define a constructor with 'Friend' modifier?

开发者_如何学运维
     Friend Class Reader

       Friend Sub New()
       End Sub

     End Class

Thanks!


Yes, no problem. It is superfluous since the Friend accessor on the class already puts the constructor out of reach. The VB.NET compiler doesn't mind though, nor does the C# compiler for that matter. There is no inconsistency.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜