Unfortunately, it’s too early to tell about speed. According to Microsoft, the speed between the two languages will be the same. Much of your code actually will be calling classes in the CLR, so that will be the same regardless of the language used to call it. As for the speed of items such as loops and string concatenation, that will depend on the compiler.
Microsoft officials say VB .NET and C# will compile to the same IL, so the result will be the same speed. I must admit I’m skeptical, but there is no way to test this at this time. With .NET still in beta (.NET was not yet final when this article went to press. - Ed.), any speed tests most likely would bear little resemblance to the final product. For now, assume the speed will be very close, and don’t worry about it until .NET is a finished product.
看来速度还是差不多,播种之间。
What about Language Differences?
The differences in the languages are small, but they do exist. For example, C# allows you to have unsigned integers of various sizes, and VB .NET does not. It is important to note, however, that unsigned integers are not part of the Common Language Specification (CLS), a part of the .NET Framework that defines what language elements can be used to allow inheritance between languages. If cross-language inheritance is something you want to ensure, you need to stick to only CLS-compliant types for any exposed parameters and return values.
小细节:C#拥有无符号整数、VB.NET没有。但是无符号数不符合CLS规范,不利于跨语言继承。还是建议不要用无符号数。
VB .NET adds some of the C/C shortcuts, such as =, -=, and others. Now, in VB .NET, x = 5 is the same as x = x 5. However, VB .NET does not support the or -- operators, which C/C programmers frequently use. C# supports all of these, of course. C# also supports the concept of operator overloading, in which a developer can overload operators such as , - , and True. Operator overloading is admittedly not something most VB .NET developers will miss, but it is one of the differences between the two languages.
VB.NET增加了一些
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




