摘要: using System; public class Demo17 { public static void Main() { double d=3.5; Console.WriteLine(Math.Floor(d)); Console.WriteLine(Math.Truncate(d)); ... 阅读全文
posted @ 2007-08-31 20:37 落叶潇潇雨 阅读(289) 评论(1) 推荐(0) 编辑
摘要: explicit 关键字用于声明必须使用强制转换来调用的用户定义的类型转换运算符。 // cs_keyword_explicit_temp.cs using System; class Celsius { public Celsius(float temp) { degrees = temp; } public static explicit ope... 阅读全文
posted @ 2007-08-31 06:58 落叶潇潇雨 阅读(793) 评论(1) 推荐(0) 编辑