c# exception “not all code path return a value” : <p>Hi all I have a method to update my MySQL. I'm using a MS Visual Studio </p>

<pre><code>public static User updateUser(string name, string passwd)
    {
        MySqlConnection connection = new MySqlConnection(conn);
        MySqlCommand cmd;
        string query = "UPDATE USER SET Name='" + name +, Password='" + pass + "' ";
        try
        {
            connection.Open();
            cmd = connection.CreateCommand();
            cmd.CommandText = query;
            cmd.ExecuteNonQuery();
        }
        catch (Exception)
        {
            throw;
        }
  }
</code></pre>

<p>the above returns an error saying  not all code paths return a value.</p>
