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
TypeThe type.
Returns
GetDefinition(ConstructorInfo)
Gets a string representation of the constructor.
public static string GetDefinition(this ConstructorInfo constructor)
Parameters
constructor
ConstructorInfoThe constructor.
Returns
GetDefinition(ParameterInfo)
Gets a string representation of the parameter.
public static string GetDefinition(this ParameterInfo parameter)
Parameters
parameter
ParameterInfoThe parameter.
Returns
GetMemberExpression(MemberInfo, Expression)
Gets a member expression for the member.
public static MemberExpression GetMemberExpression(this MemberInfo member, Expression expression)
Parameters
member
MemberInfoThe member to get the expression for.
expression
ExpressionThe 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
TypeThe type.
Returns
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
TypeThe type.
Returns
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
TypeThe type.
Returns
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
TypeThe type.
Returns
MemberType(MemberInfo)
Gets the type from the member.
public static Type MemberType(this MemberInfo member)
Parameters
member
MemberInfoThe member to get the type from.
Returns
- Type
The type.