Starting from:

$24.99

31927 Assignment 1 Solution

pplication Development in .NET 32998 .NET Application Development
Introductory Lab: Visual Studio .NET Familiarisation
In this lab you will be introduced to the Visual Studio .NET Integrated Development Environment (IDE). We will be using this tool extensively in this subject, so take the time to work through this lab sheet carefully. In addition, you should explore the IDE further in your own time as there are many additional features of Visual Studio that we won’t cover in this basic introduction.
1. Starting up Visual Studio .NET
Use the Start menu to fire up Visual Studio .NET 2015. The location depends on which lab you are in. Usually it’s in Start→Programs→Microsoft Visual Studio 2015→Visual Studio 2015. Your startup screen will look similar to this.

From this screen you would usually open a project you had previously been working on or start a new project from scratch.
If you want help with using Visual Studio or C# the following links are very helpful http://msdn.microsoft.com http://www.c-sharpcorner.com/
Select New Project
This will open a dialog box similar to this.

You will need to do the following
1. Change the Name to HelloWorld
2. Select Console Application
3. Change the Location to the one on your network drive
You should see a screen similar to this

2. Exploring Visual Studio
On the right side of your screen you will see ‘Solution Explorer’ which displays files contained in your project. In Visual Studio it is possible to have multiple projects grouped together as one ‘Solution’. When you get to the stage of using multiple projects, the Solution Explorer will show them all in this window.
In the main window you should see the source code template generated by Visual Studio. This is basically a new class called ‘Program’ by default, which has a single method called ‘Main’. Now, to make your program do something we need to put some code in the ‘Main’ method. Edit your code and make the Main look something like this.

Look at this code and see if you can figure out what it does and how it works.
All being well you should be able to run your program. Click the ‘Start’ button (the green, triangular arrow button) and Visual Studio will attempt to compile and execute your program. You should see a console window appear with your message Hello World, as shown below. To finish the program and close the window you will need to press a key.

Outlining
Note the little – signs on the left of your code. These allow you to show/hide parts of your code to allow for easier editing.
Debugging
We can set a breakpoint in our code by clicking in the grey margin at the left of the code window at a line of our choosing. You should see a red dot appear and the code highlighted in red.
Now start the program using the arrow button. The code will run till it gets to the breakpoint. At that point you can go back to Visual Studio, run the mouse over the high-lighted code and see the value of each variable in it. You can move through the debug lines by using the commands in the Debug menu.
To remove the breakpoint, click on the red dot.
3. Explore on your own
The Visual Studio IDE is a very rich one with many customizable features. Explore the menu’s and see what’s on offer.
4. Tutorial/Lab - 1 Programs
Please download and use the code provided on UTSOnline for the Task.
Open the solution files and the follow the instructions given in the program.cs file as comments. A test case is also provided to test your program and check if the actual output matches the expected output. The task are given below: 1. Write a program to print Hello World
2. Write a program to create a GreetingApp
3. Write a Program to create a GreetingApp using comand line arguments

More products