Show / Hide Table of Contents

Class MethodBaseExtensions

Contains extensions for the MethodBase class.

Inheritance
object
MethodBaseExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TheXDS.MCART.Types.Extensions
Assembly: MCART.dll
Syntax
public static class MethodBaseExtensions

Methods

| Edit this page View Source

FullName(MethodBase)

Gets a full name for a method, including the type and the namespace where the same has been defined.

Declaration
public static string FullName(this MethodBase method)
Parameters
Type Name Description
MethodBase method

Method from which to get the full name.

Returns
Type Description
string

The full name of the method, including the type and the namespace where the same has been defined.

| Edit this page View Source

GetBindingFlags(MethodBase)

Infers the BindingFlags used in the definition of the method.

Declaration
public static BindingFlags GetBindingFlags(this MethodBase method)
Parameters
Type Name Description
MethodBase method

Method for which to infer the BindingFlags.

Returns
Type Description
BindingFlags

The BindingFlags inferred based on the properties of the method.

| Edit this page View Source

GetParameterTypes(MethodBase)

Gets an array with the parameter types of the method.

Declaration
public static Type[] GetParameterTypes(this MethodBase method)
Parameters
Type Name Description
MethodBase method

Method from which to extract the collection of parameter types.

Returns
Type Description
Type[]

An array with the types of each of the parameters of the method.

| Edit this page View Source

IsOverridden(MethodBase, object)

Determines if the specified method has been overridden in the provided instance.

Declaration
public static bool IsOverridden(this MethodBase method, object instance)
Parameters
Type Name Description
MethodBase method

Method to check.

object instance

Instance in which to perform the check. Generally, this argument should be this.

Returns
Type Description
bool

true if the method has been overridden in the instance specified, false otherwise.

Exceptions
Type Condition
ArgumentNullException

Thrown if method or instance are null.

InvalidTypeException

Thrown if the definition of method does not exist in the type of instance.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX