EditorOptionAttribute.TryGetOptionValue(IEnumerable, String, Object) 方法

定义

确定集合是否包含特定属性并返回属性值。

public:
 static bool TryGetOptionValue(System::Collections::IEnumerable ^ attributes, System::String ^ optionName, [Runtime::InteropServices::Out] System::Object ^ % optionValue);
public static bool TryGetOptionValue(System.Collections.IEnumerable attributes, string optionName, out object optionValue);
static member TryGetOptionValue : System.Collections.IEnumerable * string * obj -> bool
Public Shared Function TryGetOptionValue (attributes As IEnumerable, optionName As String, ByRef optionValue As Object) As Boolean

参数

attributes
IEnumerable

特性的集合。

optionName
String

要检查的属性的名称。

optionValue
Object

此方法返回时,包含特性的值。 此参数未初始化传递。

返回

true 如果在集合中找到指定的属性,则为 ;否则,为 false.

适用于