-1

Can we define a constructor with 'Friend' modifier?

     Friend Class Reader

       Friend Sub New()
       End Sub

     End Class

Thanks!

Jyina
  • 2,204
  • 8
  • 37
  • 72

1 Answers1

2

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.

Hans Passant
  • 897,808
  • 140
  • 1,634
  • 2,455