sql server - C# class object error as unassigned local Variable -
i using visual studio 2013 ans ms sql 2012 database in windows form application c#. stuck error unassigned local variable
private void picturebox3_click(object sender, eventargs e) { //sqlfunctions obj = null; sqlfunctions obj ; if (txtbox_loginid.text !="" && txtbox_loginpassword.text !="") { if (obj.logincheck(int.parse(txtbox_loginid.text), txtbox_loginpassword.text)== 1) { pnl_logincheck.backcolor = color.darkgreen; lbl_login.forecolor = color.white; lbl_login.text = "user id , password entered correct"; lbl_login.font = new font(lbl_login.font.fontfamily, 22); }
when run program got error unassigned local variable
. , when initialize
sqlfunctions obj = null;
i got error unhandled null reference exception @
if (obj.logincheck(int.parse(txtbox_loginid.text), txtbox_loginpassword.text)== 1)
any appreciated.
try sqlfunctions obj = new sqlfunctions();
Comments
Post a Comment