如何引用\限定Corsor.Current属性. [英] How to referance\qualify Corsor.Current property.

查看:61
本文介绍了如何引用\限定Corsor.Current属性.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

代码:

The code:

_parent.Cursor.Current = Cursors.WaitCursor;



给出以下错误:



Gives the following error:

CS0176: Member ''System.Windows.Forms.Cursor.Current.get'' cannot be accessed with an instance reference; qualify it with a type name instead



那么,我该如何适当地限定Cursor的静态成员Current呢?


谢谢-约翰.



So how do I properly qualify Current, which is a static member of Cursor?


Thanks - John.

推荐答案

要分配游标,您只需要
As you are wanting to assign the cursor, you just need
_parent.Cursor = Cursors.WaitCursor;


感谢Reiss,

分配给游标效果很好.

出于好奇,如果您愿意的话,您将如何引用Current属性?
Thanks Reiss,

Assigning to Cursor works fine.

Just out of curiosity how would you reference the Current property if you wanted to?


这篇关于如何引用\限定Corsor.Current属性.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆