站内搜索: 请输入搜索关键词
当前页面: 图书首页 > NET For Java Developers Migrating To C#

NET For Java Developers Migrating To C#

[ directory ] Previous Section Next Section

From the Authors to You

Writing this book has been a great learning experience for us. We were pleasantly surprised to discover that C# is not very different from Java, with a few exceptions. As a Java programmer, you should consider yourself equipped with the basic strategies, patterns, and idioms that you are used to coding in the Java world, because you can easily carry over most of these practices into the C# world.

The main difference we have discovered between the two languages is that Java emphasizes consistency by modeling everything as a class, whereas C# has many more programming constructs that are not classes: enums, structs, properties, indexers, delegates, and pointers. This means that you can continue to model everything as a class in C#, but if you do that you will rob yourself of the benefit of exploiting the built-in efficiencies in some of the C# constructs. These constructs also make the resulting code a little bit more expressive. With this in mind, we have encouraged you wherever possible to use the C# style.

Finally, we encourage you to play with the Visual Studio .NET IDE. It is not necessary to use it to program in C#, but we recommend it because it will help you crank out applications and reduce some of the tedium of designing a lot of big applications fast.

    [ directory ] Previous Section Next Section