Skip to content

M_CodeJam_Reflection_ReflectionExtensions_GetMemberType

Andrew Koryavchenko edited this page Jun 17, 2018 · 5 revisions

ReflectionExtensions.GetMemberType Method

Gets the type of this member.

Namespace: CodeJam.Reflection
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0

Syntax

C#

public static Type GetMemberType(
	this MemberInfo memberInfo
)

VB

<ExtensionAttribute>
Public Shared Function GetMemberType ( 
	memberInfo As MemberInfo
) As Type

F#

[<ExtensionAttribute>]
static member GetMemberType : 
        memberInfo : MemberInfo -> Type 

Parameters

 

memberInfo
Type: System.Reflection.MemberInfo
A MemberInfo instance.

Return Value

Type: Type
If the member is a property, returns PropertyType.If the member is a field, returns FieldType.If the member is a method, returns ReturnType.If the member is a constructor, returns DeclaringType.If the member is an event, returns EventHandlerType.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type MemberInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also

Reference

ReflectionExtensions Class
CodeJam.Reflection Namespace

Clone this wiki locally