返回首页

您好,
我有问题,使用一户一表的方法,在另一种形式

我编码是这样的:
(我进入在TextBox1 123)

public class Form1 : Form

    {

        private string user_code;

 

      public string UserCode

        {

            get { return user_code; }

        }

 

        public bool LoginUser()

        {

       user_code = null;

 

        

        if(textBox1.Text==123){

              user_code="usercode";

                 }

             * 

             */

        }

    }
在Form2和用法:

{C}
现在输出的是一个空字符串,我问过断点,我看到,当我打电话Form2的loginuser了TextBox1中的价值变成空的,如果条件成为假
你觉得什么问题?

TIA的

回答

评论会员: 时间:2
L