C# Programmer's HandbookI WAS INSPIRED to write this book because when I needed to transition from C++ to C#, I found few books that helped. All I really wanted was a book that defined the language and showed me simple examples of how to use the .NET Framework. I hope that you will find this book helpful and useful in learning C#. As you read this book, please keep in mind that my goal was to provide you with simple samples showing you how to use this language to do common tasks. I stripped out all but the essential code. Specifically, I removed safeguards such as exception handling that would normally be present in all good code. I advise you strongly to use exception handling in your own code. I have also included in this book material that will be in the next major release of C#, such as generics, anonymous methods, iterators, and more. I wish you the best of luck in your coding. xix Part One C# Language Basics CHAPTER 1 Common Type System • Identifiers and Naming Conventions • Variables • Value Types • Reference Type Variables • Constant and Static Values • Scopes • Casting and Class Conversion 3 Chapter 1 Identifiers and Naming Conventions Identifiers are used to describe allocated memory types such as integer, longs, classes, and other types defined by C# or by you, as the developer. The rules for identifiers are simple: • Identifiers can start with any Unicode letter or an underscore. |
Common terms and phrases
Active allows application args array assembly attribute base basic block bytes changes channel char characters Code Example collection command common Configuration File connection contains create custom database DataSet Debugging default Defines delegate Description Determines Directory DirectoryEntry Display event exception execution expression false fields finalizer following example demonstrates function heap important inherit Initial instance interface keyword load managed memory method modify MyInt MyObject MyString Name namespace Client NOTE null object operator override parameter passed pointer provides public class public static public void Queue reference remoted object Removes requests Search server Service Sets shows specific stack statement static void Main(string stream string System System.Runtime.Remoting Table Test thread Trace Triggered true unmanaged variable Windows World write