title: C# function uses extension function but VB equivalent does not?
body: <p>So I have the following code in C#:</p>
  <pre><code>public Container ConfigureSimpleInjector(IAppBuilder app)
  {
      var container = new Container();
  
      container.Options.DefaultScopedLifestyle = new AsyncScopedLifestyle();
  
      container.RegisterPackages();  
  
      app.Use(async (context, next) =&gt;
      {
          using (AsyncScopedLifestyle.BeginScope(container))
          {
              await next();
          }
      });
  
      container.Verify();
  
      return container;
  }
  </code></pre>
  <p>The <code>app.Use()</code> is defined as <code>Owin.AppBuilderUserExtensions.Use()</code> and looks like this:</p>
  <p><code>public static IAppBuilder Use(this IAppBuilder app, Func&lt;IOwinContext, Func&lt;Task&gt;, Task&gt; handler);</code></p>
  <p>The VB equivalent is as follows:</p>
  <pre class="lang-vb prettyprint-override"><code>Public Function ConfigureSimpleInjector(app As IAppBuilder) As Container
      Dim container = New Container()
  
      container.Options.DefaultScopedLifestyle = New AsyncScopedLifestyle()
  
      container.RegisterPackages()
  
      app.Use(Async Sub(context, [next])
                  Using AsyncScopedLifestyle.BeginScope(container)
                      Await [next]()
                  End Using
              End Sub)
  
      container.Verify()
  
      Return container
  End Function
  </code></pre>
  <p>For some reason, in the VB version, the <code>app.Use()</code> doesn't use the extension function that's available and simply uses <code>IAppBuilder.Use()</code> instead, as follows:</p>
  <p><code>Function Use(middleware As Object, ParamArray args() As Object) As IAppBuilder</code></p>
  <p>Why does the VB code not use the same extension function that C# does and how can I make it use that?</p>
  <h1>Edit</h1>
  <p>For clarity, the extension methods are not my own. They are from the Owin 3rd party library. So there is no option of renaming the extension methods.</p>