title: Getting CS1502: The best overloaded method match for <some_method> has some invalid arguments
body: <p>I currently have the following code:</p>
  
  <pre><code>&lt;%@ WebService Language="C#" Class="Notifications" %&gt;
  
  using System;
  using System.Web;
  using System.Web.Services;
  using System.Web.Script;
  using System.Web.Script.Services;
  using System.Collections;
  using System.Collections.Generic;
  using System.Data;
  using System.Data.SqlClient;
  
  public class Notification
  {
      public int id;
      public string text;
  
      public Notification(int m_id, string m_text)
      {
          id = m_id;
          text = m_text;
      }
  
      public Notification() {}
  }
  
  [System.Web.Script.Services.ScriptService]
  public class Notifications : System.Web.Services.WebService {
      List&lt;Notification&gt; Notification = new List&lt;Notification&gt;();
  
      [WebMethod()]
      public List&lt;Notification&gt; GetNotifications()
      {
          var notifications = new List&lt;Notification&gt;();
  
          using (SqlConnection objSQLConnection = new SqlConnection(System.Configuration.ConfigurationManager.AppSettings["connString"]))
          {
              using (SqlCommand objSQLCommand = new SqlCommand("select * from table1 where col1 = @user", objSQLConnection))
              {
                  objSQLCommand.Parameters.Add("@user", SqlDbType.VarChar, 5).Value = "abc";
  
                  objSQLConnection.Open();
                  using (SqlDataReader objSQLDataReader = objSQLCommand.ExecuteReader())
                  {
  
                      while (objSQLDataReader.Read())
                      {
                          notifications.Add(new Notification(objSQLDataReader["id"], objSQLDataReader["text"]));
                      }
  
                  }
              }
          }
  
          return notifications;
      }
  
  }
  </code></pre>
  
  <p>Which is giving me the following error:</p>
  
  <pre><code>Compiler Error Message: CS1502: The best overloaded method match for 'Notification.Notification(int, string)' has some invalid arguments
  </code></pre>
  
  <p>On the line:</p>
  
  <pre><code>notifications.Add(new Notification(objSQLDataReader["id"], objSQLDataReader["text"]));
  </code></pre>
  
  <p>Anyone know why this is happening?</p>