title: How to import c# Classes in Python using Python.Net
body: <p>I'm using <a href="http://pythonnet.github.io/" rel="nofollow noreferrer">Python.NET</a> to create wrapper for a c# code. I am able to import the namespace but when i import the class, i get the error 'Library' has no attribute 'Wrapper'</p>
  
  <pre class="lang-py prettyprint-override"><code>import clr
  clr.AddReference(r'Library.dll')
  from Library import Wrapper
  wrapper = Wrapper()
  </code></pre>
  
  <pre class="lang-py prettyprint-override"><code>dir(Library)
  </code></pre>
  
  <p>Dir command's output does not contain class Wrapper</p>
  
  <p>Here's the C# code-</p>
  
  <pre><code>using System;
  using System.Dynamic;
  
  namespace Library
  {
      public class Functions
      {
          public double Add(double a, double b)
          {
              return a + b;
          }
      }
  
      public class Wrapper : DynamicObject
      {
          public Functions functions;
          public Wrapper()
          {
              functions = new Functions();
          }
  
          public double Add(double a, double b)
          {
              return functions.Add(a, b);
          }
      }
  }
  </code></pre>