简体   繁体   English

关闭它并将值发送给父级(主)window

[英]Close this and send values to parent(Main) window

Deleted with some reasons.因某些原因删除。 Admin may delete this issue, thank you.管理员可以删除这个问题,谢谢。

From the error It seems like something from this TxtName.Text,TxtCode.Text,TxtPrice.Text,TxtMt.Text,TxtQty.Text,MyTotal is null.从错误看来,这个TxtName.Text,TxtCode.Text,TxtPrice.Text,TxtMt.Text,TxtQty.Text,MyTotal是 null。 I recommend you to use breakpoint if you use Visual Studio (Code or any version of VS) and then you will able to see what exactly is null.如果您使用 Visual Studio(代码或任何版本的 VS),我建议您使用断点,然后您将能够看到 null 到底是什么。 Anyway, you also can make a filed in your class nullable like this: public string Text{ get; set; }无论如何,您也可以像这样在 class 中创建一个可以为空的文件: public string Text{ get; set; } public string Text{ get; set; } public string Text{ get; set; } => public string? Text{ get; set; } public string Text{ get; set; } => public string? Text{ get; set; } public string? Text{ get; set; }

Ok guys,好了朋友们,

My fault, my mistake.我的错,我的错。 I just forgot to type "this" between the brackets () frm.ShowDialog(this)我只是忘了在括号 () frm.ShowDialog(this) 之间输入“this”

Now it works fine.现在它工作正常。 Tnx for all answers. Tnx 获取所有答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM