- Install Visual Studio on your laptop or home computer. Go to the official Visual Studio site and download the Community 2013 with Update 4 version.
- Start Visual Studio and familiarize yourself with it. Create a simple C# program (console application), compile and run it.
You do not have to submit anything in your homework for this problem.
-
Create a blank solution in Visual Studio called
“Intro-Programming-Homework”. This solution will hold all your homework projects, code and files. For each problem (exercises) add a separate project with self-descriptive name like“Hello-World”and“Print-Your-Name”.You do not have to submit anything in your homework for this problem.
- Play with Microsoft Developer Network (MSDN) Library Documentation.
- Find information about Console.WriteLine() method in MSDN.
- Find information about the Console class.
- Find information about the class keyword.
You do not have to submit anything in your homework for this problem.
- Create, compile and run a
“Hello C#”console application. - Ensure you have named the application well (e.g. “”HelloCSharp”).
You should submit the Visual Studio project holding the HelloCSharp class as part of your homework.
- Modify the previous application to print your name.
- Ensure you have named the application well (e.g. “PrintMyName”).
You should submit a separate project Visual Studio project holding the PrintMyName class as part of your homework.
- Write a program to print the numbers
1, 101 and 1001, each at a separate line. - Name the program correctly.
You should submit in your homework the Visual Studio project holding the source code of the PrintNumbers program.
- Create console application that prints your first and last name, each at a separate line.
- Create a console application that calculates and prints the square root of the number
12345. - Find in Internet “how to calculate square root in C#”.
- Write a program that prints the first 10 members of the sequence:
2, -3, 4, -5, 6, -7, ...
- Reformat the following C# code to make it readable according to the C# best practices for code formatting. Change the casing of the identifiers in the code (e.g. use PascalCase for the class name): HorribleCode.cs
using
System;
class hoRRiblEcoDe
{
static
void
Main()
{
Console.
WriteLine("Hi, I am horribly formatted program"
); Console.
WriteLine("Numbers and squares:")
; for (int i = 0;
i < 10;
i++)
{
Console.WriteLine(i +
" --> " + i
*
i);
}
}
}- Perform a research (e.g. in Google or Wikipedia) and provide a short list with information about the most popular programming languages. How similar are they to C#? How do they differ from C#?
- Write in a text file called
“programming-languages.txt”at least five languages along with 2-3 sentences about each of them. Use English.
- Perform a research (e.g. in Google or Wikipedia) and provide a short list with popular development environments (IDEs) like Visual Studio.
- Write in a text file called
“list-of-IDEs.txt”at least five IDEs along with 2-3 sentences about each of them. Use English.
- Describe the difference between C# and .NET Framework in 2-3 sentences.
- Write your description in a text file called
“csharp-and-dot-net-framework.txt”. Use English.
- Create a console application that prints the current date and time. Find out how in Internet.
- Write a program to read your birthday from the console and print how old you are now and how old you will be after 10 years.
- Write a program that prints the first 1000 members of the sequence:
2, -3, 4, -5, 6, -7, … - You might need to learn how to use loops in C# (search in Internet).
- Write a program that prints at the console the numbers from
1 to 1000, each at a separate line. - You might need to learn how to use loops (search in Internet).
- Set a breakpoint in the line, which prints the next number in the Visual Studio code editor. Run the program through the debugger using the
[F5]key. When the debugger stops at the breakpoint trace the code execution with[F10]key.
You do not have to submit anything in your homework for this problem. Just play with the debugger to learn how it works.