生成50个四位的随机小数,而且绝对不会重复:
Dim Values As New List(Of Double)Do Dim b As Double = Math.Round(Rand.NextDouble,4) If values.Contains(b)= False Then values.Add(b) End If If values.count = 50 Then Exit Do End IfLoop