20BSC1005 Vishesh Worksheet 1.4

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Practical Number: 1.

Student Name: Vishesh Chaudhary UID: 20BSC1024


Branch: BSC Section/Group: A
Semester: 6 Date of Performance: 8/MAR/2023
Subject: Web Application Development Lab Subject Code: 20SCP-354

1. Aim/ Overview of the experiment:


Write a program to demonstrate properties using C# language.

2. Steps for experiment/practical:

using System;
using System.Collections.Generic;
namespace Program
{
class Vishesh
{

static void Swap<T>(ref T a, ref T b)


{
T temp;
temp = a;
a = b;
b = temp;
}
static void Main(string[] args)
{
int a = 15, b = 10;

Console.WriteLine("Before swap: {0}, {1}", a, b);


1|Page
Swap<int>(ref a, ref b);
Console.WriteLine("After swap: {0}, {1}", a, b);
Console.ReadLine();
}
}
}

3. Output:

4. Learning Outcomes:
1. Basic Concepts of .Net Framework.
2. How to declare private variable outside the class.
3. How to create class in C# programming language.
4. Concept of generics in C# programming language.

2|Page
Evaluation Grid:

Sr. Parameters Marks Obtained Maximum Marks


No.
1. Demonstration and 5
Performance
2. Worksheet 10
3. Post Lab Quiz 5

3|Page

You might also like