Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
9 views

C# Programming - Wikibooks, Open Books For An Open World

C# program Copyright wikibooks

Uploaded by

duniyadewana123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

C# Programming - Wikibooks, Open Books For An Open World

C# program Copyright wikibooks

Uploaded by

duniyadewana123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

C# Programming

C Sharp Programming is a featured book


on Wikibooks because it contains
substantial content, it is well-formatted,
and the Wikibooks community has
decided to feature it on the main page
or in other places. Please continue to
improve it and thanks for the great work
so far! You can edit its advertisement
template. Learn more
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.

C sharp logo

Introduction
Main introduction: C Sharp
Programming/Foreword
Copyright has to be used by asking
permission. Copyright lasts longer every
new time.

Wikipedia has related information at C


Sharp (programming language) (http
s://en.wikipedia.org/wiki/C_Sharp_(pr
ogramming_language))

A PDF version is available. (info)

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.
Foreword
A description of the C# language and
introduction to this Wikibook.
Getting started with C#
A simple C# program and where to get
tools to compile it.

Basics

A printable version of C Sharp


Programming is available. (edit it (http
s://en.wikibooks.org/w/index.php?titl
e=C_Sharp_Programming/Print_versio
n&action=edit&preload=Template%3A
Print+version%2FPreload) )
Basic syntax
Describes the basics in how the
applications you write will be
interpreted.
Naming conventions
Quickly describes the generally
accepted naming conventions for C#.
Variables
The entities used to store data of
various shapes.
Operators
Summarizes the operators, such as the
'+' in addition, available in C#.
Data structures
Enumerations, structs, and more.
Control statements
Loops, conditions, and more. How the
program flow is controlled.
Exceptions
Responding to errors that can occur.

Classes
Namespaces
Giving your code its own space to live in.
Classes
The blueprints of objects that describes
how they should work.
Objects
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.

Advanced Topics
Inheritance
Re-using existing code to improve or
specialize the functionality of an object.
Interfaces
Define a template, on which to base sub-
classes.
Delegates and Events
Learn about delegates, anonymous
delegates, lambda expressions, and
events.
Abstract classes
Build partially implemented classes.
Partial classes
Split a class over several files to allow
multiple users to develop, but also to
stop code generators interfering with
source code.
Generics
Allow commonly used collections and
classes to appear to have specialization
for your custom class.
Extension methods
Extend the functionality of existing
types.
Object Lifetime
Learn about the lifetime of objects,
where they are allocated and learn about
garbage collection.
Design Patterns
Learn commonly used design
methodologies to simplify and/or
improve your development framework.

The .NET Framework


.NET Framework Overview
An overview of the .NET class library
used in C#.
Console Programming
Input and Output using the console.
Windows Forms
GUI Programming with Windows Forms.
Collections
Effectively manage (add, remove, find,
iterate, etc.) large sets of data.
Threading
Learn how to run code concurrently and
how to synchronize code.
Marshalling
Communicating with unmanaged code

Examples
K-Means++

Keywords
C# Keywords
abstract as base
byte case catch
class const continue
delegate do double
event explicit extern
fixed float for
if implicit in
internal is lock
new null object
override params private
readonly ref return
short sizeof stackalloc
struct switch this
try typeof uint
unsafe ushort using
void volatile while

Special C# Identifiers (Contex

add alias async await d


get global nameof partial r
set value when where y

Contextual Keywords (Use

ascending by descending
group in into
on orderby select
External links
C# Tutorial (http://csharp.net-informatio
ns.com)
An Introduction to Mono Development
(http://www.devx.com/opensource/Artic
le/31741/1954) by Andrew Troelsen
C# Environment setup (http://msdn2.mi
crosoft.com/en-us/vcsharp/default.asp
x) Visual C# environment setup details
from MSDN
C# FAQ (http://blogs.msdn.com/csharpf
aq/) C# FAQ, Blogs and Forums.
C# Language Specification (http://www.
ecma-international.org/publications/sta
ndards/Ecma-334.htm) download page
at ECMA
C# Programming Tutorial (http://csharp.
net-informations.com)
C# Programming Tutorial Collection (htt
p://pickatutorial.com)
C# Yellow Book (via pdf download) (htt
p://www.csharpcourse.com/)
Microsoft Visual Studio Community
Edition (https://visualstudio.microsoft.c
om/vs/community/) : A free
development environment created by
Microsoft.
Mono Project (http://www.mono-project.
com/Main_Page) : C# Development
Environment for Linux, Windows, and
other platforms.

Retrieved from
"https://en.wikibooks.org/w/index.php?
title=C_Sharp_Programming&oldid=4219242"

This page was last edited on 13 December 2022,


at 18:01. •
Content is available under CC BY-SA 3.0 unless
otherwise noted.

You might also like