Hi, I'm having trouble accessing static properties in my code. Here's what I
have:

import clr

clr.AddReference("System.Threading")

def CurrentTask():
    from System.Threading.Tasks import Task
    return Task.CurrentTask

def Pause(timeout):
    CurrentTask().Wait(timeout)

However, when I call CurrentTask(), I get an error:

An unhandled exception of type 'System.MissingMemberException' occurred in
Unknown Module.

Additional information: 'type' object has no attribute 'CurrentTask'

What am I doing wrong?
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to