Blue Theme Orange Theme Green Theme Red Theme
 
Home | Forums | Videos | Photos | Downloads | Blogs | Interviews | Jobs | Beginners | Training
 | Consulting  
Submit an Article Submit a Blog 
 Login Close
User Id:
Password:
 
Forgot Password
Forgot Username
Why Register
 Jump to
Skip Navigation Links
TechnologyExpand Technology
WebsiteExpand Website
Ads by Lake Quincy Media
 Resources  
Close
 Our Network  
Close
Search :       Advanced Search »
Home » C# Language » Free Book: C# Programming for Beginners

Free Book: C# Programming for Beginners

In this book, you will learn how to write and compile C# programs, understand C# syntaxes, data types, control flow, classes and their members, interfaces, arrays, and exception handling. After completing this book, you should have a clear understanding of the purpose of C# language, it’s usages, and how to write C# programs.

Author Rank:
Total page views :  220374
Total downloads :  16592
   Print Read/Post comments Post a comment  Similar Articles  
   Email to a friend  Bookmark  Author's other articles  
Download Files:
CsharpProgramming.zip
 
Become a Sponsor


Note: Download all "Download Files" to download the actual book. PDF Version is just the PDF version of this page.

 

Programming C# is a book (56 pages) written in step-by-step tutorial format for beginners and students who want to learn C# programming. It is recommended that you have some programming experience using any of the object-oriented languages such as C++, Pascal, or Java.

 

In this tutorial, you will learn how to write and compile C# programs, understand C# syntaxes, data types, control flow, classes and their members, interfaces, arrays, and exception handling. After completing this tutorial, you should have a clear understanding of the purpose of C# language, it's usages, and how to write C# programs.

 

Visual Studio Express version: Free Download
If you do not have Visual Studio 2005 or 2008, first download this free version of Visual C# 2008 Express.

http://www.microsoft.com/express/vcsharp/

 

The current version of C# language is 3.0. This tutorial covers all versions of C# language including 1.0, 2.0, and 3.0. The features added in versions 2.0 and 3.0 are covered in the Advanced Topics of this tutorial.

 

Download the entire book (56 pages) by clicking on Download Files link.

 

Table of Contents

 

  1. Introduction
  2. C# Language Features
  3. C# Editors & IDEs
  4. C# Components
  5. Types
  6. Attributes
  7. Variables
  8. Constants
  9. Expressions and Operators
  10. Control Statements
  11. Classes
  12. Events
  13. Indexers
  14. Inheritance
  15. C# 2.0 Features
  16. C# 3.0 Features

 

Note: C# language 2.0 and 3.0 features will be updated in next version of this book.

 

Recommended Readings

 

If you plan to master C# programming, here are few good books you may want to read. 

 

 


Login to add your contents and source code to this article
 About the author
 
Mahesh Chand
Mahesh is a software developer with over 13 years of experience building systems for Financial and Banking, Engineering & Architectural, Imaging, Construction, Biological & Pharmaceuticals, Healthcare and Education industries. His expertise is Windows Forms, ASP.NET, Silverlight, WPF, WCF, Visual Studio 2010, SQL Server, and Oracle. If you are looking for a Windows Forms, ASP.NET, WPF, Silverlight, C#, VB.NET, Oracle, and SQL Server Consultant in Philadelphia area or remote location, drop me a line at MAHESH [AT] C-SHARPCORNER [DOT] COM.
Looking for C# Consulting?
C# Consulting is founded in 2002 by the founders of C# Corner. Unlike a traditional consulting company, our consultants are well-known experts in .NET and many of them are MVPs, authors, and trainers. We specialize in Microsoft .NET development and utilize Agile Development and Extreme Programming practices to provide fast pace quick turnaround results. Our software development model is a mix of Agile Development, traditional SDLC, and Waterfall models.
Click here to learn more about C# Consulting.
 
Introducing MaxV - one click. infinite control. Hyper-V Hosting from MaximumASP.
Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Dynamic PDF
ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
Go.NET
Build custom interactive diagrams, network, workflow editors, flowcharts, or software design tools. Includes many predefined kinds of nodes, links, and basic shapes. Supports layers, scrolling, zooming, selection, drag-and-drop, clipboard, in-place editing, tooltips, grids, printing, overview window, palette. 100% implemented in C# as a managed .NET Control. Document/View/Tool architecture with many properties&events. Optional automatic layout.
Dundas Software
Dundas Chart for .NET is the most advanced .NET charting package available today.  With an extremely complete feature set, elegant architecture and easy implementation, Dundas Chart can quickly add advanced Charting functionality to enhance and transform ASP.NET and Windows Forms applications.  Whether you are implementing charting into internal projects, or building applications for clients, Dundas Chart offers advanced technology and advanced results to get the most out of data.
Clickatell's SMS Gateway
Clickatell's Developer Solutions allow you to SMS enable any website or application via a range of API's. Learn More about our API connections.
Free access to .NET Memory Management video
Everything you need to know about Garbage Collection, Temporary Objects, Fragmentation, Finalization and common causes of memory leaks in .NET. Watch the video here.
Microsoft Visual Studio 2010 Professional
Microsoft Visual Studio 2010 Professional will launch on April 12, but you can beat the rush and secure your copy today by pre-ordering at the affordable estimated retail price of $549 (US). Pre-order now.
Nevron Chart for .NET 2010.1 Now Available
The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
Developer-Ready ASP.NET 2.0 Web Hosting with 3 MONTHS FREE
Now supporting .NET 3.0 Framework with Windows Workflow Foundation, Windows Communication Foundation (WCF), Windows Presentation Foundation (WPF), windows CardSpace (WCS)! Providing more flexibility for Developers with Web Services Support and a User/Permission Manger. Also supporting MS SQL 2005/2000 with Real-Time Backups, FREE Automated Attach .MDF Tool, FREE SQL Restore and Shrink SQL DB Tools, and SQL
 
   Print Read/Post comments Post a comment  Similar Articles  
   Email to a friend  Bookmark  Author's other articles  
Download Files:
CsharpProgramming.zip
 
 Post a Feedback, Comment, or Question about this article
Subject:  
Comment:  
Become a Sponsor
 Comments
link to download by satish On October 24, 2007
I was unable to find the link to downlaod that book . So plz tell me where can i find that link .
Reply | Email | Delete | Modify | 
Re: link to download by Luis On November 14, 2007
The download link is on the upper side, on the right!
Reply | Email | Delete | Modify | 
Useful by Mohamed On November 29, 2007
Thanks for giving us a good article for reading basics.
Reply | Email | Delete | Modify | 
Re: Useful by Mahesh On April 2, 2009
Here are some more beginner tutorials/books on different topics:
http://www.c-sharpcorner.com/Beginners/
Reply | Email | Delete | Modify | 
Hope you had a great New Year by PETER On January 1, 2010
I am a beginner
how can i join up with one of your open souce projects
Reply | Email | Delete | Modify | 
access the class in my project by vijay On December 18, 2007
hi i am new in ASP.NET with C# coding. i have written database connection coding in one class. how to call that in my project please help me.... Thank you by Vijay
Reply | Email | Delete | Modify | 
Re: access the class in my project by Mahesh On April 2, 2009
Please post your not article related questions on Forums by clicking on forums link on the header.
Reply | Email | Delete | Modify | 
Thank you. by Jai On December 25, 2007
Thanks Mahesh. This book seems to be a good start :).
Reply | Email | Delete | Modify | 
Re: Thank you. by Mahesh On April 2, 2009
Here are some more beginner tutorials/books on different topics:
http://www.c-sharpcorner.com/Beginners/
Reply | Email | Delete | Modify | 
Link not working by Gabriel On January 29, 2008
I'd love to have a look at the book please. Source file cannot be read.
Reply | Email | Delete | Modify | 
Re: Link not working by Mahesh On February 27, 2008

Hi Gabriel,
Link is working fine. Are you still having download problem?

 

Reply | Email | Delete | Modify | 
Active Directory Querying by madhu On September 1, 2008
can any one help in learning AD Quering
Reply | Email | Delete | Modify | 
Re: Active Directory Querying by Mahesh On September 20, 2008

Post your question on the forums.

 

Reply | Email | Delete | Modify | 
My Query by Bhavani On September 26, 2008
Hai i am beginner,I have uploaded the images into the database but i want to know How to retrive images from database table and displayed in asp.net datagrid? Please reply me as soon as possible
Reply | Email | Delete | Modify | 
Re: My Query by Mahesh On September 26, 2008

Here are two articles that show how tor save image in Database in binary format and how to read it back from a database and convert it to an image.

Adding and retrieving Images from a SQL Server Table by Mamta M on Dec 20, 2005
This article describes the process to add and retrieve images from a SQL Server table using ADO.NET.
 
Storing Images into a Database by aghiondea2 on Dec 13, 2005
In order to provide your application with cool pictures you can employ two techniques (at least). One of them is that you can save the pictures in a folder and store the path to each one in a database or configuration file. The other one is to store the entire file into a database, along with its file name.
Reply | Email | Delete | Modify | 
Re: My Query by Mahesh On September 26, 2008
Reply | Email | Delete | Modify | 
Download Link by Dipesh On October 12, 2008
So which one is the link the PDF ot CsharpProgramming.Zip Nono of them are working??? Shows Onli this Part "Programming C# for Beginners Programming C# is a book written in step-by-step tutorial format for beginners and students who want to learn C# programming. It is recommended that you have some programming experience using any of the object-oriented languages such as C++, Pascal, or Java. In this tutorial, you will learn how to write and compile C# programs; understand C# syntaxes, data types, control flow, classes and their members, interfaces, arrays, and exception handling. After completing this tutorial, you should have a clear understanding of the purpose of C# language, its usages, and how to write C# programs. The current version of C# language is 3.0. This tutorial covers all versions of C# language including 1.0, 2.0, and 3.0. The features added in versions 2.0 and 3.0 are covered in the Advanced Topics of this tutorial. " So any help for the download link would be appreciated.......
Reply | Email | Delete | Modify | 
Re: Download Link by Mahesh On October 12, 2008

It appears that you have downloaded the correct file. You are just reading the first page of the book. You need to go to next page and so on.

Reply | Email | Delete | Modify | 
Re: Re: Download Link by Dipesh On October 12, 2008

thanks stupid me LOL Didnt see that

Thank You Mahesh

Reply | Email | Delete | Modify | 
C# link by karim On October 14, 2008
thx the like work fine
Reply | Email | Delete | Modify | 
feed back by govind On October 15, 2008
nice to
Reply | Email | Delete | Modify | 
How to unzip the downloaded folder? by Neha On October 16, 2008
Sir, i'm a beginner and downloaded the C# Programming for beginners book. But it is a zipped folder and am not able to open it. Kindly help.
Reply | Email | Delete | Modify | 
Re: How to unzip the downloaded folder? by Mahesh On October 16, 2008
You need to download WinZip to unzip the zip file. Search WinZip on Downloads.com for a free download.
Reply | Email | Delete | Modify | 
hello by samir On October 31, 2008
thank you very much its a great help from you thnksm. samir
Reply | Email | Delete | Modify | 
hello im new user of c sharp i have a question pleas help me by samir On October 31, 2008
the pdf version of book its not working the message says the file its damage can you help me thnx
Reply | Email | Delete | Modify | 
Re: hello im new user of c sharp i have a question pleas help me by Mahesh On April 2, 2009
I just checked again. U still getting this problem?
Reply | Email | Delete | Modify | 
mahesh by aprius On November 18, 2008
hello all. please help me for study c# because now i study c and c++. aprius
Reply | Email | Delete | Modify | 
Re: mahesh by Mahesh On November 18, 2008

Here are some useful links for beginners.

http://www.c-sharpcorner.com/Beginners/

Reply | Email | Delete | Modify | 
Thank Q by sunder On November 19, 2008
Hi.. 1st of all let me thank u for the Article " C# programming" for beginners. Its really a gud material for de beginners.
Reply | Email | Delete | Modify | 
link to download by ms On November 22, 2008
i am beginer to c#&.net i know c++,java is there any material to learn c#&.net i am not finding link to download
Reply | Email | Delete | Modify | 
Re: link to download by Mahesh On November 22, 2008
There is a link in blue next to "Download Files" in the starting of this article.
Reply | Email | Delete | Modify | 
Link doesnt work... by Michael On January 16, 2009
The link for download doesn't work, results in 'Error on page'....
Reply | Email | Delete | Modify | 
Re: Link doesnt work... by Mahesh On January 16, 2009

Hmm .. I just clicked on it and it worked. Are you logged in? Try again? And let me know.

Reply | Email | Delete | Modify | 
Re: Re: Link doesnt work... by Mitja On February 26, 2009
where is the link i dont see it... there is only one, but it`s a doc file (only explanation on one page).
Reply | Email | Delete | Modify | 
Re: Re: Re: Link doesnt work... by Rob On March 19, 2009
agree, only a .doc file inside..
Reply | Email | Delete | Modify | 
columns in gridbox by gaurav On March 25, 2009
m a beginner..so plz help me out in 1 of my assingnment....m trying to display only columns name in datagrid box after selecting the table from the dropdown box. I am running the web application of c#.. do response for this.....anyone out dr plz help me out.. thnk u regards gaurav
Reply | Email | Delete | Modify | 
Re: columns in gridbox by Mahesh On April 2, 2009
Check ADO.NET section. There are many articles on this topic.
Reply | Email | Delete | Modify | 
Book by Jonathan On March 26, 2009
Thank you for the information on C#. I am new in this and wanted to jump right in and start messing with code. I am going to start reading and give my feed back on a week or so. All the best, Johnny
Reply | Email | Delete | Modify | 
Re: Book by Mahesh On April 2, 2009
Here are some more beginner tutorials/books on different topics:
http://www.c-sharpcorner.com/Beginners/
Reply | Email | Delete | Modify | 
Difficulty in C# by Areje On March 28, 2009
I am experiencing some challenges in C#. I need assistance
Reply | Email | Delete | Modify | 
Re: Difficulty in C# by Mahesh On April 2, 2009
What kind of difficulty? Post your questions on the forums or here.
Reply | Email | Delete | Modify | 
I love readings by Waqas On March 28, 2009
thanks everyone
Reply | Email | Delete | Modify | 
me a biggner by Chilly On April 1, 2009
that a good start for me using C# its really easy book
Reply | Email | Delete | Modify | 
Re: me a biggner by Mahesh On April 2, 2009
Here are some more beginner tutorials/books on different topics:
http://www.c-sharpcorner.com/Beginners/
Reply | Email | Delete | Modify | 
link by Aleksandar On May 3, 2009
Thank You Mahesh

 

Reply | Email | Delete | Modify | 
Thanks for book by ashok On May 12, 2009
thank you very much for valuable book
Reply | Email | Delete | Modify | 
Missing download link by Ken On May 13, 2009
My browser window is missing the "Download Files" link. All I can download is CshapProgramming.zip which has a short .doc file. Can you post the link as a URL?
Reply | Email | Delete | Modify | 
Re: Missing download link by Mahesh On May 18, 2009
The Doc file is the book.
Reply | Email | Delete | Modify | 
C# by VISHAL On July 18, 2009
VV
Reply | Email | Delete | Modify | 
thanks by xiao On August 1, 2009
thanks for share
Reply | Email | Delete | Modify | 
Download unreadable by Bruce On September 4, 2009
Have downloaded the zip file, but the decompressed Word document is nearly unreadable, being in a special-character 'Batang' font.  Can you help? 

Reply | Email | Delete | Modify | 
Re: Download unreadable by Mahesh On September 4, 2009
You may not have font installed on your computer. No one has this problem before. I suggest you download it on some other computer and print it out or find font somewhere to download.
Reply | Email | Delete | Modify | 
Re: Re: Download unreadable by syed On September 10, 2009
link is not working?
Reply | Email | Delete | Modify | 
Re: Re: Re: Download unreadable by Mahesh On September 27, 2009
Must be something wrong with you machine. We have over 13,000 downloads and it seems to be just fine. I have tried a few times as well.

Do you have any security software (anti-virus) installed on your machine that won't allow you to download PDFs or doc files?
Reply | Email | Delete | Modify | 
C# by Vinay On November 12, 2009
Thank you!
Reply | Email | Delete | Modify | 
thanks by li On December 10, 2009
thank you!I am a beginner, I can learn some things from your articles!
Reply | Email | Delete | Modify | 
Re: thanks by vikas On December 24, 2009
http://free-ebooks-for-u.blogspot.com/
Reply | Email | Delete | Modify | 
request to solve format problem by Vinod On December 29, 2009

I downloaded a book but is not comming in proper format means different symbols are comming instead of alphabets

Reply | Email | Delete | Modify | 
hi thankyou by srikanth r On February 13, 2010
Hi ,

This is a good material for the learners. Thanks for posting such material
Reply | Email | Delete | Modify | 
using c sharp by judith On February 19, 2010
HOW TO CREATE WEBSITE USING C SHARP
Reply | Email | Delete | Modify | 
Re: using c sharp by Mahesh On March 1, 2010
To create a Website using C#, you need to use ASP.NET. Here are the steps.

  1. If you do not have Visual Studio .NET or Visual C#, download Visual C# here.
  2. Once you have Visual Studio or Visual C#, create a new ASP.NET Web application or Website project.
  3. After that, learn ASP.NET. Click on ASP.NET link in the left side of C# Corner home page to learn more ASP.NET.

Reply | Email | Delete | Modify | 
with out knowledge of c,c++ v cant able to do C# prog's by kiran On March 5, 2010
hi Mahesh its good material.. It must given in clear manner. But i have a small doubt in C#,Whit out knowledge of C,C++ v cant able to work on C#. What are the topics relevent in C# compare with C,C++
Reply | Email | Delete | Modify | 
programm by Biswajit On March 9, 2010
how 2 print the following using c or c++
 *****
****
***
**
*
Reply | Email | Delete |