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.
精彩评论