We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.


+ Link For Assignments, GDBs & Online Quizzes Solution


+ Link For Past Papers, Solved MCQs, Short Notes & More

Visual Programming (CS411) Assignment # 2 (GRADED) ......... Deadline Date = 10/12/2015

Visual Programming (CS411)

Assignment # 2 (GRADED)

Total marks = 20

                                                                                       Deadline Date = 10/12/2015

Please carefully read the following instructions before attempting the assignment.

Rules for Marking

It should be clear that your assignment would not get any credit if:

  • The assignment is submitted after due date.
  • The submitted assignment does not open or file is corrupt.
  • The assignment is copied. Note that strict action would be taken if the submitted assignment is copied from any other student. Both students will be punished severely.


1)      You should consult recommended books to clarify your concepts as handouts are not sufficient.

2)      You are supposed to submit your complete solution project as a single file (i. e. zip or RAR). Any other formats like scan images, PDF, bmp, docx etc. will not be accepted.

3)      You are advised to upload your assignment at least two days before Due date.


Important Note:

Assignment comprises of 20 Marks. Note that no assignment will be accepted after due date via email in any case (whether it is the case of load shedding or emergency electric failure or internet malfunctioning etc.). Hence, refrain from uploading assignment in the last hour of the deadline, and try to upload Solutions at least 02 days before the deadline to avoid inconvenience later on.

For any query please contact: CS411@vu.edu.pk


You are required to implement a Simple Salary Reader System (SSRS). The name and salary of different people is given in the attached XML file. Write a console based application with following requirements:

Program will take name of a person as input. It will then read the XML file to search the said person. If person is found, its salary will be read from the file and displayed on console as shown in output window given below. However, if person is not found, system will display “Person not found” message.

To Read XMLSalaries file from the project folder, you can use following statement:

string Dir = System.IO.Path.GetFullPath(@"..\..\..\");

The above statement will return the path of your project folder (the folder containing XMLSalaries.xml file). So, in above case “Dir” variable will contain “E:\\SalaryReader\\”. Now you can append name of the file (i.e. XMLSalaries.xml) with “Dir” variable and read it.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Views: 6146


Replies to This Discussion

plz give me idea solution

duao mai yaad rakhna...

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
namespace SalaryReader
class Program
static void Main(string[] args)
String XMLDataFilePath= "C:\\SalaryReader\\SalaryReader\\XMLSalaries.xml";
String EmployeeName = "";
int varNoRecord = 0;
XmlReader Reader = XmlReader.Create(XMLDataFilePath);
Console.Write("Enter the Name of Person: ");
while (Reader.Read()==true)
if ((Reader.NodeType == XmlNodeType.Element))
if (Reader.HasAttributes & Reader.GetAttribute("Name")==EmployeeName)
Console.WriteLine("Salary Of " + Reader.GetAttribute("Name") + " = " + Reader.GetAttribute("CurrentSalary"));
varNoRecord = 1;
if (varNoRecord == 0)
Console.WriteLine("Oop! No Person with the name "+EmployeeName+" was found");
Console.WriteLine("Press any key to continue...");

yr me ny code sara kr liya r no error but just path ni thik dy paa ra

mri XMLSalarie file 

C:\Users\Mudasir\Documents\Visual Studio 2012\Projects\asinment no 2.

yahan pari v h plz help k m kia adres du yahan py

string DIR = Path.GetFullPath(@"...........");

Dude Put doubles Back Slashes instead of one like C:\\Users\\Mudasir\\Documents\\Visual Studio 2012\\Projects\\asinment no 2.

And U have to Write the Path of Your XML File not the Assignment file 

aoa apky code m


Error    3          The name 'XmlNodeType' does not exist in the current context       

Error    2          The name 'XmlReader' does not exist in the current context

Error    1          The type or namespace name 'XmlReader' could not be found (are you missing a using directive or an assembly reference?)

ye error arhy hn

thnx bt ye btyn complier ny mjy bta di hn solution pooch ra hu k kia hal h iska

Dear Students Don’t wait for solution post your problems here and discuss ... after discussion a perfect solution will come in a result. So, Start it now, replies here give your comments according to your knowledge and understandings....

Following two errors are occurring in a line (XmlReader and Create).

what is wrong in it?

plz bhi koi to complete solution  aur assignment tayar karny ka step by step tariqa baty dy plz aj Extend date ha

1- open Visual Studio 2010 or 2012

2- click new project

3- select console application

4- write code

5- press F5 to compile it

6- save

7- go to project folder

8- zip it

9- submit it

All Done. :D

Right Click on it and select Refactor > select 1st option from selection list. problem will be solved. Gud luck 

salaries.xml file to hmari hard drive main hai na ? kya project folder main b uski aik copy rkhni hai ? uska address kaisey link ho ga code k andr ? please help


Looking For Something? Search Here

Latest Activity

Zohaib Hassan updated their profile
48 minutes ago
Mani Siddiqui BS VIII posted discussions
1 hour ago
Mani Siddiqui BS VIII posted a status
"کسی بھی روز مجھے دل سزا سنا دے گا میں خواہشوں کا بہت قتلِ عام کرتا ہوں ,,,!!"
2 hours ago
ღ*`* Mute Kuri *`*ღ liked Ellen Shades's blog post One Lesson Book - The Graphic Design
3 hours ago
Mani Siddiqui BS VIII replied to Mani Siddiqui BS VIII's discussion Ms or Certifications !!!!
5 hours ago
Zohaib Hassan posted a discussion
5 hours ago
Laila kabeer posted a discussion
5 hours ago
Zohaib Hassan replied to Bakhtawar khan's discussion <<<<<hann g>>>>>>>>
6 hours ago


This is a member-supported website. Your contribution is greatly appreciated!

© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service