如何引用\限定Corsor.Current属性.

编程入门 行业动态 更新时间:2024-10-22 11:36:11
本文介绍了如何引用\限定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属性.

本文发布于:2023-10-18 13:06:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1504308.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:属性   Corsor   Current

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!