/ Published in: C#
drunkenprogrammer
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public static string GetJavascriptRandomValue() { string strd1 = ranDouble.NextDouble().ToString(); int strd1len = strd1.Length; string strd2 = ranLong.Next().ToString() + ranLong.Next().ToString(); int intDefLength = 18; string strCutFromstrd2 = string.Empty; if (strd1len < intDefLength) { strCutFromstrd2 = strd2.Substring(0, intDefLength - strd1len); } string strRes = strd1 + strCutFromstrd2; return strRes; }
URL: ideabubbling.com