( ! ) Warning: include(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in D:\www\up\CSharp\base03.php on line 20
Call Stack
#TimeMemoryFunctionLocation
10.0000354712{main}( )...\base03.php:0

( ! ) Warning: include(http://pub.houheaven.com/Nav02/Nav_deep2.htm): failed to open stream: no suitable wrapper could be found in D:\www\up\CSharp\base03.php on line 20
Call Stack
#TimeMemoryFunctionLocation
10.0000354712{main}( )...\base03.php:0

( ! ) Warning: include(): Failed opening 'http://pub.houheaven.com/Nav02/Nav_deep2.htm' for inclusion (include_path='.;C:\php\pear') in D:\www\up\CSharp\base03.php on line 20
Call Stack
#TimeMemoryFunctionLocation
10.0000354712{main}( )...\base03.php:0

说明:System.Random是系统预定义的类,它提供产生随机数的方法,此方法必须由类创建的对象调用。

创建类:Random rdm=new Random();

方法功能说明应用实例实例结果
rdm.Next()产生随机数rdm.Next()随机整数
rdm.Next(正整数)产生0至此正整数之间的随机数rdm.Next(50)产生0-50之间的随机整数
rdm.Next(整数1,整数2)产生整数1至整数2之间的随机数rdm.Next(0,100)产生0-100之间的随机整数
rdm.NextDouble()产生0.0-1.0之间的随机实数rdm.NextDouble()0.6
显示框架
显示框架
显示框架
显示框架