C Sharp Programming (original) (raw)
From Wikibooks, open books for an open world
C sharp logo
C# (pronounced "C Sharp"||"C#") is a multi-purpose computer programming language suitable for a wide variety of development needs. This Wikibook introduces C# language fundamentals and covers a variety of the base class libraries (BCL) provided by the Microsoft .NET Framework.
Main introduction: C Sharp Programming/Foreword
Although C# is derived from the C programming language, it introduces some unique and powerful features, such as delegates (which can be viewed as type-safe function pointers) and lambda expressions which introduce elements of functional programming languages, as well as a simpler single class inheritance model (than C++) and, for those of you with experience in "C-like" languages, a very familiar syntax that may help beginners become proficient faster than its predecessors. Similar to Java, it is object-oriented, comes with an extensive class library, and supports exception handling, multiple types of polymorphism, and separation of interfaces from implementations. Those features, combined with its powerful development tools, multi-platform support, and generics, make C# a good choice for many types of software development projects: rapid application development projects, projects implemented by individuals or large or small teams, Internet applications, and projects with strict reliability requirements. Testing frameworks such as NUnit make C# amenable to test-driven development and thus a good language for use with Extreme Programming (XP). Its strong typing helps to prevent many programming errors that are common in weakly typed languages.
A description of the C# language and introduction to this Wikibook.
A simple C# program and where to get tools to compile it.
Describes the basics in how the applications you write will be interpreted.
Quickly describes the generally accepted naming conventions for C#.
The entities used to store data of various shapes.
Summarizes the operators, such as the '+' in addition, available in C#.
Enumerations, structs, and more.
Loops, conditions, and more. How the program flow is controlled.
Responding to errors that can occur.
Giving your code its own space to live in.
The blueprints of objects that describes how they should work.
Cornerstones of any object-oriented programming language, objects are the tools you use to perform work.
Encapsulation and accessor levels
Explains protection of object states by encapsulation, or the bundling of an object's data and functionality.
Re-using existing code to improve or specialize the functionality of an object.
Define a template, on which to base sub-classes.
Learn about delegates, anonymous delegates, lambda expressions, and events.
Build partially implemented classes.
Split a class over several files to allow multiple users to develop, but also to stop code generators interfering with source code.
Allow commonly used collections and classes to appear to have specialization for your custom class.
Extend the functionality of existing types.
Learn about the lifetime of objects, where they are allocated and learn about garbage collection.
Learn commonly used design methodologies to simplify and/or improve your development framework.
An overview of the .NET class library used in C#.
Input and Output using the console.
GUI Programming with Windows Forms.
Effectively manage (add, remove, find, iterate, etc.) large sets of data.
Learn how to run code concurrently and how to synchronize code.
Communicating with unmanaged code
C# Keywords |
---|
abstract as base bool break byte case catch char checked class const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long namespace new null object operator out override params private protected public readonly ref return sbyte sealed short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using var virtual void volatile while |
Special C# Identifiers (Contextual Keywords) |
add alias async await dynamic get global nameof partial remove set value when where yield |
Contextual Keywords (Used in Queries) |
ascending by descending equals from group in into join let on orderby select where |
- C# Tutorial
- An Introduction to Mono Development by Andrew Troelsen
- C# Environment setup Visual C# environment setup details from MSDN
- C# FAQ C# FAQ, Blogs and Forums.
- C# Language Specification download page at ECMA
- C# Programming Tutorial
- C# Programming Tutorial Collection
- C# Yellow Book (via pdf download)
- Microsoft Visual Studio Community Edition : A free development environment created by Microsoft.
- Mono Project : C# Development Environment for Linux, Windows, and other platforms.