15-11-16, 01:48 AM
كود :
Dim lstNo As New List(Of Integer) From {55, 67, 11, 56, 83, 32, 23, 46, 43, 91, 80, 20, 12}
Dim LstResult As New List(Of Integer)
For toFind As Byte = 0 To 9
Dim found As List(Of Integer) = lstNo.FindAll(Function(value) Val(value.ToString.Substring(1, 1)) = toFind)
found.Sort()
LstResult.AddRange(found)
Next
Dim result As String = String.Join(Environment.NewLine, LstResult)
textbox1.text = resultمع تغيير ما يلزمك من تحويل الادخال المباشر في الكود للارقام ، الى قرائتها من ملف نصي .
الناتج من الكود السابق كالتالي :
كود :
20
80
11
91
12
32
23
43
83
55
46
56
67بالتوفيق
اسم معرفي : محمد يحيى
