public static string GetParamName(System.Reflection.MethodInfo method, int index)
{
string retVal = string.Empty;
if (method != null && method.GetParameters().Length > index)
retVal = method.GetParameters()[index].Name;
return retVal;
}
The above sample should do what you need.
Related Contents:
- How do I get the path of the assembly the code is in?
- Getting all types in a namespace via reflection
- Find a private field with Reflection?
- How to get a list of properties with a given attribute?
- Getting assembly name
- How costly is .NET reflection?
- Using Case/Switch and GetType to determine the object [duplicate]
- Testing if object is of generic type in C#
- Why is Attributes.IsDefined() missing overloads?
- Purpose of Activator.CreateInstance with example?
- Why do some C# lambda expressions compile to static methods?
- Mapping object to dictionary and vice versa
- How to Load an Assembly to AppDomain with all references recursively?
- How do I check if a type provides a parameterless constructor?
- GetProperties() to return all properties for an interface inheritance hierarchy
- Resolve Type from Class Name in a Different Assembly
- Check if a property exists in a class
- Find type of nullable properties via reflection
- Why is it even possible to change a private member, or run a private method in C# using reflection? [duplicate]
- Loop through an object’s properties and get the values for those of type DateTime
- What is the “cost” of .NET reflection? [duplicate]
- Most efficient way to get default constructor of a Type
- How does WCF deserialization instantiate objects without calling a constructor?
- Get all derived types of a type
- Find Types in All Assemblies
- How to check if property setter is public
- How to get the numeric value from the Enum?
- How do I use reflection to determine the nested type (element type) of an array?
- Why is the use of reflection in .NET recommended?
- For an object, can I get all its subclasses using reflection or other ways?
- What are the implications of asking Reflection APIs to overwrite System.String.Empty?
- How to call generic method with a given Type object? [duplicate]
- How to get Custom Attribute values for enums?
- How to make a simple dynamic proxy in C#
- Using the Web Application version number from an assembly (ASP.NET/C#)
- Checking if Type or instance implements IEnumerable regardless of Type T
- Converting an integer to a boxed enum type only known at runtime
- Using System.Reflection to Get a Method’s Full Name
- GetMethod for generic method [duplicate]
- Lambda expression in attribute constructor
- How to set a property of a C# 4 dynamic object when you have the name in another variable
- GetType in static method [duplicate]
- How to determine if a object type is a built in system type
- Determine if reflected property can be assigned null
- In C#, Is Expression API better than Reflection
- what is reflection in C#, what are the benefit. How to use it to get benifit [closed]
- Activator.CreateInstance Performance Alternative
- Can I get parameter names/values procedurally from the currently executing function?
- “Property set method not found” error during reflection
- How to get the assembly (System.Reflection.Assembly) for a given type in .Net?