Assignment - 2
Assignment - 2
BRANCH: CI – 1
SECTION: 01
3 Inheritance
6 Constructor
7 Data abstraction
9 Delegates
10 Reflection in c#
11 String builder in c#
13 Windows services
12 Exception handling in c#
12.1 WAP to demonstrate exception Handling In C# Using
Try catch block by considering the following Array Name
arr and enter five element exception to print 7 index
element.
17 DLL component in c#
Output-
2.2) Write a program to demonstrate class and object by considering the
following and creating multiple objects - Class name - Student Object name
- s1,s2 Data members - stud_name(string),roll_no(int),mobile_no(int).
Output-
2.3)Write a program to demonstrate of accessing data members of one
class into another class by considering the following - Class name1
Student Class name2 - Stud Object name - s1 Data members
stud_name(string)
Output-
Assignment - 3
INHERITANCE
Assignment - 5
RUN TIME POLYMORPHISM
5.1 WAP demonstrates method overriding by considering the following: class name =
animal, derived class name1 = dog, derived class naem2 = snake, data member animal
name, member function= move.
OUTPUT-
Assignment - 7
CONSTRUCTOR
OUTPUT-
Assignment - 7
DATA ABSTRACTION
Result-
7.2- write a program to demonstrate data abstraction using public keyword
OUTPUT-
Assignment - 8
INDEXER
8.1) Write a program to demonstrate Indexer in C# -
Output -
8.2) Write a program to demonstrate 1D Indexer with “int” datatype in C# -
Output-
Assignment - 9
DELEGATE
9. 1)Write a program to demonstrate delegates in C# -
Output-
Output-
Assignment 10
REFLECTION
10.1 Write a program to demonstrate reflection by declaring & initialising a
type string to display information like Name,Full Name,Namespace & its
base type.
Output-
Output-
class -
Output-
11.4)Write a program to demonstrate
Output-
11.5)Write a program to demonstrate
Output-
11.6)Write a program to demonstrate
Output-
Assignment 12
EXCEPTION HANDLING
12.1 WAP to demonstrate exception Handling In C# Using Try catch block
by considering the following Array Name arr and enter five element
exception to print 7 index element.
OUTPUT-
12.2 WAP to demonstrate Exception Handling Using Try finally Block to
print invalid index as an exception while entering index out of range and to
display an element at index 3 using finally block.
OUTPUT-
12.3 Wap to demonstrate Exception Handling Using throw while entering
invalid index number by using if condition.
OUTPUT-
Assignment 13
Introduction to Window Services
13.1- All Screenshots of performing windows services.
Window Service Installer
Assignment 14
Reading Xml File
14.1 Write a Program to demonstrate reading on xml file from your system
By considering your following-
1-filename Divya.xml
Output-
14.2 WAP to demonstrate reading of all elements from a given XML file with
its description by considering the following. YourName.xml.
Assignment
Output-
15
WRITING OF XML FILE
15.1- Write a program to demonstrate Writing a Xml file in C# by
considering the followingFilename- employee.xml
Start element name - employee
Inside elements - name,id,dept
Display the following output-
Assignment
Output-
16
SENDING MAIL USING SMTP
16.1- Write a program to demonstrate the concept of sending email using
smtp in C# by using System.Net.mail.Package and display the following
output.(Sending email).
Assignment
OUTPUT-
17 DDL COMPONENT IN C#
17.1- Write a program to demonstrate .NET component creation in C# to
calculate addition of two numbers and square of a given number.
Assignment
OUTPUT-