Cannot implicitly convert type 'int' to 'string'

Hey guys!
I gotta problem, and can't solve it. Can u guys help me figure out what I am doing wrong?
There is a problem with that line:``
User_ID = dbConnect.Select_User_ID(txtEmailZaloguj.Text, txtPasswordZaloguj.Text);

public class dialog_zaloguj : DialogFragment
            {
                public static int User_ID;
                public static string User_FirstName;

                private DBConnect dbConnect;

                void btnZaloguj_Click(object sender, EventArgs e)
                {

                    dbConnect = new DBConnect();

                    User_ID = dbConnect.Select_User_ID(txtEmailZaloguj.Text, txtPasswordZaloguj.Text);
                    User_FirstName = dbConnect.Select_User_FirstName(User_ID);
                }



    class DBConnect : dialog_zaloguj
        {
     public int Select_User_FirstName(int ID)
            {

                string query = "SELECT User_FirstName FROM Users WHERE ID = "+ID+;
        }
    }

Severity Code Description Project File Line Suppression State
Error CS0029 Cannot implicitly convert type 'int' to 'string' Dziennik Treningowy C:\Users\BartusZak\documents\visual studio 2015\Projects\LoginSystem\LoginSystem\dialog_zaloguj.cs 65 Active

Best Answer

Answers

Sign In or Register to comment.