title: Convert C# method name to text
body: <p>I am using a generic handler in Visual Studio 2013.</p>
  
  <p>What I am trying to do is to create a URL that incorporates the name of a method, but I want the name of the method to be real code so that it will not be hard-coded and follow along if the function name was changed. </p>
  
  <p>If I were doing this in C or C++, I would have just said:</p>
  
  <pre><code>#define GENERATE_REFERENCE(text) #text
  </code></pre>
  
  <p>I don't really care it is formed as a method call as I have prototyped here</p>
  
  <p>"Pseudo-code" in C# of what I am trying to do: </p>
  
  <pre><code>public class MyClass {
      public void SayHello (String name)
      {
      ...
      }
  
      public void GenerateLink()
      {
           url = "... "+GenerateReference(this.SayHello);
           // url would be "... SayHello";
  
      }
      public String GenerateReference( DataType method )
      {
           // Is there some way to do this?
           return method.MethodName.ToString();
      }
  }
  </code></pre>
  
  <p>My question is different than the suggested duplicate question <a href="https://stackoverflow.com/q/9382216/3803219">get methodinfo from a method reference C#</a> because my question comes from a place of great ignorance of C# mechanisms (neophyte).  The suspected duplicate question implies a much higher level of understanding well beyond what I demonstrated in my question - I didn't know enough to ask that question. I would have never have found this answer from my searching. </p>