Table of Contents

Class ThisMethod

Namespace
Existential
Assembly
Existential.Net.dll

A utility class for obtaining the name of the calling method at compile time.

public static class ThisMethod
Inheritance
System.Object
ThisMethod
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()

Remarks

This class provides a method to get the name of the calling method at compile time, without requiring reflection. It relies on the CallerMemberName attribute .

Methods

GetName(String)

Gets the name of the calling method at compile time (i.e. not requiring reflection), using the CallerMemberName attribute .

public static string GetName(string inCaller = "")

Parameters

inCaller System.String

No value should be provided for this parameter. The value will be populated by the CallerMemberName attribute .

Returns

System.String

The name of the calling method.