Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
12
Answers
cannot implicitly convert type 'string' to 'int' in c#
Jyoti Jodha
7y
1.1k
1
Reply
cannot implicitly convert type 'string' to 'int' in c# Windows Application
private int billno(string p)
{
string Billno = "0";
cmd = new SqlCommand(p, con);
con.Open();
SqlDataReader reader = cmd.ExecuteReader();
if (reader.Read())
{
Billno = reader[0].ToString();
}
reader.Close();
return Billno;
con.Close();
}
private void btn_Insert_Click(object sender, EventArgs e)
{
int Billno = billno("Select ISNULL(Max(Billno+1),1) From MainBillForm");
}
Post
Reset
Cancel
Answers (
12
)
Next Recommended Forum
Error in Query in windows application c#
how to get total days in from selected date to till Date