[已关闭问题]
<P>先看代码:</P>
<P> private static void decimal_Type()<BR> {<BR> decimal var1 = 100m;<BR> decimal var2 = 0.99999999999999999999999999m;<BR> float var3 = 0.9999999f;<BR> double var4 = 0.999999999999999d;<BR> Console.WriteLine(var1+var2);<BR> Console.WriteLine(var3);<BR> <FONT color=#ff0000>Console.WriteLine(var4+(double)var2);</FONT><BR> Console.WriteLine(var1.GetType());<BR> }</P>
<P>调试的时候Immediate Window中调试var4+(double)var2的值为:1.9999999999999991</P>
<P>然而Dos窗口(控制台窗口)却是2.这下偶就晕啦.:(</P>