title: Access to Friend class in vb seems less restrictive than in c#
body: <p>We have an existing vb.net project that contains a service reference and an abstract class.  One of the attributes of that class is the PortTypeClient to the service.  The access level of the service is Friend.</p>
  
  
  
  <pre class="lang-vb prettyprint-override"><code>MustInherit Public Class BassyBase
      Private _ODQ As New ODQService.odqPortTypeClient
  
      Public Property ODQClient As Object
          Get
              ODQClient = _ODQ
          End Get
          Set(value As Object)
              _ODQ = value
          End Set
      End Property
  
      Sub New(url as String)
  
          Dim remoteAddress = New System.ServiceModel.EndpointAddress(url)
          Dim binding As New BasicHttpBinding
          binding.MaxReceivedMessageSize = Int32.MaxValue
          ODQClient = New ODQService.dalsPortTypeClient(binding, remoteAddress)
          ODQClient.Endpoint.Binding.SendTimeout = New TimeSpan(0, 0, 0, 30)
      End Sub
  
  End Class
  </code></pre>
  
  <p>The people who are using VB have been using the base class for months without a problem. The base class is in its own DLL.  Child classes are being constructed in separate projects.  I attempted to inherit from the base class in my C# project and found that while the VB guys had access to ODQ as a ODQService.ODQPortTypeClient, that in C# I only had access to it as the Object that it is.  </p>
  
  <p>The C# behavior makes sense to me, as the service is a Friend (internal), and it is in a separate DLL.  Nothing outside the DLL <em>should</em> have knowledge of the service class types.  But, sense or not, I still need to use that base class.  Is there a way to tweak the base class's project so that a C# child class in a separate DLL can know what the type <code>ODQService.ODQPortTypeClient</code> is without making the service completely public?  Perhaps force the accessibility of the service a <code>Protected Friend</code>(Internal)? Somehow?</p>