CSharp Notes from Microsoft® Visual C#® 2010 Step by Step

简介:

 

  1. The one exception to this rule is the case
    when you multiply Infinity by 0; The value of the expression Infinity * 0 is 0, although
    the value of NaN * 0 is NaN.
  2. If you are familiar with C or C++, you know that you can’t use the remainder operator on
    float or double values in these languages. However, C# relaxes this rule. The remainder operator
    is valid with all numeric types, and the result is not necessarily an integer. For example, the result
    of the expression 7.0 % 2.4 is 2.2.
  3. You cannot use the checked and unchecked keywords to control floatingpoint
    (noninteger) arithmetic. The checked and unchecked keywords apply only to integer
    arithmetic using data types such as int and long. Floating-point arithmetic never throws
    OverflowException—not even when you divide by 0.0. (The .NET Framework has a representation
    for infinity.)





  4. 本文转自 xkdcc 51CTO博客,原文链接:http://blog.51cto.com/brantc/383438,如需转载请自行联系原作者
目录
相关文章
|
C#
一起谈.NET技术,预览:Visual Basic与C#中的异步语法
  在最近的博客文章中,Visual Basic团队发布了一条简单的消息,声称在Visual Basic和C#中将会增加异步编程语法。两种语言新增的Async和Await关键字的实现将基于.NET 4.0中的任务并行库(Task Parallel Library,TPL)。
903 0
|
程序员 C# 索引
.Net程序员必备-打印版Visual C#(VB) 2008 快捷键索引
使用快捷键,减少键盘和鼠标之间的切换会提高工作效率,更重要的是不会打断你的思路。微软专门提供打印版的快捷键索引,用彩色打印机打出来应该非常漂亮,快打印一张贴在工位上吧。 下载地址: Visual C# 2008 Keybinding Reference Poster Visual Ba...