Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# ICustomTypeDescriptor.GetDefaultProperty的含义是什么_C#_.net - Fatal编程技术网

C# ICustomTypeDescriptor.GetDefaultProperty的含义是什么

C# ICustomTypeDescriptor.GetDefaultProperty的含义是什么,c#,.net,C#,.net,在实现ICustomTypeDescriptor时,我偶然发现了GetDefaultProperty方法。我刚刚实现了使用TypeDescriptor.GetDefaultProperty,然后我想知道:我实际上不知道这个方法的预期用途是什么。我猜一个人最有可能首先编辑的属性,比如TextBox.Text,但我似乎无法证实这一点 在这方面没有任何帮助,声明: 返回此组件实例的默认属性 文档中说返回null是针对没有属性的对象。那么,如果我们为3d Box类创建一个ICustomTypeDescr

在实现
ICustomTypeDescriptor
时,我偶然发现了
GetDefaultProperty
方法。我刚刚实现了使用
TypeDescriptor.GetDefaultProperty
,然后我想知道:我实际上不知道这个方法的预期用途是什么。我猜一个人最有可能首先编辑的属性,比如
TextBox.Text
,但我似乎无法证实这一点

在这方面没有任何帮助,声明:

返回此组件实例的默认属性

文档中说返回null是针对没有属性的对象。那么,如果我们为3d Box类创建一个ICustomTypeDescriptor,大致如下:

public class Box {
    public double Length { get; set; }
    public double Width { get; set; }
    public double Height { get; set; }
}
我应该使用什么财产