DNTP 1
DNTP 1
.NET TECHNOLOGIES
(01CE0523)
Lab Manual
______________________________
Name: Meet Ashwinbhai Patel
Enrolment No: 92310103053
Class: 5TC2
Batch: C
FACULTY OF ENGINEERING AND TECHNOLOGY
Department of Computer Engineering
01CE0523 - .NET Technologies
INDEX
Experiment 1
AIM: Program on Class, Object and Constructor
Code:
P1.sin :-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace P1
class Student
Output:
Code:
Constructor1.sin :-
using System;
namespace Constructor1
string brand;
int price;
long num;
string color;
static Car()
public Car()
num = 92310103053;
this.brand = brand;
this.price = price;
this.color = color;
public Car(Car c)
color = c.color;
Console.WriteLine("Meet Patel");
new Car();
Console.ReadLine();
Output:
Code:
Constructor2.sin :-
using System;
namespace constructor2
class A
private A()
name = a;
num = b;
// A obj1 = new A(); //This line raises error because the constructor
is inaccessible
Output: