'SampleDataContext.passwrdchange(long?,string,string,ref char?)'的最佳重载方法匹配有一些无效的参数

编程入门 行业动态 更新时间:2024-10-09 11:18:43
本文介绍了'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?)'的最佳重载方法匹

本文发布于:2023-06-03 07:24:47,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/471210.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:参数   方法   passwrdchange   SampleDataContext   long

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!