C# Programming Projects for Beginners
4.5 (130 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
8,053 students enrolled
Wishlisted Wishlist

Please confirm that you want to add C# Programming Projects for Beginners to your Wishlist.

Add to Wishlist

C# Programming Projects for Beginners

Learn C# by doing programming projects for beginners
4.5 (130 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
8,053 students enrolled
Created by Pavol Almasi
Last updated 7/2017
English
English
Current price: $10 Original price: $25 Discount: 60% off
5 hours left at this price!
30-Day Money-Back Guarantee
Includes:
  • 9 hours on-demand video
  • 1 Article
  • 36 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Practice and understand loops, arrays, structures, OOP and more
  • Code beginner and intermediate projects using C#
  • Become an intermediate programmer by understanding the how and why of each line in your program
  • Think like a programmer
  • Uderstand project requirements and choose the right approach to each solution
View Curriculum
Requirements
  • Students should have installed Visual Studio in order to follow along.
  • Students should be actively learning C#
  • Students should be familiar with the programming concepts presented in the exercises
Description

C# is an excellent programming language. It’s the main language in the .Net family of languages, and as such, it allows you to program some truly amazing solutions. So, congratulations on choosing to learn this amazing language. :-)

As it is common among beginner programmers, the enthusiasm to learn often is not enough to make the leap from beginner to intermediate.  

The bad news is: code fear is real, and it hinders, or even stops your progress. The good news is: you can learn to eliminate it! And all it takes is a little practice and determination. And that’s where this course will help you greatly!

The course goes over variety of C# programming exercises and projects. I show you how to put the theory you learned into practice by showing you how to solve each exercise and walking you through all the Why’s and How’s. 

You and I will go on a journey to program simple solutions using basic programming techniques, all the way to more complex ones, such as multi-dimensional arrays, structure of arrays, and OOP solutions. 

In the process, you will learn a lot about C# language. You will learn how to translate the project requirements into a working code. You will learn to use many different programming concepts, such as Conditional Statements, Loops, Arrays, Multi-dimensional arrays, OOP… and pick the right one for your solution. But above all, you will learn to think like a programmer!

This course is all about practice. Therefore, to benefit from this course, you need to be an active student. It doesn't matter if you are self-taught or attend a programming course. What matters is the time and effort you are willing to put into learning and practicing your skills. 

There are no lectures in this course. However, I do my best to explain what I am trying to accomplish with each line of code, and touch on common pitfalls, too. 

This is a course for beginner C# .net programmers who need to put the concepts and theory they learned into practice and for people who prefer to learn by doing.

If that's you, then let's start coding!

Who is the target audience?
  • The course is best suited for students taking C# classes, or self-taught students.
  • Beginners who are currently learning how to program in C# and need a guided practice exercises.
  • Students who need to put the concepts and theory they learned into practice.
  • Beginner C# .Net programmers seeking to cement the knowledge by doing short programming projects that are challenging, yet not out of his/her skill set exercises.
  • Students who take C# classes and struggle with their homework, or students who need a little help or a reference will love this course.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
49 Lectures
08:46:56
+
Introduction
1 Lecture 04:36
+
Formatting Output
1 Lecture 09:04

Design an application that converts miles to feet. Declare and initialize miles to 4.5. Show your miles formatted with two positions to the right of the decimal.

Feet and inches should both be shown with no positions to the right of the decimal. Once you get that portion running, modify your solution so that you also show the total number of inches. Go into your source code and change the initialization value for miles. Rerun the application.

Preview 09:04
+
C# Methods and Behaviors
2 Lectures 27:51

Write an application that includes two additional methods in addition to the Main() method. One method should return a string consisting of four or five lines of information about your school. The other method should return a string consisting of asterisks. First call the method that returns the string of asterisks. Call the method that returns the asterisk a second time after you invoke the method that displays the information about your school. Items you might include are the name of your school, number of students enrolled,

and school colors. Include appropriate labels. The display should be aesthetically pleasing so include enough asterisks to surround your listing.

Preview 16:17

Design a message display application. Allow users to enter their name and favorite saying in a single method that gets invoked two times. First call the method asking for the person’s name. Send a string argument indicating what value should be entered. Invoke the method a second time to retrieve the favorite saying.

Return the string values back to the Main( ) method. Call another method, sending the name and saying. From that method, display the message showing the person’s name and their saying surrounded by rows of greater than/less than symbols.

Favorite Saying Exercise
11:34
+
Basic OOP - Creating Your Own Classes
1 Lecture 17:15

Create a class representing a student. Include characteristics such as student number, first and last name, overall GPA, classification, and major. Write at least two constructors. Include properties for each of the data items. Create a second class that instantiates the first class with information about yourself. In the second class, create a class method that displays your name and GPA.

Student Information Exercise
17:15
+
Making Decisions
2 Lectures 28:03

Using C# conditional statements, write an application that will enable you to display an aquarium’s pH level. The pH is a measure of the aquarium water’s alkalinity and is typically given on a 0-14 scale. For most freshwater fish tanks, 7 is neutral. Tanks with a pH lower than 7 are considered acidic. Tanks with a pH higher than 7 are alkaline. Allow the user to input the pH level number. Display a message indicating the health (i.e. acidic, neutral, or alkaline) of the aquarium.

Preview 11:51

Create a Month class that has a single data member of month number. Include a member method that returns the name of the month and another method that returns the number of days in the month. The ToString( ) method should return the name and number of days. Write a second class to test your Month class. The second class should allow the user to input a month number. Display the name of the month associated with the number entered and the number of days in that month. For this exercise, use 28 for February. If the user inputs an invalid entry, display an appropriate message

Number Of Days in a Month Exercise
16:12
+
Repeating Instructions
3 Lectures 56:04

Use C# loops to write a program that generates 1000 random numbers between 0 and 100000. Display the number of odd values generated as well as the smallest and the largest of values. Output should be displayed in a Windows message box.

Random Numbers Exercise
17:19

Create an application that contains a loop to be used for input validation. Valid entries are positive integers less than 100. Test your program with values both less than and greater than the acceptable range as well as non-numeric data. When the user is finished inputting data, display the number of valid and invalid entries entered.

Input Validation Exercise
15:10

Write a program that produces a multiplication table with 25 rows of computations. Allow the user to input the first and last base values for the multiplication table. Display a column in the table beginning with the first base inputted value. The last column should be the ending base value entered.

The first row should be for 1 times the beginning base, 1 times the (beginning  base value + 1), through 1 times the ending base value. The last row should be for 25 times the beginning base, 25 times the (beginning base value + 1), through 25 times the ending base value. Base values can range from 2 through 8. Display an error message if an invalid base is entered. Display an aesthetically formatted multiplication table.

Multiplication Table Exercise
23:35
+
Arrays
6 Lectures 01:36:39

Write a program using C# arrays that reads data into an array of type int. Valid values are from 0 to 10. Your program should display how many valid values were inputted as well as the number of invalid entries. Output a list of distinct valid entries and a count of how many times that entry occurred.

Use the following test data:
1 7 2 4 2 3 8 4 6 4 4 7

Preview 21:37

The Ion Realty Sales Corporation would like to have a listing of their sales over the past few months. Write a program that accepts any number of monthly sales amounts. Display the total of the values. Display a report showing each original value entered and the percentage that value contributes to the total. You may prompt the user for the number of values to be inputted.

Calculating Sales and Percentages Exercise
15:29

Write a program that uses array and that allows any number of values between 0 and 10 to be entered. When the user stops entering values, display a frequency distribution bar chart. Use asterisks to show the number of times each value was entered. If a given number is not entered, no asterisks should appear on that line. Your application should display error messages if a value outside the acceptable range is entered or if a non-numeric character is entered.

Frequency Distribution Bar Chart Exercise - Part 1
13:32

Write a program that uses array and that allows any number of values between 0 and 10 to be entered. When the user stops entering values, display a frequency distribution bar chart. Use asterisks to show the number of times each value was entered. If a given number is not entered, no asterisks should appear on that line. Your application should display error messages if a value outside the acceptable range is entered or if a non-numeric character is entered.

Frequency Distribution Bar Chart Exercise - Part 2
15:09

N will be input by user. And there will be two arrays with N size, one is for positive numbers and the other one is for negative numbers.

And all numbers in both arrays will be 0 as default. And N numbers will be guessed by your program (you can use Random()).
Those guessing numbers will be between -100 and 100. If one number guessed and if this number is positive,
it will be stored to positive number array and if this number is negative, it will be stored to negative number array.
If the guessed number is zero then it will guess again.
After N numbers are guessed your program will find position sum of numbers. Position sum of numbers are calculated
by adding two number in the same position of two arrays.
Output will be to show the positive and negative arrays and position number array.

EXAMPLE:
Input:
N=5
Let us say Random numbers example: -2,3, 5, -5,-2

Output
Positive numbers(5 of them): 3, 5, 0, 0, 0
Negative numbers (5 of them): -2, -5, -2, 0, 0
Position sum of numbers: 1,0,-2

Random Numbers Calculations Exercise - Part 1
13:48

N will be input by user. And there will be two arrays with N size, one is for positive numbers and the other one is for negative numbers.

And all numbers in both arrays will be 0 as default. And N numbers will be guessed by your program (you can use Random()).
Those guessing numbers will be between -100 and 100. If one number guessed and if this number is positive,
it will be stored to positive number array and if this number is negative, it will be stored to negative number array.
If the guessed number is zero then it will guess again.
After N numbers are guessed your program will find position sum of numbers. Position sum of numbers are calculated
by adding two number in the same position of two arrays.
Output will be to show the positive and negative arrays and position number array.

EXAMPLE:
Input:
N=5
Let us say Random numbers example: -2,3, 5, -5,-2

Output
Positive numbers(5 of them): 3, 5, 0, 0, 0
Negative numbers (5 of them): -2, -5, -2, 0, 0
Position sum of numbers: 1,0,-2

Random Numbers Calculations Exercise - Part 2
17:04
+
Advanced Arrays
4 Lectures 49:30

Write an application that is using C# 1-Dimnensional and C# 2-Dimensional Arrays and which creates and returns a one-dimensional array containing all the elements in the two-dimensional array. Store the values in a row major format. For testing purposes, you may do a compile-time initialization of a 12 x 5 two-dimensional array. Display both the two-dimensional and the one dimensional array. Be sure the values in the array are number aligned.

Preview 13:02

Each seven-letter word corresponds to exactly one seven-digit telephone number. The restaurant wishing to increase its take-home business could surely do so with the number 825-3688 (i.e., “TAKEOUT”).

Each seven-digit phone number corresponds to many separate seven-letter words. Unfortunately, most of these represent unrecognizable juxtapositions of letters. It’s possible, however, that the owner of a barber shop would be pleased to know that the shop’s telephone number, 424-7288, corresponds to “HAIRCUT.” The owner of a liquor store would, no doubt, be delighted to find that the store’s telephone number, 233-7226, corresponds to “BEERCAN.” A veterinarian with the phone number 738-2273 would be pleased to know that the number corresponds to the letters “PETCARE.”
Write a C# program that, given a seven-digit number, writes to a file every possible seven-letter word corresponding to that number. Avoid phone numbers with the digits 0 and 1.

Telephone Number Word Generator Exercise - Part 1
11:35

Each seven-letter word corresponds to exactly one seven-digit telephone number. The restaurant wishing to increase its take-home business could surely do so with the number 825-3688 (i.e., “TAKEOUT”).

Each seven-digit phone number corresponds to many separate seven-letter words. Unfortunately, most of these represent unrecognizable juxtapositions of letters. It’s possible, however, that the owner of a barber shop would be pleased to know that the shop’s telephone number, 424-7288, corresponds to “HAIRCUT.” The owner of a liquor store would, no doubt, be delighted to find that the store’s telephone number, 233-7226, corresponds to “BEERCAN.” A veterinarian with the phone number 738-2273 would be pleased to know that the number corresponds to the letters “PETCARE.” Write a C# program that, given a seven-digit number, writes to a file every possible seven-letter word corresponding to that number. Avoid phone numbers with the digits 0 and 1.

Telephone Number Word Generator Exercise - Part 2
07:53

Each seven-letter word corresponds to exactly one seven-digit telephone number. The restaurant wishing to increase its take-home business could surely do so with the number 825-3688 (i.e., “TAKEOUT”).

Each seven-digit phone number corresponds to many separate seven-letter words. Unfortunately, most of these represent unrecognizable juxtapositions of letters. It’s possible, however, that the owner of a barber shop would be pleased to know that the shop’s telephone number, 424-7288, corresponds to “HAIRCUT.” The owner of a liquor store would, no doubt, be delighted to find that the store’s telephone number, 233-7226, corresponds to “BEERCAN.” A veterinarian with the phone number 738-2273 would be pleased to know that the number corresponds to the letters “PETCARE.” Write a C# program that, given a seven-digit number, writes to a file every possible seven-letter word corresponding to that number. Avoid phone numbers with the digits 0 and 1.

Telephone Number Word Generator Exercise - Part 3
17:00
+
Putting it all together - OOP, Loops, 2D Arrays, Output Formatting
8 Lectures 01:04:55

Instructions:

Print a 2-Dimensional Chessboard
Continually ask the user for coordinates
Always overwrite the destination with the target
Always replace the target with an empty string
End the program if any of the coordinates are out of range
Technical Requirements
The board must actually be a 2-Dimensional Array of strings.
The board you display must be a true representation of the 2D Array.

Preview 03:18

Instructions:

Print a 2-Dimensional Chessboard Continually ask the user for coordinates Always overwrite the destination with the target Always replace the target with an empty string End the program if any of the coordinates are out of range Technical Requirements The board must actually be a 2-Dimensional Array of strings. The board you display must be a true representation of the 2D Array.

Almost Chess Exercise - Part 2
07:52

Instructions:

Print a 2-Dimensional Chessboard Continually ask the user for coordinates Always overwrite the destination with the target Always replace the target with an empty string End the program if any of the coordinates are out of range Technical Requirements The board must actually be a 2-Dimensional Array of strings. The board you display must be a true representation of the 2D Array.

Almost Chess Exercise - Part 3
06:18

Instructions:

Print a 2-Dimensional Chessboard Continually ask the user for coordinates Always overwrite the destination with the target Always replace the target with an empty string End the program if any of the coordinates are out of range Technical Requirements The board must actually be a 2-Dimensional Array of strings. The board you display must be a true representation of the 2D Array.

Almost Chess Exercise - Part 4
14:10

Instructions:

Print a 2-Dimensional Chessboard Continually ask the user for coordinates Always overwrite the destination with the target Always replace the target with an empty string End the program if any of the coordinates are out of range Technical Requirements The board must actually be a 2-Dimensional Array of strings. The board you display must be a true representation of the 2D Array.

Almost Chess Exercise - Part 5
05:30

Instructions:

Print a 2-Dimensional Chessboard Continually ask the user for coordinates Always overwrite the destination with the target Always replace the target with an empty string End the program if any of the coordinates are out of range Technical Requirements The board must actually be a 2-Dimensional Array of strings. The board you display must be a true representation of the 2D Array.

Almost Chess Exercise - Part 6
06:59

Instructions:

Print a 2-Dimensional Chessboard Continually ask the user for coordinates Always overwrite the destination with the target Always replace the target with an empty string End the program if any of the coordinates are out of range Technical Requirements The board must actually be a 2-Dimensional Array of strings. The board you display must be a true representation of the 2D Array.

Almost Chess Exercise - Part 7
15:17

Instructions:

Print a 2-Dimensional Chessboard Continually ask the user for coordinates Always overwrite the destination with the target Always replace the target with an empty string End the program if any of the coordinates are out of range Technical Requirements The board must actually be a 2-Dimensional Array of strings. The board you display must be a true representation of the 2D Array.

Almost Chess Exercise - Part 8
05:31
+
BONUS VIDEOS: Starting Out With Visual C# - WinForms exercises
21 Lectures 02:53:00

The following exercises are just a small sample of exercises taken from my new course “Starting Out With Visual C#: Coding Exercises for Beginners”.

The course goes over every exercise (95 altogether) from the popular C# textbook "Starting Out With Visual C#" by Tony Gaddis.

This is a beginner's course to coding Windows Forms using C#. We start with basic exercises building Windows Forms GUI, and then move on to conditional statements, loops, collections, classes and objects, and databases.

I lead you through a complete solution to every exercise, and of course, provide all source code to each solution.

https://www.udemy.com/starting-out-with-visual-c-sharp-coding-exercises-for-beginners

The course is a large collection of C# WinForm exercises, perfect for those studying C# at school, those who are self-taught and want to put theory into practice, those who know some C# but are not familiar with WinForms, and those, who believe the saying "practice makes perfect".

Hope to see you at the course.
Pavol

Read Me
00:40

Latin Translator - WinForm Basics
09:54

Create an application that displays 5 images in PictureBox controls. The application should perform the following actions: 

• When the user clicks the 1 image, the application should display the word One in a message box. • When the user clicks the 2 image, the application should display the word Two in a message box. 

• When the user clicks the 3 image, the application should display the word Three in a message box.

• When the user clicks the 4 image, the application should display the word Four in a message box. 

• When the user clicks the 5 image, the application should display the word Five in a message box.

Clickable Images - WinForms Basics
08:06

Create an application with five PictureBox controls. Each PictureBox should display a different card from the set of images. When the user clicks any of the PictureBox controls, the name of the card should be displayed in a Label control.

Card Identifier - WinForms Basics
07:27

Name Formatter - Basic Output
09:31

Tip, Tax, and Total Create an application that lets the user enter the food charge for a meal at a restaurant. When a button is clicked, the application should calculate and display the amount of a 15 percent tip, 7 percent sales tax, and the total of all three amounts.

Tip Calculator - Basic Input and Output
08:43

Distance Calculator - Basic Input and Output
06:23

Create an application that allows the user to enter an integer between 1 and 10 into a TextBox control.The program should display the Roman numeral version of that number. If the number is outside the range of 1 through 10, the program should display an error message.

Roman Numeral Converter - Conditional Statements
08:38

Scientists measure an object’s mass in kilograms and its weight in Newtons. If you know the amount of mass of an object, you can calculate its weight, in Newtons, with the following formula: 

Weight = Mass × 9.8 

Create an application that lets the user enter an object’s mass and then calculates its weight. If the object weighs more than 1000 Newtons, display a message indicating that it is too heavy. If the object weighs less than 10 Newtons, display a message indicating that it is too light.

Mass and Weight - Conditional Statements
09:46

The date June 10, 1960, is special because when it is written in the following format, the month times the day equals the year: 6/10/60 Create an application that lets the user enter a month (in numeric form), a day, and a two-digit year. The program should then determine whether the month times the day equals the year. If so, it should display a message saying the date is magic. Otherwise, it should display a message saying the date is not magic.

Magic Dates - Conditional Statements
09:22

If you know a vehicle’s speed and the amount of time it has traveled, you can calculate the distance it has traveled as follows: 

Distance = Speed × Time 
For example, if a train travels 40 miles per hour for 3 hours, the distance traveled is 120 miles. The user enters a vehicle’s speed and the number of hours traveled into text boxes. When the user clicks the Calculate button, the application should use a loop to display in a list box the distance the vehicle has traveled for each hour of that time period.

Distance Calculator - Loops
08:44

Modify the Distance Calculator program that you wrote for Programming Problem 1 so it writes its output to a file instead of displaying it in a ListBox control. Open the file in Notepad or Visual Studio to confirm the output.

Distance Calculator 2 - Writing to File
08:25

Celsius-to-Fahrenheit Table Assuming that C is a Celsius temperature, the following formula converts the temperature to a Fahrenheit temperature(F): 

F = 9/5 * C + 32 

Create an application that displays a table of the Celsius temperatures 0–20 and their Fahrenheit equivalents.The application should use a loop to display the temperatures in a list box.

Celsius to Fahrenheit Converter - Loops
08:20

Create an application that lets the user enter an item’s wholesale cost and its markup percentage. It should then display the item’s retail price. For example: 

• If an item’s wholesale cost is $5.00 and its markup percentage is 100 percent, then the item’s retail price is $10.00. 
• If an item’s wholesale cost is $5.00 and its markup percentage is 50 percent, then the item’s retail price is $7.50. 
The program should have a method named CalculateRetail that receives the wholesale cost and the markup percentage as arguments and returns the retail price of the item.

Retail Price Calculator - Methods and Functions
09:17

When an object is falling because of gravity, the following formula can be used to determine the distance the object falls in a specific time period: 

d = 1/2 gt(pow of 2)
The variables in the formula are as follows: 
d is the distance in meters, 
g is 9.8, 
and t is the amount of time in seconds that the object has been falling.
Create an application that allows the user to enter the amount of time that an object has fallen and then displays the distance that the object fell. The application should have a function named FallingDistance. The FallingDistance function should accept an object’s falling time (in seconds) as an argument.The function should return the distance in meters that the object has fallen during that time interval.

Falling Distance - Methods and Functions
07:32

In physics, an object that is in motion is said to have kinetic energy.The following formula can be used to determine a moving object’s kinetic energy: 

KE = 1/2 mv(pow of 2)
In the formula KE is the kinetic energy, m is the object’s mass in kilograms, and v is the object’s velocity in meters per second.Create an application that allows the user to enter an object’s mass and velocity and then displays the object’s kinetic energy. The application should have a function named KineticEnergy that accepts an object’s mass(in kilograms) and velocity(in meters per second) as arguments.The function should return the amount of kinetic energy that the object has.

Kinetic Energy
05:59

Create an application that reads text file’s contents into an array, displays the array’s contents in a ListBox control, and calculates and displays the total of the array’s values.

Total Sales - Reading Text Files and Arrays
10:52

Create an application with a method that accepts a string as an argument and returns the number of words it contains.

For instance, if the argument is "Four score and seven years ago," the method should return the number 6. The application should let the user enter a string, and then it should pass the string to the method. The number of words in the string should be displayed.

Preview 04:31

Create a class named Pet which has the following properties: 

• Name—The Name property holds the name of a pet.
• Type—The Type property holds the type of animal that a pet is. Example values are “Dog”, “Cat”, and “Bird”. 
• Age—The Age property holds the pet’s age.
Demonstrate the class in an application that creates an object of the class and lets the user enter the name, type, and age of his or her pet. This data should be stored in the object. Retrieve the pet’s Name, Type, and Age properties and display their values on the screen. 

Preview 11:42

Classes Create an Employee class that has properties for the following data: 

• Employee name 
• Employee number 
Next, create a class named ProductionWorker that is derived from the Employee class. The ProductionWorker class should have properties to hold the following data: 
• Shift number(an integer, such as 1, 2, or 3) 
• Hourly pay rate 
The workday is divided into two shifts: day and night. The Shift property will hold an integer value representing the shift that the employee works.The day shift is shift 1 and the night shift is shift 2. Create an application that creates an object of the ProductionWorker class and lets the user enter data for each of the object’s properties.Retrieve the object’s properties and display their values.

Employee and Production Worker - OOP Inheritance
11:00

Use Visual Studio to create a database named Personnel.mdf.The database should have a table named Employee, with columns for employee ID, name, position, and hourly pay rate.The employee ID should be the primary key.Insert at least five sample rows of data into the Employee table.Create an application that displays the Employee table in a DataGridView control.

Personnel Database - Creating Database Using Database Wizard
08:08
About the Instructor
Pavol Almasi
4.5 Average rating
230 Reviews
13,336 Students
4 Courses
Computer programmer, Coding buddy, teaching enthusiast

I am a professional computer programmer for a national insurance company. I am versed in variety of programming languages, technologies, and frameworks. Currently using mostly SQL and .Net.

I have a Bachelor's Degree from City University of Seattle, majoring in Business Administration.

I first came in contact with programming back in the good 'ol days of Visual Basic 6 and Visual Basic for Applications. Manipulating Access databasea was so much fun! 

I moved onto Web development in early 2000's, using HTML and CSS, later added PHP. It was then when I realized I really enjoyed the coding of the back end much more than the design part...and that joy of coding stayed with me ever since.

I LOVE coding, and I LOVE doing exercises and projects in my free time. I am hoping my course(s) help you to better understand the programming principles and give you a good starting point for your further adventure in computer programming,