Programming C# is a book (56 pages) written in a 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.
Download Book: Programming C# for Beginners
In this book, you learn how to write and compile C# programs and 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 usage, and how to write C# programs.
Visual Studio 2017 Community Free Download
To write your C# code, you will need a C# code editor or IDE. If you do not have an editor or IDE, I recommend using Visual Studio 2017 Community Edition which is free to download.
Download Visual Studio 2017 Community IDE here: https://www.visualstudio.com/
Table of Contents
The current version of C# language is 7.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.
- Introduction
- C# Language Features
- C# Editors & IDEs
- C# Components
- Types
- Attributes
- Variables
- Constants
- Expressions and Operators
- Control Statements
- Classes
- Events
- Indexers
- Inheritance
- C# 2.0 Features
- C# 3.0 Features
More Recommended Books
Here are other recommended free books on C#.
Download more books here: http://www.c-sharpcorner.com/ebooks/

Hanya DwyerPosted Jul 4, 2024, 2:20 PM
Thanks Mahesh!
Bhavleen SinghPosted Jun 22, 2019, 5:02 AM
I started learning C# and VB.net from December onward and came up to this site now I program well as beginner, I've read the first 2 chapters already but sir please also publish 2nd edition by giving knowledge of ado.net as I'm very weak in managing and storing databases And a Big Thanks for publishing this
kunal AroraPosted Mar 28, 2018, 7:09 AM
Try this article as I found this very useful here is the Link http://rapidteria.com/7XxT
DOKUBO BOBPosted May 11, 2017, 3:00 PM
Hi good people, can someone tell me where i can "Download the entire book (56 pages) by clicking on Download Files link." as instructed please. Thanks in advance:)
Joe WilsonPosted Jan 6, 2017, 7:37 AM
Well, it is so useful. Thank you
Shivanshu GuptaPosted Dec 12, 2016, 1:16 PM
Int a,b,c; Console.WriteLine("Enter the Value of A..."); a=Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Enter the value of B..."); b=Convert.ToInt32(Console.Read()); c=a+b; Console.WriteLine("total is - {0}",c);
Shivanshu GuptaPosted Dec 12, 2016, 1:16 PM
I am trying to run this code but result is not correct where a=3 ,b=3 and result c=54
Ramesh PalaniappanPosted Aug 18, 2016, 8:19 AM
Nice
kalu singh raoPosted Jul 7, 2016, 8:39 AM
Nice...
Salman FarisPosted May 10, 2016, 11:39 AM
It was very Good one :-D ,after reading this try to watch the Bob tabour C# Beginners videos that will be helpful .
Danie SiwyPosted May 10, 2016, 11:16 AM
Thank you for sharing
Bhuvanesh MohankumarPosted Apr 19, 2016, 2:32 PM
Good one
Thanh Man DiepPosted Apr 11, 2016, 6:07 AM
Thanks for sharing
Asfend YarPosted Feb 27, 2016, 4:05 AM
thanks for sharing
Sonu ChaudharyPosted Feb 25, 2016, 6:31 AM
good one!
Jithil JohnPosted Feb 16, 2016, 2:10 AM
Good one
bilal mazharPosted Jan 30, 2016, 2:32 PM
Helpful thanks a lot :)
Irfan AcPosted Jan 25, 2016, 1:18 AM
helpfull
Umarul FarookPosted Jan 22, 2016, 10:31 AM
keep sharing
Joe WilsonPosted Jan 14, 2016, 8:26 AM
Thank you for sharing.
Nanddeep NachanPosted Jan 12, 2016, 5:56 AM
Thanks for sharing!
Phaneendra ChakravaramPosted Jan 11, 2016, 4:08 AM
Thank you
Mohamed Gani MnPosted Nov 6, 2015, 11:10 AM
Nice to make preparation for us
Usama LiaquatPosted Nov 4, 2015, 6:55 AM
too good
Ali AhmedPosted Nov 1, 2015, 3:08 PM
Good Book
Anil KumarPosted Oct 29, 2015, 10:37 AM
Thanks
Jahir KameelPosted Oct 17, 2015, 6:42 AM
Thank you a lot for your kind efforts. Really appreciate this.
Upendra Pratap ShahiPosted Oct 6, 2015, 12:47 AM
nice job sir
Srikanth AgollaPosted Oct 5, 2015, 9:15 AM
NIce
Hema SundarPosted Sep 16, 2015, 5:45 AM
GOOD JOB BRO
Fenita SanaPosted Sep 14, 2015, 11:33 PM
Good
Harshad PansuriyaPosted Sep 12, 2015, 3:32 AM
Nice One
Uncomplete ManPosted Sep 8, 2015, 10:49 AM
Very good
Ajeet MishraPosted Sep 1, 2015, 4:15 AM
nice
Hashim ShafiqPosted Aug 27, 2015, 9:11 PM
nice
Yashwanth MuthineniPosted Aug 25, 2015, 1:39 AM
Nice Share sir
Hassen ElguerouelPosted Aug 20, 2015, 6:25 AM
thanks :)
Vipan SharmaPosted Jul 30, 2015, 1:19 AM
Great Sir
Saritha K TPosted Jul 8, 2015, 5:00 AM
nice
Upendra Pratap ShahiPosted Jul 7, 2015, 8:39 AM
thanx..
leila hPosted Jun 15, 2015, 12:46 AM
thanks
Shailesh UkePosted May 27, 2015, 10:14 AM
well done that's good
Seabastion MillerPosted Mar 1, 2015, 2:34 PM
I am not able to download the book properly. Could it be corrupt?
ehsan aliPosted Jan 1, 2015, 1:09 PM
nice sir
Amit OmblePosted Dec 14, 2014, 7:47 AM
Sir please add C# language 2.0 and 3.0 features
Netkos EntPosted Dec 9, 2014, 1:48 PM
Excellent book. Thanks Mahesh!
ansa mubarikPosted Dec 3, 2014, 12:09 AM
thanks plz tell me other books to learc C++ practically
Jay AnguePosted Oct 30, 2014, 8:58 AM
Thank you so much!... Your a God Send...
Mahesh ChandPosted Sep 3, 2014, 8:47 PM
Thank you guys. If you like to book, please do share with your co-workers and friends. Thank you!
Abdul HaleemPosted Sep 3, 2014, 2:45 PM
thnks for this
Shashikanth BairyPosted Jul 17, 2014, 3:16 AM
Thank You
Ehtesham MehmoodPosted Feb 22, 2014, 7:56 PM
Mahesh sir please write article about C# programming language ? what c# can do for you ? please explain in your words i am lover of your website and also lover of C# language so want to know more and more about C# power ?
behzad khanPosted Feb 16, 2014, 11:49 PM
thank you
Alpha DialloPosted Jan 31, 2014, 5:30 AM
thank you !
masud parvezPosted Jan 25, 2014, 6:20 PM
thanks.. sir it really helps me to learn C#.
viral mehtaPosted Jul 3, 2013, 7:55 AM
thanks ... i like this book it really helps me to learn C#..
Srinivasarao GunduPosted May 16, 2013, 8:40 AM
This is a complete C# Notes
Suthish NairPosted Apr 11, 2013, 6:18 AM
yummy.. I like this ebook.. simple and easy to learn.. recommended for all beginners..
chigicherla MallikarjunaPosted Apr 10, 2013, 6:14 AM
Thanks for Sharing.........
Mohanraj ManiPosted Apr 6, 2013, 3:08 AM
very useful materiel thank you
Anurag SarkarPosted Apr 3, 2013, 4:19 AM
Thanks Sir.
godwin dsouzaPosted Mar 12, 2013, 6:52 AM
Thank You..:)
Kevin WangeditedPosted Mar 4, 2013, 10:24 PMEdited Mar 4, 2013, 10:25 PM
My pleasure to see!
mazhar hayatPosted Feb 28, 2013, 3:27 AM
good ebook for begg
Monish BansaleditedPosted Feb 25, 2013, 11:19 PMEdited Feb 26, 2013, 12:46 AM
Thank you sir. We should make a app In which user can read all c-sharpcorner ebooks.
Rohatash KumarPosted Feb 25, 2013, 10:18 PM
Thank you sir.
Paris ShahapurPosted Feb 16, 2013, 8:41 AM
thank you...............
mido yousefPosted Feb 10, 2013, 6:39 PM
thank you
mrscampusPosted Jan 10, 2013, 10:02 AM
Thank you for sharing.
abhilash amanchaPosted Dec 13, 2012, 9:41 PM
thankzzz
Sheikh QasimPosted Nov 27, 2012, 8:31 PM
Thanks. Hope this helps me learn C# from scratch
samvanda waghrePosted Nov 26, 2012, 12:59 AM
seriously i love reading programming books.. and this book help me in competing and prooving myself..!! Thank u so much...
samvanda waghrePosted Nov 26, 2012, 12:59 AM
seriously i love reading programming books.. and this book help me in competing and prooving myself..!! Thank u so much...
Deepankar BhardwajPosted Sep 25, 2012, 10:21 AM
thanks Mate!!
kianu rievesPosted Sep 17, 2012, 1:52 AM
It is really nice and your video presentation is superb, eagerly waiting for the next 10 more days labs and sessions.Thanks for sharing all these. http://www.dapfor.com/en/net-suite/net-grid/tutorial/data-types
Mahesh ChandPosted Aug 16, 2012, 9:15 AM
Ulrich, the book was written using Visual Studio 2005 (5 years ago). UI in VS 2005 and 2012 has changed a lot.
nikunj patelPosted Aug 2, 2012, 5:58 AM
thanks for yourr book!!!!
UlrichPosted Feb 18, 2012, 11:13 AM
I use VS Express 2010. At first I could not reproduce " figure 1." becauce the console windows closed immediately. After pressing Strg+F5 i got. A hint to this feature maybe usefull for absolute beginners.
zeid housainiPosted Jan 17, 2012, 3:03 AM
hey wanna learn about this subject, the Marketing information system about me just theoretical, so wanna learn about the program help me about this subject am accounting system builder(beginner) thx any way and gd luck in ur life :)
Kevin WangPosted Aug 31, 2011, 4:30 AM
A Good Book
Vikram JoshiPosted Jul 12, 2011, 2:19 AM
for the notes
Greg PPosted Jun 12, 2011, 12:18 AM
Hi, I've studied C# for a while now and gotten pretty far; but now i need to practice before i can go further. Where can i find good solid C# practice exercises or projects or whatever, anything that'll help me get better and more sound. Thank you in advance. PS : I've googled and wasn't able to come up with some good stuff.
Hafeth DawbaaPosted May 8, 2011, 3:26 PM
a lot.:)
prashant kumarPosted Mar 10, 2011, 2:45 AM
pls help me sir, i cant think appropriate logic for some programs... tell me how can i improve
Bala GPosted Feb 14, 2011, 3:15 AM
You are providing valuable information of c#
Shilong SunPosted Jan 26, 2011, 7:22 PM
I have just downloaded this book, and first of all, I really appreciate this. I will give appropriate feedbacks later on. Thank you.
Josh RasmussenPosted Jan 22, 2011, 2:44 PM
Yes, creating a Console Project allows me to type in text right a way. So, that works!
Josh RasmussenPosted Jan 22, 2011, 2:36 PM
Thanks! I've been reading various instructions about how to create a project in which I can type my code using visual c#. I'll keep working on it.
Josh RasmussenPosted Jan 22, 2011, 12:44 AM
Dear Mahesh, I have a BS in computer science, but I've never programmed in C# before. So, I downloaded your book. I got stuck right at the beginning when you say to type into some code into a C# editor. I haven't been able to figure out how to do that. Where would I find instructions for that (I wonder why you didn't include them.) I have c# express 2010. When I open it up, it gives me the option of creating a new project. But I don't know what kind of a project to create, and after I create a new project, I have no idea how to open an editor to start typing in code. So, I'm stuck. Do you know of any good sources where I can learn how to get started with c#?--sources that go step by step without skipping steps?
Naren ChejaraPosted Jan 3, 2011, 4:13 AM
Hello Sir, Is there any possibility to see your all artical. if yes then please send me a link.
Norman AbdullahPosted Dec 23, 2010, 1:15 AM
Where is download link? i can't see it.
Kamau NgigiPosted Dec 9, 2010, 9:13 AM
I needed a C# tutorial for a beginner to programming
Yashwant KumarPosted Dec 1, 2010, 2:31 AM
Many many thanks for your valuable contribution. Regards Yashwant Kumar Rolta India Ltd.
jithesh rameshPosted Nov 18, 2010, 8:09 AM
how to save checked list items in database and how to define limited checking items and change read only
keerthi pampanaPosted Nov 16, 2010, 5:32 AM
i was unable to download the book...didnt find the link
Asim AdamPosted Oct 30, 2010, 2:26 AM
Hi Mahesh, Could you please help me with this I have already generated a xml file, but what happening is due to the usage of writeattributestring the output am getting like this <set value="'10' color='2B65EC'" /> but i need the output in the below format <set value='10' color='2B65EC' /> how to do this ?
Vinay GawliPosted Oct 14, 2010, 6:34 AM
I have tried with the given link, but not working is any other way to download
stephen turveyPosted Oct 8, 2010, 4:46 AM
I've uploaded my copy of this book to my website, you can click on this click to start the download C# Ebook for beginners
Anas MohamedPosted Oct 8, 2010, 2:43 AM
could you please tell me some books for c programming. (not c#)
Anas MohamedPosted Oct 8, 2010, 2:38 AM
excuse me! i can't find a link to download the c# beginners book. pls can somebody help me? pls specify the letters.
stephen turveyeditedPosted Oct 3, 2010, 4:30 PMEdited Oct 3, 2010, 4:31 PM
Could someone please give me an example code for the following. Linerental 11.00 PricePerMinute 0.05 Tax 17.5% software ask user how many minutes used and then the software will calculate the above and displays the following. Total to pay = (Sum) thankyou. Also this book downloaded great for me.
james perishPosted Oct 1, 2010, 2:47 PM
hi, thanks for sharing.. I'll try it. greets
Satyam JhaPosted Sep 13, 2010, 6:46 AM
I was unable to find the link to downlaod that book .
munish sachdevPosted Sep 1, 2010, 1:43 PM
can somebody please tell me the code for multiplication of 2 matrices in console ?
Raj kumarPosted Jul 31, 2010, 9:56 AM
Hello sir , Im Rajkumar, i want to download the c# with .Net programming book, but i don't link of download. so, please kindly send a link of download ....
bipin kumar singhPosted Jul 24, 2010, 11:16 AM
dear mahesh i read and i like your c# tutorial it is written so simple i found your help and realy understanding it is very useful for me i am studing in f.y.b.com. and also i am taking c# class with niit institute before reading your book i was not understands that what is everything i am Bipin thanking you so much for your valuable help good day dear
rao sohailPosted Jul 21, 2010, 5:52 PM
so much basic that not support for learners who want to become a good programmer.
Ahmad NuseirPosted Jul 9, 2010, 4:58 PM
Thanks , best of the best
saranya vasuPosted Jul 1, 2010, 3:01 AM
ur free book is very useful for the beginners....
GAURAV SPosted Jun 20, 2010, 11:50 AM
Hi, i want to learn more about c sharp as i am familiar with c++ and i am reffering a book + the ebook which is provide by u (well thanks for this it is quite helpful) Thanks and Regards Gaurav S
pavan gandikotaPosted May 27, 2010, 3:54 AM
Thanks
jhon michalPosted May 21, 2010, 1:51 AM
i must learn c#
Mahmoud MontaserPosted May 4, 2010, 7:07 PM
how can use the arabic letters with consol program as a text
lerato ValteinPosted May 4, 2010, 7:33 AM
im a student..studing IT. and am finding it difficult..so i was wondering if any one is will to send me codes and explain some of the stuff to me...plzzzzzz i need help.my email adress is [email protected] plzz responde soon becuase im writting a test on thusday
Asdi LkakoPosted May 2, 2010, 4:07 PM
i registered, i downloaded the file and i cant read the book. title is - chapter 1. i have windows xp, and word, and pdf reader, so whats the problem? please help :(
shalinee pandyaPosted Apr 19, 2010, 5:34 PM
Hi, this is shalinee, i just want to create a table using c# and .net ,in which i can see the share market ,,,eod(end of the day).This table should show the history of the companies share.
SHETA SANJAYPosted Apr 10, 2010, 5:13 AM
NEEDED IN 2 OR 3 DAYS
Deepak BishtPosted Apr 4, 2010, 7:55 AM
hello sir can u please help me in SqlNotification as i searched it for so many place but either they are too typical or not anything i can gain i havnt uses sqlnotification in my application. i want if i do DML operation in my application with connecting sqlserver how could i use sqlNotification ?? thankx deepak
AMMU HONEYPosted Mar 30, 2010, 10:43 PM
hai
shail kumarPosted Mar 30, 2010, 3:32 AM
sir is there any scope in IT .if your academic qualification score is low
aung zaw ooPosted Mar 17, 2010, 12:18 PM
?????????????.....
Biswajit SenPosted Mar 9, 2010, 1:35 AM
how 2 print the following using c or c++ ***** **** *** ** *
kiran kumarPosted Mar 5, 2010, 10:45 PM
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++
judith khosaPosted Feb 19, 2010, 3:33 AM
HOW TO CREATE WEBSITE USING C SHARP
srikanth r tPosted Feb 13, 2010, 3:57 PM
Hi , This is a good material for the learners. Thanks for posting such material
Vinod MudaPosted Dec 29, 2009, 7:42 AM
I downloaded a book but is not comming in proper format means different symbols are comming instead of alphabets
li quanPosted Dec 10, 2009, 12:46 PM
thank you!I am a beginner, I can learn some things from your articles!
Vinay APosted Nov 12, 2009, 11:42 PM
Thank you!
Bruce CartwrightPosted Sep 4, 2009, 9:10 AM
Have downloaded the zip file, but the decompressed Word document is nearly unreadable, being in a special-character 'Batang' font. Can you help?
xiaoPosted Aug 1, 2009, 12:05 PM
thanks for share
VISHAL RAJPUTPosted Jul 18, 2009, 6:03 AM
VV
KenPosted May 13, 2009, 6:17 PM
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?
ashok kotiyaPosted May 12, 2009, 4:57 AM
thank you very much for valuable book
Aleksandar PetrovicPosted May 3, 2009, 8:58 AM
Thank You Mahesh
Chilly MillyPosted Apr 1, 2009, 12:26 PM
that a good start for me using C# its really easy book
Waqas SiddiquiPosted Mar 28, 2009, 3:38 PM
thanks everyone
Areje TubosunPosted Mar 28, 2009, 9:07 AM
I am experiencing some challenges in C#. I need assistance
Jonathan CrockettPosted Mar 26, 2009, 10:14 AM
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
gaurav gulatiPosted Mar 25, 2009, 8:03 AM
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
Michael McCormickPosted Jan 16, 2009, 2:17 PM
The link for download doesn't work, results in 'Error on page'....
ms archanaPosted Nov 22, 2008, 10:29 AM
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
sunderPosted Nov 19, 2008, 7:46 AM
Hi.. 1st of all let me thank u for the Article " C# programming" for beginners. Its really a gud material for de beginners.
aprius ronaldPosted Nov 18, 2008, 8:26 AM
hello all. please help me for study c# because now i study c and c++. aprius
samir krasniqiPosted Oct 31, 2008, 5:34 PM
the pdf version of book its not working the message says the file its damage can you help me thnx
samir krasniqiPosted Oct 31, 2008, 5:24 PM
thank you very much its a great help from you thnksm. samir
NehaPosted Oct 16, 2008, 2:20 PM
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.
govind rajPosted Oct 15, 2008, 12:29 AM
nice to
karim ahmedPosted Oct 14, 2008, 5:39 AM
thx the like work fine
Dipesh LimbuPosted Oct 12, 2008, 7:12 PM
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.......
Bhavani SanthanameditedPosted Sep 26, 2008, 6:02 AMEdited Sep 26, 2008, 6:03 AM
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
madhu kiranPosted Sep 1, 2008, 8:43 AM
can any one help in learning AD Quering
Gabriel AngelPosted Jan 29, 2008, 5:44 AM
I'd love to have a look at the book please. Source file cannot be read.
JaiPosted Dec 25, 2007, 8:46 AM
Thanks Mahesh. This book seems to be a good start :).
vijay sekarPosted Dec 18, 2007, 5:41 AM
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
Mohamed ZakirPosted Nov 29, 2007, 4:24 AM
Thanks for giving us a good article for reading basics.
satish pasilaPosted Oct 24, 2007, 3:07 AM
I was unable to find the link to downlaod that book . So plz tell me where can i find that link .