Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Generate same password in the same second
Message
De
10/11/2008 02:42:37
 
 
À
10/11/2008 02:32:02
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01360833
Message ID:
01360841
Vues:
8
>>try
>>
>>dim loRnd = new Random( DateTime.Now.Ticks.GetHashCode() );
>>
>
>It is the same thing.

sorry Michel, but
var xx = new Random(DateTime.Now.Ticks.GetHashCode());
works perfectly here

The Random constructor takes an int32 and .GetHashCode() returns an int32

I don't understand it

btw, what about making loRnd a static field ?
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform