title: How to create your own asynchronous methods with async and await
body: <p>I've been trying to find a solution for quite a long time that would show me how to create Asynchronous methods that do not use existing asynchronous code. IE someClass.ActionAsync()
  I basically have been wanting to do something like</p>
  
  <pre><code>public string GetParsedData(string code){
      Console.WriteLine("Starting parser");
      var result = "";
      foreach(var x in code.Split('\n')){
            result += Encode(x);
      }
  
      return result;
  
  }
  </code></pre>
  
  <p>So I understand I must return a Task, but I have found no information on how to await a lambda expression or any other advice on how to break this down. Oddly I think I found the answer from re-sharper giving me dated advice which I will post below.</p>