Table of Contents

Method GetPropertySafe

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

GetPropertySafe(Type?, string, BindingFlags)

Same as GetProperty(string) but doesn't raise exceptions.

public static PropertyInfo? GetPropertySafe(Type? type, string propName, BindingFlags bindingFlags = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public)

Parameters

type Type

Type where to search for the property.

propName string

Property name.

bindingFlags BindingFlags

Binding flags used when property is searched. Optional.

Returns

PropertyInfo