'SampleDataContext.passwrdchange(long?,string,string,ref char?)'的最佳重载方法匹配有一些无效的参数 [英] The best overloaded method match for 'SampleDataContext.passwrdchange(long?, string, string, ref char?)' has some invalid arguments

查看:97
本文介绍了'SampleDataContext.passwrdchange(long?,string,string,ref char?)'的最佳重载方法匹配有一些无效的参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下代码: -



I've the following code :-

protected void BtnSave_Click(object sender, EventArgs e)
   {
       using (SampleDataContext dbContext = new SampleDataContext())
       {
           System.Nullable<char> outpt = null;
           long id = Convert.ToInt64(Session["USERID"]);
           dbContext.passwrdchange(id, old.Text.ToString().Trim(), newpass.Text.ToString().Trim(), ref outpt);

           if(outpt.ToString()=="T")
           {
               ClientScript.RegisterStartupScript(this.GetType(), "SuccessMsg", "<script>alert('Password Changed Successfully')</script>");
           }

           else
           {
               ClientScript.RegisterStartupScript(this.GetType(), "ErrorMsg", "<script>alert('Old Password Does Not Match with Records.')</script>");
           }
       }
   }





和我的Sample.designer.cs我有代码: -





and in my Sample.designer.cs I've the code :-

private void UpdateUser_Information(User_Information obj)
	{
		this.passwrdchange(((System.Nullable<long>)(obj.ID)), default(string), default(string),default(System.Nullable<char>));
	}





现在当我编译它时会出错: -



1.



Now when I compile it gives the error :-

1.

The best overloaded method match for 'SampleDataContext.passwrdchange(long?, string, string, ref char?)' has some invalid arguments





2.



2.

Argument 4 must be passed with the 'ref' keyword





请帮助。我不明白该怎么做。



Please Help. I don't understand what to do.

推荐答案

你期待

You expect
Nullable<long>, string, string, ref Nullable<char></char></long>



但是通过


But pass

long, string, string, ref Nullable<char></char>



问题在于长 - Nullable< long> ...


The problem is with the long - Nullable<long>...


这篇关于'SampleDataContext.passwrdchange(long?,string,string,ref char?)'的最佳重载方法匹配有一些无效的参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆