VTU Computer Science (Semester 7)
C# Programming and .NET
May 2016
Total marks: --
Total time: --
INSTRUCTIONS
(1) Assume appropriate data and state your reasons
(2) Marks are given to the right of every question
(3) Draw neat diagrams wherever necessary


1(a) Explain the basic workflow that takes between source code, a given. NET compiler and mscorel. Dll.
10 M
1(b) Explain the following terms:
i) CLS
ii) CIL
iii) ASSEMBLY
iv) MANIFEST
10 M

2(a) What is csc.exe? List the different output options available in C# compiler.
7 M
2(b) Write a note on .NET namespaces in #C.
5 M
2(c) Explain how to build visual studio. NET test application that reference external assembly.
8 M

3(a) Write a C# program to find the roots of a quadratic equation ax2 + bx + c = 0 , read coefficient a, b, c from user.
10 M
3(b) Explain any five members of System. Object.
5 M
3(c) What is the role of System. Text.String Builder and how is it different from System.String?

5 M

4(a) What is encapsulation? Explain the two ways of enforcing encapsulation with example each.
10 M
4(b) Write a C# program that shows the C#'s polymorphic support for the following Fig.Q4(b). By using the necessary data members to compute area of each shape.

10 M

5(a) Write a C# program that will read a name from the keyword and display it on the screen. The program should throw an exception when the length of name is more than 15 characters. Design your own exception.
10 M
5(b) What is object lifetime? Explain the sequence of events involved in finalization process.
10 M

6(a) Declare a class box that has members length (inches) and width (inches. The Class implements 2 interfaces english Dimention and IMetric Dimension that returns length, width in metric dimensions (m = inch*2.54). Each of these interfaces have 2 methods length ( ) and width ( ). Write a C# program to create the class and to instantiate an object of that type and use all the functions.
10 M
6(b) Explain the following interfaces:
i) Icomparable
ii) Iconvertible
iii) Icloneable
iv) Interface hierarchies
10 M

7(a) What are delegates? Explain the concepts of multicast delegate with example.
10 M
7(b) Write a C# program to do the following on complex numbers C1 and C2 using operator overloading
C1 + C2, C1 - C2 and C1 !=C2.
10 M

8(a) What is a .NET assembly? How to build shared assembly? Explain in detail with a program.
10 M
8(b) What is multifile assembly? Explain how to build and consuming a mutifile assembly.
10 M



More question papers from C# Programming and .NET
SPONSORED ADVERTISEMENTS