Chapter 3. C Overview for Sophisticated Programmers

for RuBoard

Chapter 3. C# Overview for Sophisticated Programmers

In this chapter we quickly cover the essentials of the C# language, which should be quite easy for you to learn if you have experience with C++ or Java. A "hello, world" program introduces the basic structure of C# programs. We then cover variables , operators, control structures, formatting, methods , and input/output. Classes are fundamental in C#, and we examine them in some detail. Besides the standard features, C# adds some convenience features, such as properties. We cover the essentials of data types in C#, which correspond to types in the Common Type System. We discuss the fundamental distinction between value and reference types and see how to convert between them using boxing and unboxing operations.

C# has a string type, and the StringBuilder class can be used for dynamically changing strings. We examine arrays in C# and some operations provided by the System.Array class. We then cover some additional topics concerning methods, including parameter passing, variable length parameter lists, method overloading, and operator overloading. We discuss exception handling in C# in some detail, including the use of user -defined exception classes and structured exception handling.

We conclude the chapter by looking at how you can have "unsafe" sections of C# code, which can be used to work with pointers for efficiency or for interoperating with legacy code.

for RuBoard


Application Development Using C# and .NET
Application Development Using C# and .NET
ISBN: 013093383X
EAN: 2147483647
Year: 2001
Pages: 158

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net