asp.net
Before I found a C # verification test, but there is a sentence with vb.net can not find how to write, so that for a long time my verification is repeated, today in the small cobblestone network friend's patience Point, with Dim aa as Integer = CType (DateTime.Now.Ticks Mod System.Int32.MaxValue, Integer) is a random seed, but it is normal to perform in a disconnected situation, and if not, the unhandled exception of System.StackOverflowException ' will happen Mscorlib.dll's Mistakes
So the revised code is as follows, always running out of its own satisfying results
Dim Allchar as String = "A,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i, J,k,l,m,n,o,p,q,r,s,t,u,w,x,y,z "
Dim Allchararray () as String = Allchar.split (",")
Dim Randomcode as String = ""
Dim temp as Integer =-1
Dim Rand as Random = New Random
Dim i as Integer = 0
Do while (I < codecount)
If (temp <> 1) Then
' Rand = New Random (i * temp) if it's not there, it's always going to happen again.
Dim aa as Integer = CType (DateTime.Now.Ticks Mod System.Int32.MaxValue, Integer) ' with vb.net notation, remove the multiplication of I and temp
rand = New Random (aa )
End If
Dim T as Integer = rand. Next (61) + 1 ' +1 is a rewrite, 61 represents the total number of characters, the index value starts from 0
If t > allchararray.length-1 Then t = allchararray.length-1 ' rewrite
& nbsp; If temp = t Then ' The continuous recovery of the authenticator
' return Createrandomcode (Codecount) Mscorlib.dll's dead End
I-= 1 ' rewrite
Randomcode = Microsoft.VisualBasic.Left ( Randomcode, i) ' rewrite
End If
temp = t
Randomcode = Randomcode + allchararray (t)
i + 1
Loop
Return Randomcode
Not as much as books, this is the most I want to say a word, do not let the letter beam bondage their own thoughts oh ^__^