C# Programming for the Absolute Beginner

Скачать в pdf «C# Programming for the Absolute Beginner»



Microsoft C# Programming for the Absolute Beginner


Microsoft C# Programming for the Absolute Beginner………………………………………………………..1


Introduction………………………………………………………………………………………………………………………4


Overview………………………………………………………………………………………………………………….4


Chapter 1: Basic Input and Output: A Mini Adventure…………………………………………………………5


Project: The Mini Adventure……………………………………………………………………………………….5


Reviewing Basic C# Concepts:……………………………………………………………………………………6


Namespaces……………………………………………………………………………………………………….7


Classes………………………………………………………………………………………………………………7


Methods……………………………………………………………………………………………………………..7


Statements:…………………………………………………………………………………………………………7


The Console Object……………………………………………………………………………………………..8


.NET Documentation……………………………………………………………………………………………8


Saying “Hello, World!”………………………………………………………………………………………………12


Getting into the Visual Studio .Net Environment:…………………………………………………….13


Examining the Default Code………………………………………………………………………………..16


Creating a Custom Namespace:…………………………………………………………………………..16


Adding Summary Comments……………………………………………………………………………….17


Creating the Class;……………………………………………………………………………………………..17


Moving from Code to a Program……………………………………………………………………………….19


Compiling Your Program…………………………………………………………………………………….20


Looking for Bugs………………………………………………………………………………………………..21


Getting Input from the User………………………………………………………………………………………22


Creating a String Variable……………………………………………………………………………………24


Getting a Value with the Console.ReadLine() Method……………………………………………..24


Incorporating a Variable in Output………………………………………………………………………..25


Combining String Values………………………………………………………………………………………….26


Combining Strings with Concatenation………………………………………………………………….27


Adding a Tab Character………………………………………………………………………………………27


Using the Newline Sequence:………………………………………………………………………………27


Displaying a Backslash……………………………………………………………………………………….27


Displaying Quotation Marks…………………………………………………………………………………27


Launching the Mini Adventure…………………………………………………………………………………..28


Planning the Story………………………………………………………………………………………………28


Creating the Variables…………………………………………………………………………………………28


Getting Values from the User………………………………………………………………………………29


Writing the Output………………………………………………………………………………………………29


Finishing the Program…………………………………………………………………………………………30


Summary………………………………………………………………………………………………………………..31


Chapter 2: Branching and Operators: The Math Game………………………………………………………32


The Math Game………………………………………………………………………………………………………32


Using Numeric Variables………………………………………………………………………………………….33


The Simple Math Game………………………………………………………………………………………33


Numeric Variable Types………………………………………………………………………………………34


Integer Variables………………………………………………………………………………………………..35


Long Integers…………………………………………………………………………………………………….36


Floating-Point Variables……………………………………………………………………………………..36


Data Type Problems…………………………………………………………………………………………..37


Chapter 2: Branching and Operators: The Math Game


Math Operators………………………………………………………………………………………………….37


Converting Variables……………………………………………………………………………………………….37


Explicit Casting…………………………………………………………………………………………………..39


The Convert Object……………………………………………………………………………………………39


Creating a Branch in Program Logic………………………………………………………………………….41

Скачать в pdf «C# Programming for the Absolute Beginner»