亚洲免费乱码视频,日韩 欧美 国产 动漫 一区,97在线观看免费视频播国产,中文字幕亚洲图片

      1. <legend id="ppnor"></legend>

      2. 
        
        <sup id="ppnor"><input id="ppnor"></input></sup>
        <s id="ppnor"></s>

        c#用for循環(huán)textbox判斷是否為空

        字號(hào):


            有N個(gè)textbox,id是連續(xù)的,如textbox1,textbox2。。。。
            用for循環(huán)判斷這N個(gè)textbox,如果為空,獲取當(dāng)前控件id
            private TextBox findEmpy()
            {
            for(int i=1;i<N;i++)
            {
            object o=findcontrol("textbox"+i);
            if(o!=null && o is TextBox)
            {
            TextBox t=(TextBox)o;
            if(t.Text=="")
            {
            return t;
            }
            }
            }
            return null;
            }
            private object findcontrol(string name)
            {
            object o = this.GetType().GetField(name, System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.IgnoreCase).GetValue(this);
            return o;
            }