title: Cannot implicitly convert type 'System.Threading.Tasks.Task<String> to 'string'
body: <p>I have a WCF Service with the method to return a string.</p>
  
  <p>WCF Service :</p>
  
  <pre><code>public string selectName(int input)
      {
          string firstN, surN,result;
          con.Open();
          SqlCommand cmd = new SqlCommand("SELECT FirstName, Surname FROM tbUserAccounts WHERE StudentID = @ID", con);
          cmd.Parameters.Add("@ID", System.Data.SqlDbType.Int).Value = input;
          SqlDataReader reader = cmd.ExecuteReader();
          if (reader.Read())
          {
              firstN= reader["FirstName"].ToString();
              surN = reader["Surname"].ToString();
              result = firstN + " " + surN;
              con.Close();
              return result;
  
          }
  
          else
          {
              con.Close();
              return string.Empty;
          }
  
     }
  </code></pre>
  
  <p>This method works on the web service end. I've tried with WCFTest client and returns the values expected.
  Now on the application side I'm trying to use these values to add to my static class variables :</p>
  
  <pre><code> private void btnSignIn_Click_1(object sender, RoutedEventArgs e)
      {
  
          Login._name = ServiceClientObj.selectNameAsync(int.Parse(studentIdBox.Text));
          Frame.Navigate(typeof(WelcomePage));
  
  
      }
  </code></pre>
  
  <p>the '<strong>ServiceClientObj.selectNameAsync(int.Parse(studentIdBox.Text));</strong>' is underlined with an error saying</p>
  
  <pre><code>Cannot implicitly convert type 'System.Threading.Tasks.Task&lt;String&gt; to 'string'
  </code></pre>
  
  <p>I'm not familiar with WCF service so I don't understand fully about the use of async.</p>
  
  <p>Any help or explanation would be appreciated. Thank you.</p>