Skip to content

Instantly share code, notes, and snippets.

@ivanxpetrov
Last active May 18, 2018 04:24
Show Gist options
  • Save ivanxpetrov/176f687fccbf1f9bb07f83e9b38e9d5b to your computer and use it in GitHub Desktop.
Save ivanxpetrov/176f687fccbf1f9bb07f83e9b38e9d5b to your computer and use it in GitHub Desktop.

Revisions

  1. Ivan Petrov revised this gist May 18, 2018. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion CSharp-Useful-Oneliners.cs
    Original file line number Diff line number Diff line change
    @@ -1 +1,7 @@
    System.Reflection.MethodBase.GetCurrentMethod().Name
    System.Reflection.MethodBase.GetCurrentMethod().Name

    //using System.Runtime.CompilerServices;
    public void SendError(string Message, [CallerMemberName] string callerName = "")
    {
    Console.WriteLine(callerName + "called me.");
    }
  2. Ivan Petrov created this gist May 18, 2018.
    1 change: 1 addition & 0 deletions CSharp-Useful-Oneliners.cs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    System.Reflection.MethodBase.GetCurrentMethod().Name