Class

# MemberInfo

<div class="rst-class">

forsearch

</div>

Introspection

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

<span class="title-ref">MemberInfo</span> is the super class for the `AttributeInfo</api/language/introspection/attributeinfo>`, `ConstructorInfoInfo</api/language/introspection/constructorinfo>`, `MethodInfo</api/language/introspection/methodinfo>`, `PropertyInfo</api/language/introspection/propertyinfo>`, and `TypeInfo</api/language/introspection/typeinfo>` classes in the `Introspection</api/language/introspection/introspection>` system.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                  | Type                               | Read-Only | Shared |
|---------------------------------------|------------------------------------|-----------|--------|
| `IsPrivate<memberinfo.isprivate>`     | `Boolean</api/data_types/boolean>` | ✓         |        |
| `IsProtected<memberinfo.isprotected>` | `Boolean</api/data_types/boolean>` | ✓         |        |
| `IsPublic<memberinfo.ispublic>`       | `Boolean</api/data_types/boolean>` | ✓         |        |
| `Name<memberinfo.name>`               | `String</api/data_types/string>`   | ✓         |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                      | Parameters | Returns                                                      | Shared |
|-------------------------------------------|------------|--------------------------------------------------------------|--------|
| `GetAttributes<memberinfo.getattributes>` |            | `AttributeInfo()</api/language/introspection/attributeinfo>` |        |

## Property descriptions

<div id="memberinfo.isprivate">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MemberInfo.IsPrivate

**IsPrivate** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the item has Private scope.
>
> This property is read-only.
>
> The following example checks the IsPrivate property before taking an action.
>
> ``` xojo
> Var d As DateTime = DateTime.Now
>
> For Each prop As Introspection.PropertyInfo In Introspection.GetType(d).GetProperties
>   If prop.IsPrivate Then
>     ' take an action here..
>   End If
> Next
> ```

<div id="memberinfo.isprotected">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MemberInfo.IsProtected

**IsProtected** As `Boolean</api/data_types/boolean>`

> Is `True</api/language/true>`, the item has Protected scope.
>
> This property is read-only.
>
> ``` xojo
> Var d As DateTime = DateTime.Now
>
> For Each prop As Introspection.PropertyInfo In Introspection.GetType(d).GetProperties
>   If prop.IsProtected Then
>     ' take an action here..
>   End If
> Next
> ```

<div id="memberinfo.ispublic">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MemberInfo.IsPublic

**IsPublic** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the item has Public scope.
>
> This property is read-only.
>
> This example checks the IsPublic property before taking an action.
>
> ``` xojo
> Var d As DateTime = DateTime.Now
>
> For Each prop As Introspection.PropertyInfo In Introspection.GetType(d).GetProperties
>   If prop.IsPublic Then
>     ' take an action here..
>   End If
> Next
> ```

<div id="memberinfo.name">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MemberInfo.Name

**Name** As `String</api/data_types/string>`

> The name of the item. This is only the class name. To get the full namespace path, use FullName instead.
>
> This property is read-only.
>
> This code gets the list of properties for the passed type instance.
>
> ``` xojo
> Var d As DateTime = DateTime.Now
>
> For Each prop As Introspection.PropertyInfo In Introspection.GetType(d).GetProperties
>   ListBox1.AddRow(prop.Name)
> Next
> ```

## Method descriptions

<div id="memberinfo.getattributes">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MemberInfo.GetAttributes

**GetAttributes** As `AttributeInfo()</api/language/introspection/attributeinfo>`

> Returns an array of `AttributeInfo</api/language/introspection/attributeinfo>` objects.
>
> The following gets the attributes of window1.
>
> ``` xojo
> Var myAttributes() As Introspection.AttributeInfo = Introspection.GetType(Window1).GetAttributes
> ```

## Sample code

The following reports the name of the class instance.

``` xojo
Var d As DateTime.Now
Var t As Introspection.TypeInfo = Introspection.GetType(d)
MessageBox("My class name is " + t.Name + ".")
```

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The following gets the attributes of window1.

``` xojo
Var myAttributes() As Introspection.AttributeInfo= _
  Introspection.GetType(Window1).GetAttributes
```

## Compatibility

|                       |     |
|-----------------------|-----|
| **Project Types**     | All |
| **Operating Systems** | All |

<div class="seealso">

`Object</api/data_types/additional_types/object>` parent class; `Introspection</api/language/introspection/introspection>` module; `AttributeInfo</api/language/introspection/attributeinfo>`, `ConstructorInfo</api/language/introspection/constructorinfo>`, `MethodInfo</api/language/introspection/methodinfo>`, `ObjectIterator</api/language/introspection/objectiterator>`, `ParameterInfo</api/language/introspection/parameterinfo>`, `PropertyInfo</api/language/introspection/propertyinfo>`, `TypeInfo</api/language/introspection/typeinfo>` classes; `GetTypeInfo</api/language/introspection/gettypeinfo>` function.

</div>
