假设我有一个代码,或者可以是任何代码。我可以在进度栏中显示代码完成前需要多长时间?
Private Sub BttTxtIntDrawo()
TxtOutput1.Clear()
'TxtIntDraw' - numere repetate de la o extragere la alta.
'Aplicăm condițiile și returnăm valorile distincte în Textbox.
Try
'Throw everything into a list of String initially.
Dim AllNumbers1 As New List(Of String)
'Loop through each TextBox, splitting them by commas
For i As Integer = 0 To TxtIntDrawX.Text
AllNumbers1.AddRange(CType(Me.Controls("txtBoxIntDraw"), TextBox).Lines(i).Split(CChar(",")))
'Remove non-integer entries.
Next
AllNumbers1.RemoveAll(Function(x) Integer.TryParse(x, New Integer) = False)
'Join the distinct list to an array, then back to comma separated format into wherever you want it output.
TxtOutput1.Text = String.Join(",", AllNumbers1.Distinct().ToArray())
Catch ex As Exception
End Try
End Sub