From the course: C# and .NET Essential Training
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
Challenge: How many days? - C# Tutorial
From the course: C# and .NET Essential Training
Challenge: How many days?
(upbeat music) - [Instructor] Okay, let's try a programming challenge with what we've learned so far about working with dates and times in C-Sharp. So for this challenge, we're going to build a program that calculates how many days it's been since a particular date went by, or if the date hasn't gone on by yet, how many days until that day arrives? So let's take a look at the finished program so you can see what the results should look like and then you're going to build your own challenge. So in my finished folder for numbers and dates, I am going to run my finished challenge here. So I'm going to open up on this in the terminal and I'll run my code. All right, so when the program starts, I'm prompted to enter a date or the word exit to exit the program. So let's start with something simple. I'll end enter new year's day of 2015 which of course is January 1st. So I'll write January 21st, 2015. And you can see that when…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.