Table of Contents

Class ReflectionExtensions

Namespace
CsvHelper
Assembly
CsvHelper.dll

Extensions to help with reflection.

public static class ReflectionExtensions
Inheritance
ReflectionExtensions
Inherited Members

Methods

GetConstructorWithMostParameters(Type)

Gets the constructor that contains the most parameters.

public static ConstructorInfo GetConstructorWithMostParameters(this Type type)

Parameters

type Type

The type.

Returns

ConstructorInfo

GetDefinition(ConstructorInfo)

Gets a string representation of the constructor.

public static string GetDefinition(this ConstructorInfo constructor)

Parameters

constructor ConstructorInfo

The constructor.

Returns

string

GetDefinition(ParameterInfo)

Gets a string representation of the parameter.

public static string GetDefinition(this ParameterInfo parameter)

Parameters

parameter ParameterInfo

The parameter.

Returns

string

GetMemberExpression(MemberInfo, Expression)

Gets a member expression for the member.

public static MemberExpression GetMemberExpression(this MemberInfo member, Expression expression)

Parameters

member MemberInfo

The member to get the expression for.

expression Expression

The member expression.

Returns

MemberExpression

The member expression.

HasConstructor(Type)

Gets a value indicating if the given type has any constructors.

public static bool HasConstructor(this Type type)

Parameters

type Type

The type.

Returns

bool

HasParameterlessConstructor(Type)

Gets a value indicating if the given type has a parameterless constructor. True if it has a parameterless constructor, otherwise false.

public static bool HasParameterlessConstructor(this Type type)

Parameters

type Type

The type.

Returns

bool

IsAnonymous(Type)

Gets a value indicating if the given type is anonymous. True for anonymous, otherwise false.

public static bool IsAnonymous(this Type type)

Parameters

type Type

The type.

Returns

bool

IsUserDefinedStruct(Type)

Gets a value indicating if the type is a user defined struct. True if it is a user defined struct, otherwise false.

public static bool IsUserDefinedStruct(this Type type)

Parameters

type Type

The type.

Returns

bool

MemberType(MemberInfo)

Gets the type from the member.

public static Type MemberType(this MemberInfo member)

Parameters

member MemberInfo

The member to get the type from.

Returns

Type

The type.