EditorOptionAttribute.TryGetOptionValue(IEnumerable, String, Object) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
确定集合是否包含特定属性并返回属性值。
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.