( ! ) Warning: include(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in D:\www\up\CSharp\base04.php on line 20 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0000 | 353576 | {main}( ) | ...\base04.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\base04.php on line 20 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0000 | 353576 | {main}( ) | ...\base04.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\base04.php on line 20 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0000 | 353576 | {main}( ) | ...\base04.php:0 |
使用:(数据类型名称)Data
说明:显式转换又叫强制转换。
float x=5.15f;
int y=(int)x;
说明:隐式转换的一般规律是“变大、变准确”,这就意味着占用空间小的数值型数据类型可以直接转换为占用空间大的类型,比如一个算术运算中,一个操作数为int,一个为float,那么这个int类型的数据会自动转换为float类型,得到的结果也是float。
方法 | 功能说明 | 应用实例 | 实例结果 | |
---|---|---|---|---|
01 | Convert.ToString(any) | 任何→字符串 | Convert.ToString(123) | "123" |
02 | Convert.ToBoolean(Num) | 数字→布尔 | Convert.ToString(123) | true |
03 | Convert.ToChar(Int) | 整数→字符 | Convert.ToString(65) | A |
[ 后天堂 | 这里,只泊同流人 ]