[IronPython] IP Tutorial Error

Martin Maly Martin.Maly at microsoft.com
Tue Jan 3 18:35:12 CET 2006

clr.AddReferenceToFile doesn't return any value. It only adds reference to the .NET assembly. The assembly will then show up in clr.References tuple.
The way to use the clr.AddReference is the same as the former sys.LoadAssembly*:

>>> clr.AddReferenceToFile("csextend.dll")
>>> import Simple
>>> Simple(10)



From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Catalin Lungu
Sent: Tuesday, January 03, 2006 7:58 AM
To: Discussion of IronPython
Subject: [IronPython] IP Tutorial Error

I compiled the folowing class with "csc" to csextend.dll

using System;
using System.Collections;

public class Simple
 private int data;
 public Simple(int data)
  this.data = data;
 public override string ToString()
  return String.Format("Simple<{0}>", data);

When I try to use the "csextend.dll" module the return variable is null.
>>import clr
>>print a
By the way I have tried with another .cs module and I receive the same result.
I use VS2005 Professional and IronPython 1.0 - Beta1

Any ideea?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060103/616410fe/attachment.html>

More information about the Ironpython-users mailing list