Click or drag to resize

MethodRefGetParameterType Method (Object, Int32, CodeObject, Boolean)

Retrieve the type of the parameter with the specified index from the specified code object for a method, constructor, indexer, or delegate invocation.

Namespace:  Nova.CodeDOM
Assembly:  Nova.CodeDOM (in Nova.CodeDOM.dll) Version: 7.44.8391.13415
Syntax
C#
public static TypeRefBase GetParameterType(
	Object obj,
	int parameterIndex,
	CodeObject parent = null,
	bool dontExpandParams = false
)

Parameters

obj
Type: SystemObject
The code object - can be an IParameters CodeObject (MethodDeclBase, IndexerDecl, DelegateDecl, AnonymousMethodBase), MethodDefinition/MethodInfo, ConstructorInfo, or PropertyDefinition/PropertyInfo for an indexer; or an IVariableDecl CodeObject (PropertyDeclBase, VariableDecl), FieldDefinition/FieldInfo, PropertyDefinition/PropertyInfo, or EventDefinition/EventInfo that has a delegate type).
parameterIndex
Type: SystemInt32
The index of the parameter.
parent (Optional)
Type: Nova.CodeDOMCodeObject
The parent code object for type evaluation purposes.
dontExpandParams (Optional)
Type: SystemBoolean
True if any params type should not be expanded (array not removed).

Return Value

Type: TypeRefBase
The TypeRefBase representing the type of the parameter, otherwise null.
Remarks
This method cannot and does not adjust the index if the passed object is an extension method, because it can't know if the call context provides the first argument implicitly or explicitly.
See Also