title: Passing and retrieving objects using pythonnet
body: <p>How do , In general pass and return objects using pythonnet. For example, this works fine if I'm to return a number:</p>
  
  <pre><code> dynamic par = Python.Runtime.Py.Import("mypackage.pythonfile");
   var t = par.GetPPMError(100, 100.001);
  </code></pre>
  
  <p>where I import a package which as a file called'pythonfile'</p>
  
  <p>This returns a number using the pythonfile.GetPPMError() method</p>
  
  <p>How do I do this:</p>
  
  <pre><code> //C# arrays var double x = new double[500]
   //C# array var double y = new double[500]
   dynamic par = Python.Runtime.Py.Import("mypackage.pythonfile");
   var p = par.GetPeak(x,y)
  </code></pre>
  
  <p>where GetPeak is a python method in the 'pythonfile.py' and p is a class as such for example:</p>
  
  <pre><code>class Peak:
  def __init__(self):
      self.FileID = ""
      self.RT = 0
      self.Intensity = 0
      self.MZ = 0
  </code></pre>
  
  <p>which can then be converted to a C# object?</p>