Theory 2 C#
Theory 2 C#
Question 1
You are working on a group project to develop a C# application using Visual Studio. Your
team needs to familiarize themselves with the IDE's features to enhance efficiency.
a) Outline three (3) types of menus in the Visual Studio IDE that you would use to assist
your development process. (6 marks)
b) In your project, you need to implement a method that can be determined at compile
time. With an example, explain what static polymorphism is and how it can be useful
in your application. (6 marks)
c) While using version control for your project, you encounter issues with team
members editing the same files. Explain the difference between version control
and merging, and why it’s important for your team. (4 marks)
Question 2
As part of your coursework, you are required to test a C# program to ensure it functions
correctly and handles user input properly.
a) Outline the types of testing frameworks that can be used to test C# programs, and
explain why they are important for your project. (4 marks)
b) In developing your program, you realize that managing user input is crucial. Explain
the difference between data binding and validation in C# applications. (2 marks)
c) To improve user experience, you decide to implement dialog boxes. Outline three (3)
types of dialog boxes you might use in your C# program and their purposes.(6 marks)
Question 3
a) Outline the main components of ADO.Net that you would use to connect to a
database in your C# application. (8 marks)
b) You are developing a C# application and need to structure your code effectively while
implementing key programming concepts.
Question 4
You are assessing the .NET Framework for a new project and need to understand its benefits
and drawbacks.
i. Outline 2 advantages and 2 disadvantages of using the .NET Framework that could
impact your project. (4 marks)
ii. Explain the types of system exceptions in C# that you should be aware of when
developing applications. (4 marks)
iii. With an example, explain how the foreach loop works in C# for iterating over
collection (4 marks)