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 &lt;<a href="mailto:pontheangelofdeath@gmail.com">pontheangelofdeath@gmail.com</a>&gt;:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>Hi, I&#39;m having trouble accessing static properties in my code. Here&#39;s what I have:</div>
<div><font size="2">
<p>import clr</p>
<p>clr.AddReference(&quot;System.Threading&quot;)</p>
<p>def CurrentTask():<br>&nbsp;&nbsp;&nbsp; from System.Threading.Tasks import Task<br>&nbsp;&nbsp;&nbsp; return Task.CurrentTask<br></p>
<p>def Pause(timeout):<br>&nbsp;&nbsp;&nbsp; CurrentTask().Wait(timeout)</p>
<p>However, when I call CurrentTask(), I get an error:</p>
<p>An unhandled exception of type &#39;System.MissingMemberException&#39; occurred in Unknown Module.</p>
<p>Additional information: &#39;type&#39; object has no attribute &#39;CurrentTask&#39;</p>
<p>What am I doing wrong?</p></font></div></blockquote></div><br><br clear="all"><br>-- <br>/&quot;\<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.