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, 10:20 AM EDT
Thanks Mahesh!
Bhavleen SinghPosted Jun 22, 2019, 1:02 AM EDT
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, 3:09 AM EDT
Try this article as I found this very useful here is the Link http://rapidteria.com/7XxT
DOKUBO BOBPosted May 11, 2017, 11:00 AM EDT
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, 2:37 AM EST
Well, it is so useful. Thank you
Shivanshu GuptaPosted Dec 12, 2016, 8:16 AM EST
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, 8:16 AM EST
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, 4:19 AM EDT
Nice
kalu singh raoPosted Jul 7, 2016, 4:39 AM EDT
Nice...
Salman FarisPosted May 10, 2016, 7:39 AM EDT
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, 7:16 AM EDT
Thank you for sharing
Bhuvanesh MohankumarPosted Apr 19, 2016, 10:32 AM EDT
Good one
Thanh Man DiepPosted Apr 11, 2016, 2:07 AM EDT
Thanks for sharing
Asfend YarPosted Feb 26, 2016, 11:05 PM EST
thanks for sharing
Sonu ChaudharyPosted Feb 25, 2016, 1:31 AM EST
good one!
Jithil JohnPosted Feb 15, 2016, 9:10 PM EST
Good one
bilal mazharPosted Jan 30, 2016, 9:32 AM EST
Helpful thanks a lot :)
Irfan AcPosted Jan 24, 2016, 8:18 PM EST
helpfull
Umarul FarookPosted Jan 22, 2016, 5:31 AM EST
keep sharing
Joe WilsonPosted Jan 14, 2016, 3:26 AM EST
Thank you for sharing.
Nanddeep NachanTOP 100Posted Jan 12, 2016, 12:56 AM EST
Thanks for sharing!
Phaneendra ChakravaramPosted Jan 10, 2016, 11:08 PM EST
Thank you
Mohamed Gani MnPosted Nov 6, 2015, 6:10 AM EST
Nice to make preparation for us
Usama LiaquatPosted Nov 4, 2015, 1:55 AM EST
too good
Ali AhmedPosted Nov 1, 2015, 10:08 AM EST
Good Book
Anil KumarPosted Oct 29, 2015, 6:37 AM EDT
Thanks
Jahir KameelPosted Oct 17, 2015, 2:42 AM EDT
Thank you a lot for your kind efforts. Really appreciate this.
Upendra Pratap ShahiPosted Oct 5, 2015, 8:47 PM EDT
nice job sir
Srikanth AgollaPosted Oct 5, 2015, 5:15 AM EDT
NIce
Hema SundarPosted Sep 16, 2015, 1:45 AM EDT
GOOD JOB BRO
Fenita SanaPosted Sep 14, 2015, 7:33 PM EDT
Good
Harshad PansuriyaPosted Sep 11, 2015, 11:32 PM EDT
Nice One
Uncomplete ManPosted Sep 8, 2015, 6:49 AM EDT
Very good
Ajeet MishraPosted Sep 1, 2015, 12:15 AM EDT
nice
Hashim ShafiqPosted Aug 27, 2015, 5:11 PM EDT
nice
Yashwanth MuthineniPosted Aug 24, 2015, 9:39 PM EDT
Nice Share sir
Hassen ElguerouelPosted Aug 20, 2015, 2:25 AM EDT
thanks :)
Vipan SharmaPosted Jul 29, 2015, 9:19 PM EDT
Great Sir
Saritha K TPosted Jul 8, 2015, 1:00 AM EDT
nice
Upendra Pratap ShahiPosted Jul 7, 2015, 4:39 AM EDT
thanx..
leila hPosted Jun 14, 2015, 8:46 PM EDT
thanks
Shailesh UkePosted May 27, 2015, 6:14 AM EDT
well done that's good
Seabastion MillerPosted Mar 1, 2015, 9:34 AM EST
I am not able to download the book properly. Could it be corrupt?
ehsan aliPosted Jan 1, 2015, 8:09 AM EST
nice sir
Amit OmblePosted Dec 14, 2014, 2:47 AM EST
Sir please add C# language 2.0 and 3.0 features
Netkos EntPosted Dec 9, 2014, 8:48 AM EST
Excellent book. Thanks Mahesh!
ansa mubarikPosted Dec 2, 2014, 7:09 PM EST
thanks plz tell me other books to learc C++ practically
Jay AnguePosted Oct 30, 2014, 4:58 AM EDT
Thank you so much!... Your a God Send...
Mahesh ChandTOP 10Posted Sep 3, 2014, 4:47 PM EDT
Thank you guys. If you like to book, please do share with your co-workers and friends. Thank you!
Abdul HaleemPosted Sep 3, 2014, 10:45 AM EDT
thnks for this
Shashikanth BairyPosted Jul 16, 2014, 11:16 PM EDT
Thank You
Ehtesham MehmoodPosted Feb 22, 2014, 2:56 PM EST
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, 6:49 PM EST
thank you
Alpha DialloPosted Jan 31, 2014, 12:30 AM EST
thank you !
masud parvezPosted Jan 25, 2014, 1:20 PM EST
thanks.. sir it really helps me to learn C#.
viral mehtaPosted Jul 3, 2013, 3:55 AM EDT
thanks ... i like this book it really helps me to learn C#..
Srinivasarao GunduPosted May 16, 2013, 4:40 AM EDT
This is a complete C# Notes
Suthish NairTOP 100Posted Apr 11, 2013, 2:18 AM EDT
yummy.. I like this ebook.. simple and easy to learn.. recommended for all beginners..
chigicherla MallikarjunaPosted Apr 10, 2013, 2:14 AM EDT
Thanks for Sharing.........
Mohanraj ManiPosted Apr 5, 2013, 11:08 PM EDT
very useful materiel thank you
Anurag SarkarPosted Apr 3, 2013, 12:19 AM EDT
Thanks Sir.
godwin dsouzaPosted Mar 12, 2013, 2:52 AM EDT
Thank You..:)
Kevin WangeditedPosted Mar 4, 2013, 5:24 PM ESTEdited Mar 4, 2013, 5:25 PM EST
My pleasure to see!
mazhar hayatPosted Feb 27, 2013, 10:27 PM EST
good ebook for begg
Monish BansaleditedPosted Feb 25, 2013, 6:19 PM ESTEdited Feb 25, 2013, 7:46 PM EST
Thank you sir. We should make a app In which user can read all c-sharpcorner ebooks.
Rohatash KumarTOP 100Posted Feb 25, 2013, 5:18 PM EST
Thank you sir.
Paris ShahapurPosted Feb 16, 2013, 3:41 AM EST
thank you...............
mido yousefPosted Feb 10, 2013, 1:39 PM EST
thank you
mrscampusPosted Jan 10, 2013, 5:02 AM EST
Thank you for sharing.
abhilash amanchaPosted Dec 13, 2012, 4:41 PM EST
thankzzz
Sheikh QasimPosted Nov 27, 2012, 3:31 PM EST
Thanks. Hope this helps me learn C# from scratch
samvanda waghrePosted Nov 25, 2012, 7:59 PM EST
seriously i love reading programming books.. and this book help me in competing and prooving myself..!! Thank u so much...
samvanda waghrePosted Nov 25, 2012, 7:59 PM EST
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, 6:21 AM EDT
thanks Mate!!
kianu rievesPosted Sep 16, 2012, 9:52 PM EDT
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 ChandTOP 10Posted Aug 16, 2012, 5:15 AM EDT
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, 1:58 AM EDT
thanks for yourr book!!!!
UlrichPosted Feb 18, 2012, 6:13 AM EST
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 16, 2012, 10:03 PM EST
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, 12:30 AM EDT
A Good Book
Vikram JoshiPosted Jul 11, 2011, 10:19 PM EDT
for the notes
Greg PPosted Jun 11, 2011, 8:18 PM EDT
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, 11:26 AM EDT
a lot.:)
prashant kumarPosted Mar 9, 2011, 9:45 PM EST
pls help me sir, i cant think appropriate logic for some programs... tell me how can i improve
Bala GPosted Feb 13, 2011, 10:15 PM EST
You are providing valuable information of c#
Shilong SunPosted Jan 26, 2011, 2:22 PM EST
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, 9:44 AM EST
Yes, creating a Console Project allows me to type in text right a way. So, that works!
Josh RasmussenPosted Jan 22, 2011, 9:36 AM EST
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 21, 2011, 7:44 PM EST
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 2, 2011, 11:13 PM EST
Hello Sir, Is there any possibility to see your all artical. if yes then please send me a link.
Norman AbdullahPosted Dec 22, 2010, 8:15 PM EST
Where is download link? i can't see it.
Kamau NgigiPosted Dec 9, 2010, 4:13 AM EST
I needed a C# tutorial for a beginner to programming
Yashwant KumarPosted Nov 30, 2010, 9:31 PM EST
Many many thanks for your valuable contribution. Regards Yashwant Kumar Rolta India Ltd.
jithesh rameshPosted Nov 18, 2010, 3:09 AM EST
how to save checked list items in database and how to define limited checking items and change read only
keerthi pampanaPosted Nov 16, 2010, 12:32 AM EST
i was unable to download the book...didnt find the link
Asim AdamPosted Oct 29, 2010, 10:26 PM EDT
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, 2:34 AM EDT
I have tried with the given link, but not working is any other way to download
stephen turveyPosted Oct 8, 2010, 12:46 AM EDT
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 7, 2010, 10:43 PM EDT
could you please tell me some books for c programming. (not c#)
Anas MohamedPosted Oct 7, 2010, 10:38 PM EDT
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, 12:30 PM EDTEdited Oct 3, 2010, 12:31 PM EDT
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, 10:47 AM EDT
hi, thanks for sharing.. I'll try it. greets
Satyam JhaPosted Sep 13, 2010, 2:46 AM EDT
I was unable to find the link to downlaod that book .
munish sachdevPosted Sep 1, 2010, 9:43 AM EDT
can somebody please tell me the code for multiplication of 2 matrices in console ?
Raj kumarPosted Jul 31, 2010, 5:56 AM EDT
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, 7:16 AM EDT
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, 1:52 PM EDT
so much basic that not support for learners who want to become a good programmer.
Ahmad NuseirPosted Jul 9, 2010, 12:58 PM EDT
Thanks , best of the best
saranya vasuPosted Jun 30, 2010, 11:01 PM EDT
ur free book is very useful for the beginners....
GAURAV SPosted Jun 20, 2010, 7:50 AM EDT
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 26, 2010, 11:54 PM EDT
Thanks
jhon michalPosted May 20, 2010, 9:51 PM EDT
i must learn c#
Mahmoud MontaserPosted May 4, 2010, 3:07 PM EDT
how can use the arabic letters with consol program as a text
lerato ValteinPosted May 4, 2010, 3:33 AM EDT
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, 12:07 PM EDT
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, 1:34 PM EDT
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, 1:13 AM EDT
NEEDED IN 2 OR 3 DAYS
Deepak BishtPosted Apr 4, 2010, 3:55 AM EDT
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, 6:43 PM EDT
hai
shail kumarPosted Mar 29, 2010, 11:32 PM EDT
sir is there any scope in IT .if your academic qualification score is low
aung zaw ooPosted Mar 17, 2010, 8:18 AM EDT
?????????????.....
Biswajit SenPosted Mar 8, 2010, 8:35 PM EST
how 2 print the following using c or c++ ***** **** *** ** *
kiran kumarPosted Mar 5, 2010, 5:45 PM EST
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 18, 2010, 10:33 PM EST
HOW TO CREATE WEBSITE USING C SHARP
srikanth r tPosted Feb 13, 2010, 10:57 AM EST
Hi , This is a good material for the learners. Thanks for posting such material
Vinod MudaPosted Dec 29, 2009, 2:42 AM EST
I downloaded a book but is not comming in proper format means different symbols are comming instead of alphabets
li quanPosted Dec 10, 2009, 7:46 AM EST
thank you!I am a beginner, I can learn some things from your articles!
Vinay APosted Nov 12, 2009, 6:42 PM EST
Thank you!
Bruce CartwrightPosted Sep 4, 2009, 5:10 AM EDT
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, 8:05 AM EDT
thanks for share
VISHAL RAJPUTPosted Jul 18, 2009, 2:03 AM EDT
VV
KenPosted May 13, 2009, 2:17 PM EDT
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, 12:57 AM EDT
thank you very much for valuable book
Aleksandar PetrovicPosted May 3, 2009, 4:58 AM EDT
Thank You Mahesh
Chilly MillyPosted Apr 1, 2009, 8:26 AM EDT
that a good start for me using C# its really easy book
Waqas SiddiquiPosted Mar 28, 2009, 11:38 AM EDT
thanks everyone
Areje TubosunPosted Mar 28, 2009, 5:07 AM EDT
I am experiencing some challenges in C#. I need assistance
Jonathan CrockettPosted Mar 26, 2009, 6:14 AM EDT
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, 4:03 AM EDT
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, 9:17 AM EST
The link for download doesn't work, results in 'Error on page'....
ms archanaPosted Nov 22, 2008, 5:29 AM EST
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, 2:46 AM EST
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, 3:26 AM EST
hello all. please help me for study c# because now i study c and c++. aprius
samir krasniqiPosted Oct 31, 2008, 1:34 PM EDT
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, 1:24 PM EDT
thank you very much its a great help from you thnksm. samir
NehaPosted Oct 16, 2008, 10:20 AM EDT
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 14, 2008, 8:29 PM EDT
nice to
karim ahmedPosted Oct 14, 2008, 1:39 AM EDT
thx the like work fine
Dipesh LimbuPosted Oct 12, 2008, 3:12 PM EDT
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, 2:02 AM EDTEdited Sep 26, 2008, 2:03 AM EDT
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, 4:43 AM EDT
can any one help in learning AD Quering
Gabriel AngelPosted Jan 29, 2008, 12:44 AM EST
I'd love to have a look at the book please. Source file cannot be read.
JaiPosted Dec 25, 2007, 3:46 AM EST
Thanks Mahesh. This book seems to be a good start :).
vijay sekarPosted Dec 18, 2007, 12:41 AM EST
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 28, 2007, 11:24 PM EST
Thanks for giving us a good article for reading basics.
satish pasilaPosted Oct 23, 2007, 11:07 PM EDT
I was unable to find the link to downlaod that book . So plz tell me where can i find that link .