Sorry, please disregard this. I forgot that it was Task.Current, not CurrentTask. My bad.<br><br>
<div class="gmail_quote">2008/7/9 TraumaPony <<a href="mailto:pontheangelofdeath@gmail.com">pontheangelofdeath@gmail.com</a>>:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>Hi, I'm having trouble accessing static properties in my code. Here's what I have:</div>
<div><font size="2">
<p>import clr</p>
<p>clr.AddReference("System.Threading")</p>
<p>def CurrentTask():<br> from System.Threading.Tasks import Task<br> return Task.CurrentTask<br></p>
<p>def Pause(timeout):<br> CurrentTask().Wait(timeout)</p>
<p>However, when I call CurrentTask(), I get an error:</p>
<p>An unhandled exception of type 'System.MissingMemberException' occurred in Unknown Module.</p>
<p>Additional information: 'type' object has no attribute 'CurrentTask'</p>
<p>What am I doing wrong?</p></font></div></blockquote></div><br><br clear="all"><br>-- <br>/"\<br>\ / ASCII RIBBON CAMPAIGN<br>X AGAINST HTML MAIL<br>/ \<br><br>This message has been encrypted with ROT-26. Any unauthorised decryption will result in prosecution to the full extent of the law.