Checking the Tags of each TextBox in an array
问题 How do I check the Tag property of all the TextBox controls in an array? I want something like this: If textBox.Tag And textbox2.Tag And textbox21.Tag And textbox22.Tag And textbox23.Tag And textbox24.Tag = "2" Then This is my array of TextBoxes: Dim allTextboxes() As TextBox = {textBox, narNaslov, narPersona, narDani, narPersona2, kupIme, kupAdresa, kupKontakt, uvBroj, uvDatum, uvIznos, uvAvans, uvRok, uvNacin, datumTbox} 回答1: You can use the LINQ All()-Method If allTextBoxes.All(Function(t)