PropertyDescriptorCollection.Find 方法
来源:互联网 发布:tensorflow gpu 编辑:程序博客网 时间:2024/06/14 10:47
返回具有指定名称的 PropertyDescriptor,使用布尔值指示是否忽略大小写。
命名空间:System.ComponentModel
程序集:System(在 system.dll 中)
语法
public virtual PropertyDescriptor Find (string name,bool ignoreCase)
public PropertyDescriptor Find (String name, boolean ignoreCase)
public function Find (name : String, ignoreCase : boolean) : PropertyDescriptor
参数
- name
要从集合中返回的 PropertyDescriptor 的名称。
- ignoreCase
如果要忽略属性名称的大小写,则为 true;否则为 false。
返回值
具有指定名称的 PropertyDescriptor,或者如果该属性不存在,则为 空引用(在 Visual Basic 中为 Nothing)。示例
下面的代码示例查找特定的 PropertyDescriptor。它在文本框中输出此 PropertyDescriptor 的组件类型。它要求已在窗体上实例化 button1 和 textBox1。
private void FindProperty() { // Creates a new collection and assign it the properties for button1. PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(button1); // Sets a PropertyDescriptor to the specific property. PropertyDescriptor myProperty = properties.Find("Opacity", false); // Prints the property and the property description. textBox1.Text = myProperty.DisplayName + '\n' + myProperty.Description;}
private void FindProperty(){ // Creates a new collection and assign it the properties for button1. PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(button1); // Sets a PropertyDescriptor to the specific property. PropertyDescriptor myProperty = properties.Find("Opacity", false); // Prints the property and the property description. textBox1.set_Text(myProperty.get_DisplayName() + '\n' + myProperty.get_Description());} //FindProperty
平台
Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、Windows Mobile for Pocket PC、Windows Mobile for Smartphone、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition
.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求。
版本信息
.NET Framework
受以下版本支持:2.0、1.1、1.0.NET Compact Framework
受以下版本支持:2.0、1.0请参见
参考
PropertyDescriptorCollection 类PropertyDescriptorCollection 成员
System.ComponentModel 命名空间
PropertyDescriptor 类
TypeDescriptor
原文地址:https://msdn.microsoft.com/zh-cn/library/system.componentmodel.propertydescriptorcollection.find(v=vs.80).aspx
- PropertyDescriptorCollection.Find 方法
- PropertyDescriptorCollection 类
- find方法
- find方法
- ubuntu find方法
- Session.find()方法
- Excel的Find方法
- javascript get find 方法
- getHibernateTemplate().find()方法
- getHibernateTemplate().find方法详解
- getHibernateTemplate().find方法详解
- ubuntu find方法
- ubuntu find方法
- 文件查找find方法
- gethibernatetemplate的find方法
- getHibernateTemplate().find 方法大全
- thinkphp find方法
- getHibernateTemplate().find方法详解
- 机器学习---决策树(decision tree)算法
- LeetCode#671 Second Minimum Node In a Binary Tree (week13)
- Java IO 操作基础2---操作 ZIP 压缩文件
- Masonry学习之使用常量
- 软件单元测试操作步骤(java版)
- PropertyDescriptorCollection.Find 方法
- jz2440开发板基本操作
- IEEE 802.11 MAC理解(一)
- 机器学习---决策树decision tree的应用
- PropertyDescriptorCollection 类
- sqlmap用法【mark一些有用的参数】
- 魔方公式
- Apache log4j-1.2.17源码学习笔记
- mysql 5.6 zip 中文字符配置问题 mysql启动失败 更改my.ini