need to count or add the number of same digits in a textbox.result from textbox1, textbox2, textbox3, and textbox4. In other words if the user enters "9" in textbox1, "9" in textbox2, "4" in textbox3, and "9" in textbox4, I need to obtain the value of "3" in textbox.result because 9 repeats 3 times. Can someone help me? So far I tried this but doesn't seem to work as expected.


Dim t1 = "9"
Dim t2 = "9"
Dim t3 = "4"
Dim t4 = "9"

Dim result As String = {t1, t2, t3, t4}.GroupBy(Function(t) t).OrderByDescending(Function(g) g.Count).First.Count.ToString