开发者

What the equalivant code as SQL Server RAND ( [ seed ] )?

开发者 https://www.devze.com 2023-03-10 09:49 出处:网络
What the equivalent code in C# as SQL Server T-SQL RAND ( [开发者_运维百科 seed ] )?Here\'s a way to create a new random number in C#

What the equivalent code in C# as SQL Server T-SQL RAND ( [开发者_运维百科 seed ] )?


Here's a way to create a new random number in C#

var x = new Random(Seed);
var z = x.Next();

edit Left off the part of actually getting the random #


This should help you out.

http://msdn.microsoft.com/en-us/library/ctssatww.aspx


Random r = new Random();
int val = r.Next();
0

精彩评论

暂无评论...
验证码 换一张
取 消