Professional Documents
Culture Documents
Name: Muhammad Fawad ID Name: 12699 Course: OOP Lab Lab Task No. 7
Name: Muhammad Fawad ID Name: 12699 Course: OOP Lab Lab Task No. 7
ID Name: 12699
Course: OOP Lab
LAB TASK NO. 7
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApp3
{
class Program
{
class Test
{
public static int count = 0;
public Test()
{
count = count + 1;
}
}
static void Main(string[] args)
{
Test obj1 = new Test();
Test obj2 = new Test();
Test obj3 = new Test();
Test obj4 = new Test();
Console.WriteLine("total Instances = {0}", Test.count);
Console.ReadKey();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ChatApplication
{
class Program
{
class Client
{
public static int count;
public Client()
{
count++;
}
}
class Server
{
Client obj = new Client();
Client obj1 = new Client();
Client obj2 = new Client();
Client obj3 = new Client();
Client obj4 = new Client();
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ModifyClientClass
{
class Program
{
class Client
{
public string ClientMess;
}
class Server
{
Client obj = new Client();