i have done following code to generate secure random number. is it correct and efficient and good enough??
Public Sub secrand() Static r As Random = Nothing If r Is Nothing Then Dim seed() As Byte = New Byte(4) {} Dim rng As New RNGCryptoServiceProvider rng.GetBytes(seed) r = New Random(BitConverter.ToInt32(seed, 0)) Label4.Text = r.Next(1000, 9999) End If End Sub