title: Specialise method-parameter in child-class in VB.Net /C#
body: <p>I wrote some wrapper classes for standardize working with database. So I wrote a class for accessing a mssql-db and one for oledb. I want the both to look as much as possible the same. So for example this is my <strong>base class</strong>:</p>
  <pre><code>Public MustInherit Class SqlBase
  
      Public MustOverride Sub ExecuteSelectStatement(ByVal Statement As String, ByVal ParamArray Parameters As DbParameter())
  
  End Class
  </code></pre>
  <p>And now I want to specialise it in <strong>child class</strong> the following way:</p>
  <pre><code>Public Class mssql
      Inherits SqlBase
  
      Public Overrides Sub ExecuteSelectStatement(Statement As String, ParamArray Parameters() As SqlParameter)
          Throw New NotImplementedException()
      End Sub
  End Class
  </code></pre>
  <p>where <strong>SqlParameter itself inherits from DbParameter</strong>. Unfortunaly this approach doesn't seems to work.</p>
  <p>Is there any way to specialise the parameters of a method with types which are inherited from the parameters of the base class. I only found a solution using generics which seems not to be straight forward in my case.</p>
  <p>Any help will be greatly appreciated.</p>