Class

# ParameterInfo

<div class="rst-class">

forsearch

</div>

Introspection

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

## Description

Used to get information about the parameters of a method via the `Introspection</api/language/introspection/introspection>` system.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                         | Type                                             | Read-Only | Shared |
|----------------------------------------------|--------------------------------------------------|-----------|--------|
| `IsByRef<parameterinfo.isbyref>`             | `Boolean</api/data_types/boolean>`               | ✓         |        |
| `ParameterType<parameterinfo.parametertype>` | `TypeInfo</api/language/introspection/typeinfo>` | ✓         |        |

## Property descriptions

<div id="parameterinfo.isbyref">

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

</div>

<div class="rst-class">

forsearch

</div>

ParameterInfo.IsByRef

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

> `True</api/language/true>` if the parameter is passed `Byref</api/language/byref>`.
>
> This property is read-only.

<div id="parameterinfo.parametertype">

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

</div>

<div class="rst-class">

forsearch

</div>

ParameterInfo.ParameterType

**ParameterType** As `TypeInfo</api/language/introspection/typeinfo>`

> Contains the parameter's datatype.
>
> This property is read-only.

## Notes

You obtain an array of <span class="title-ref">ParameterInfo</span> by calling the `MethodInfo</api/language/introspection/methodinfo>`.GetParameters method. Get the number of parameters for a method by getting the `Arrays.LastIndex<arrays.lastindex>` of the resulting array and cycle through the parameters by examining the ith element. Examine the ParameterType of each element to get its datatype.

## Sample code

This code displays signatures for all methods of a class:

``` xojo
Var cls As Introspection.TypeInfo = GetTypeInfo(Dictionary)
For Each method As Introspection.MethodInfo In cls.GetMethods
  ' Collect parameter types
  Var paramTypes() As String
  For Each paramInfo As Introspection.ParameterInfo In method.GetParameters
    paramTypes.Add(paramInfo.ParameterType.Name)
  Next

  ' Build the method signature
  If method.ReturnType <> Nil Then
    Listbox1.AddRow("Function " + method.Name + "(" + String.FromArray(paramTypes, ", ") + ") As " + method.ReturnType.Name)
  Else
    Listbox1.AddRow("Sub " + method.Name + "(" + String.FromArray(paramTypes, ", ") + ")")
  End If
Next
```

## 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>`, `MemberInfo</api/language/introspection/memberinfo>`, `MethodInfo</api/language/introspection/methodinfo>`, `ObjectIterator</api/language/introspection/objectiterator>`, `PropertyInfo</api/language/introspection/propertyinfo>`, `TypeInfo</api/language/introspection/typeinfo>` classes; `GetTypeInfo</api/language/introspection/gettypeinfo>` function.

</div>
