I have a question about type of an object in IronPython. I've created .NET type in C# (I've created MyClass class) and compiled my class library project. Let's say I've created TestLibrary.dll in that kind of way. Then I referenced this library in my IronPython project and created IronPython class which inherits from .NET type which is in my TestLibrary.dll. My code looks like this:
import clr
clr.AddReferenceToFileAndPath(r'C:\TestLibrary\TestLibrary\bin\Debug\TestLibrary.dll')
from TestLibrary import *
class TestPythonClass(MyClass):
def doSomething(self):
print('Hello')
But when I created an object of my TestPythonClass I discovered that type of that object is 'IronPython.NewTypes.TestLibrary.MyClass_15$16'.
testPythonClass = TestPythonClass()
typeToString = testPythonClass.GetType().ToString()
Can anyone provide me with some additional information why type of my IronPython object is actually type which is declared into TestLibrary.dll? And why type is not the TestPythonClass?
typefunction. - user2357112 supports Monica