title: Pass a C# Class Object to a Python file
body: <p>Okay... I'm trying to pass an Object which I declare in C# to a Python file with IronPython.</p>
  
  <p>So this is what I was thinking off:</p>
  
  <p>C# class:</p>
  
  <pre><code>public class ParamObj
  {
     private string Obj_String;
     private int Obj_Int;
  
     public ParamObj(string lObjS, string lObjI)
     {
        Obj_String = lObjS;
        Obj_Int = lObjI;
     }
  
     public string getString()
     {
        return Obj_String;
     }
  
     public int getInt()
     {
        return Obj_Int;
     }
  
     public setString(string lStr)
     {
        Obj_String = lStr;
     }
  
     public setInt(int lInt)
     {
        Obj_Int = lInt;
     }
  }
  </code></pre>
  
  <p>So i have my Class.. Now i declare the Class in my C# Project and i pass it to the PYthon file:</p>
  
  <pre><code>ParamObj Test_Object = new ParamObj("Test Object from C#", 1337);
  var ipy = Python.CreateRuntime();
  dynamic Test = ipy.UseFile("Test.py");
  
  Test_Object = Test.ObjectAsParam(Test_Object);
  
  Console.WriteLine(Test_Object.getString(), Convert.ToString(Test_Object.getInt()));
  </code></pre>
  
  <p>And now I want to use the Object in my Pythoin file and call it's methods.
  So and the Code in my Test.py is as follows:</p>
  
  <pre><code>def ObjectAsParam(Obj):
  
      print Obj.getString()
      print str(Obj.getInt())
  
      Obj.setString("Changed!")
      Obj.setInt(1338)
  
      return Obj
  </code></pre>
  
  <p>But my Compiler says that the python script doesn't know the Methods
  getString(), getInt() etc. </p>
  
  <p>So is there a way to manage that ?</p>
  
  <p>Thanks</p>