Last Updated on May 22, 2022
C# (pronounced “See Sharp”) is a multi-purpose computer programming language suitable for a wide variety of development needs.
C# combines the power and flexibility of C++ with the simplicity of Visual Basic. It encompasses strong typing, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines with support for the concepts of encapsulation, inheritance, and polymorphism. It incorporates many elements of the expression and statement syntax of C, and has a more refined object-oriented programming syntax than C++.
C# is one of the more popular programming languages, but is not as widely used as say C, Java, C++ or PHP.
1. C# Programming Yellow Book by Rob Miles
The C# Book is a book that teaches you how to program using C#.
It’s the basis of the first year programming course at the Department of Computer Science in the University of Hull.
This is the 2016 version of the book, the “Cheese” edition. The book can be read at no cost. Kindle and printed versions are available to purchase.
- Computers and Programs – find out what a computer is and get an understanding of the way that a computer program tells the computer what to do. Discover what you should do when starting to write a program. The chapter finishes with a look at programming in general and the C# language in particular.
- Simple Data Processing – create a genuinely useful program. Start by creating a very simple solution and investigate the C# statements that perform basic data processing. The author then uses additional features of the C# language to improve the quality of the solution.
- Creating Programs – build on our programming abilities to make programs that are broken down into manageable chunks and find out how a program can store and manipulate large amounts of data using arrays.
- Creating Solutions – a case study which will allow you to see the features of C# in a strong context.
- Advanced Programming – looks at the ArrayList class, the List class, the Dictionary class, storing business objects, saving an account, loading an account, multiple accounts, handling different kinds of accounts, business objects and editing, threads and threading, structured error handling, program organization, a graphical user interface including the XAML markup language, extensible markup languages, XML schema, and debugging.
- Glossary of Terms.
The author’s website indicates the book is released under an open-source license.
2. Dissecting a C# Application: Inside SharpDevelop by Christian Holm, Mike Krüger, Bernhard Spuida
Learn advanced .NET programming techniques by getting an insiders’ look at a complete application.
The developers who created SharpDevelop give you an inside track on application development with a guided tour of the source code for SharpDevelop. They will show you the most important code features and explain how you can use these techniques in your own projects. You will gain valuable experience of building an application on this scale, learning from the decisions, mistakes, problems and solutions that lead to the current version on SharpDevelop.
The SharpDevelop team will show you how to:
- Build a highly modular application.
- Provide a flexible, extendable, customizable user interface.
- Manage the efforts of translators for efficient internationalization.
- Represent and manipulate text efficiently.
- Code search and replace functionality.
- Construct reusable controls.
- Implement a parser to provide syntax highlighting and auto-completion as users type.
- Use reflection to access information about .NET classes.
- Create a Windows Forms designer.
- Generate code programmatically.
3. Fundamentals of Computer Programming with C# by Svetlin Nakov, Veselin Kolev & Co
This book is designed for beginners. It teaches the reader to think like a programmer and the C# language is just a tool that can be replaced by any other modern programming languages, such as Java, C++, PHP or Python. This is a book on programming, not a book on C#.
The book was originally written in the Bulgarian language by a large team of volunteer software engineers and subsequently translated into English.
The book is distributed freely. Download it here.
4. .NET Book Zero by Charles Petzold
.NET Book Zero – What the C or C++ Programmer Needs to Know About C# and the .NET Framework is a book that provides an introduction to C# and the Microsoft .NET Framework for programmers who have experience with C or C++.
- Why .NET?
- Runtimes and SDKs.
- Edit, Compile, Run, Disassemble – discusses the structure and contents of simple example programs.
- Strings and the Console – a string is an object of type String whose value is text.
- Primitive Data Types – takes a more methodical approach to data types of string, char, int, double and the other primitive data types supported by C# and the CLR.
- Operators and Expressions – operator precedence and associativity, primary operators, unary operators, multiplicative and arithmetic operators, shift operators, relational operators, equality operators, logical operators and conditional operators, and assignment operators.
- Selection and Iteration – discusses statements built around the if, else, switch, case, default, do, while, for, foreach, in, break, continue, and goto keywords.
- The Stack and the Heap – keep memory management and garbage collection in mind in order to optimize the performance of applications.
- Arrays – ordered collections of objects of the same type.
- Methods and Fields.
- Exception Handling – examines C# support for structured exception handling.
- Classes, Structures, and Objects.
- Instance Methods – when a method declaration does not include a static modifier, the method is said to be an instance method.
- Constructors – enable the programmer to set default values, limit instantiation, and write code that is flexible and easy to read.
- Concepts of Equality – explore in more depth the differences between classes (reference types) and structures (value types).
- Fields and Properties – classes and structures have several types of members, most notably fields, methods, constructors, and properties.
- Inheritance – one of the primary features of object-oriented programming. Inheritance provides a structured way to reuse code that has already been written, but inheritance also provides a way to alter or enhance the code in ways that make it more useful or convenient.
- Operator Overloading – permits user-defined operator implementations to be specified for operations where one or both of the operands are of a user-defined class or struct type.
- Interfaces – an interface contains definitions for a group of related functionalities that a class or a struct can implement.
- Interoperability – enables you to preserve and take advantage of existing investments in unmanaged code.
- Dates and Times – a particular moment in time is represented by an object of type DateTime, a structure defined in the System namespace.
- Events and Delegates.
- Files and Streams.
- String Theory.
- Generics – a new feature in version 2.0 of the C# language and the common language runtime (CLR). Generics introduce to the .NET Framework the concept of type parameters, which make it possible to design classes and methods that defer the specification of one or more types until the class or method is declared and instantiated by client code.
- Nullable Types – instances of the System.Nullable struct.
This book is freely distributable.
5. C# Programming by Wikibooks.org
This book provides a through treatment of the C# language.
It covers the language basics, classes, advanced concepts, the .NET framework, and keywords.
Along the way, it introduces C# language fundamentals and covers a variety of the base class libraries (BCL) provided by the Microsoft .NET Framework.
The book is published under the Creative Commons Attribution-ShareAlike 3.0 Unported license.
All books in this series:
|Free Programming Books
|ALGOL-like programming language, extended from Pascal and other languages
|Dependently typed functional language based on intuitionistic Type Theory
|Inexpensive, flexible, open source microcontroller platform
|As close to writing machine code without writing in pure hexadecimal
|Versatile language designed for pattern scanning and processing language
|Shell and command language; popular both as a shell and a scripting language
|Beginner’s All-purpose Symbolic Instruction Code
|General-purpose, procedural, portable, high-level language
|General-purpose, portable, free-form, multi-paradigm language
|Combines the power and flexibility of C++ with the simplicity of Visual Basic
|Dialect of the Lisp programming language
|Common Business-Oriented Language
|Dependently typed language similar to Agda, Idris, F* and others
|General-purpose, concurrent, multi-paradigm, object-oriented language
|CSS (Cascading Style Sheets) specifies a web page’s appearance
|General-purpose systems programming language with a C-like syntax
|Client-optimized language for fast apps on multiple platforms
|Multi-paradigm language supporting functional and object-oriented coding
|Best known as the language embedded in web browsers
|Object-oriented language designed by Bertrand Meyer
|Relatively new functional language running on the Erlang virtual machine
|General-purpose, concurrent, declarative, functional language
|Uses functional, imperative, and object-oriented programming methods
|Dynamic stack-based programming language
|Imperative stack-based programming language
|The first high-level language, using the first compiler
|Compiled, statically typed programming language
|Powerful, optionally typed and dynamic language
|Standardized, general-purpose, polymorphically, statically typed language
|HyperText Markup Language
|Wide variety of features for processing and presenting symbolic data
|Array programming language based primarily on APL
|General-purpose, concurrent, class-based, object-oriented, high-level language
|Interpreted, prototype-based, scripting language
|High-level, high-performance language for technical computing
|More modern version of Java
|Designed to enable domain experts to build power systems quickly
|Professional document preparation system and document markup language
|Unique features - excellent to study programming constructs
|Dialect of Lisp that features interactivity, modularity, extensibility
|Designed as an embeddable scripting language
|Plain text formatting syntax designed to be easy-to-read and easy-to-write
|Object-oriented language that adds Smalltalk-style messaging to C
|The main implementation of the Caml language
|Imperative and procedural language designed in the late 1960s
|High-level, general-purpose, interpreted, scripting, dynamic language
|PHP has been at the helm of the web for many years
|Interpreted, stack-based and Turing complete language
|A general purpose, declarative, logic programming language
|General-purpose, structured, powerful language
|Hierarchical declarative language for user interface layout - JSON-like syntax
|De facto standard among statisticians and data analysts
|General-purpose, object-oriented, multi-paradigm, functional language
|Member of the Perl family of programming languages
|General purpose, scripting, structured, flexible, fully object-oriented language
|Ideal for systems, embedded, and other performance critical code
|Modern, object-functional, multi-paradigm, Java-based language
|A general-purpose, functional language descended from Lisp and Algol
|Visual programming language designed for 8-16 year-old children
|Access and manipulate data held in a relational database management system
|General-purpose functional language characterized as "Lisp with types"
|Powerful and intuitive general-purpose programming language
|Dynamic language based on concepts of Lisp, C, and Unix shells
|Markup and programming language - create professional quality typeset text
|Object-oriented language, syntactically similar to C#
|Hardware description language used in electronic design automation
|Powerful scripting language of the Vim editor
|Rules for defining semantic tags describing structure ad meaning