title: Async method doesn't return string as expected
body: <p>I'm quite sure this was answered but I can't find it into SO. I want to return a string from my async method, but it returns &quot;System.Threading.Tasks.Task`1[System.String]&quot;, not the string value.</p>
  <p>Calling code:</p>
  <pre class="lang-cs prettyprint-override"><code>DBSql dBSqlSources = new DBSql(ModuleMain.CurrentDatabase.DBServer, ModuleMain.CurrentDatabase.DBDatabase);
  string dataSources = dBSqlSources.GetDataSourceAsync().ToString();
  </code></pre>
  <p>My method:</p>
  <pre class="lang-cs prettyprint-override"><code>public async Task&lt;string&gt; GetDataSourceAsync()
  {
    SqlDataSourceEnumerator instance = SqlDataSourceEnumerator.Instance;
    string ServerName = string.Empty, InstanceName  =string.Empty;
    StringBuilder FullServerName = new StringBuilder(string.Empty);
  
    DataTable table = await Task.Run(() =&gt; instance.GetDataSources());
    foreach (DataRow row in table.Rows)
    {
      try
      {
        ServerName = row[&quot;ServerName&quot;].ToString();
        InstanceName = row[&quot;InstanceName&quot;].ToString();
        if (!string.IsNullOrEmpty(InstanceName))
        {
          FullServerName.Append(string.Concat(ServerName, @&quot;\&quot;, InstanceName));
        }
      }
      catch (Exception ex)
      {
        ModuleMain._Log.AddError($&quot;GetDataSources, {ex.Message}&quot;);
        return string.Empty;
      }
    }
    return FullServerName.ToString();
  }
  </code></pre>