Issue with using a .net class in ironpython -


If I have a net class that is not part of any namespace, then I'm not able to use it in iron python I am

For example

Suppose I have the FULB.LL assembly with the definition of the following class

// Note that the following class is part of the global namespace

public class Foo {}

Now I try to use it as an iron

< Blockquote>

clr.AddReference ("FooLib") # This call is successful.

f = Foo ()

returns the line f = foo ()

traceback (The most recent call last): Error in name:

File "", line 1, in

Name: 'Foo' is not defined

< P> I tried the following

from FooLib import

f = Foo ()

line FooLib import * reports an error that makes sense because the clause should be used because namespace and assembly are not

However, The square fu is related to some namespaces, so I have no problem importing it into harmful

Therefore, my query is that I

You have a global name space associated with it. To use a blank import :

  import clr clr.AddReference ("FooLib") # This call is successful Foo f = Foo ()  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -