# MemberInfo

## GetMemberValue

Gets value of object member.

```csharp
private class Foo
{
    public int BarProperty { get; set; }
    public string BarField;
}
var foo = new Foo { BarProperty = 1, BarField = "2" };
var result = typeof(Foo).GetMember("BarField").Single().GetMemberValue(foo); // ---> "2"
```

## GetMemberType

Gets type of object member.

```csharp
var result = typeof(Foo).GetMember("BarProperty").Single().GetMemberType(); // ---> int
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.structr.dev/utilities/abstractions/extensions/memberinfo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
