System.Reflection.TypeInfo.GetDeclaredProperty C# (CSharp) Method

GetDeclaredProperty() public method

public GetDeclaredProperty ( string name ) : PropertyInfo
name string
return PropertyInfo
		public virtual PropertyInfo GetDeclaredProperty (string name)
		{
			return GetProperty (name, declaredFlags);
		}

Usage Example

            private void FormatKeyValuePair(CommonObjectFormatter.Builder result, object obj)
            {
                System.Reflection.TypeInfo typeInfo = IntrospectionExtensions.GetTypeInfo(obj.GetType());
                object obj1 = typeInfo.GetDeclaredProperty("Key").GetValue(obj, Array.Empty <object>());
                object obj2 = typeInfo.GetDeclaredProperty("Value").GetValue(obj, Array.Empty <object>());

                result.AppendGroupOpening();
                result.AppendCollectionItemSeparator(true);
                this.FormatObjectRecursive(result, obj1, false);
                result.AppendCollectionItemSeparator(false);
                this.FormatObjectRecursive(result, obj2, false);
                result.AppendGroupClosing();
            }
All Usage Examples Of System.Reflection.TypeInfo::GetDeclaredProperty