Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

public class Employee

{
Employee(string name)
{
Name = name;
}
public string Name {get; set;}
}

Main()
{
var e1 = new Employdee("Deepika");
var e2 = new Employee("Deepika");

console.Writeline(e1.Equals(e2)); // true -> false


Console.Writeline(e1 == e2); //false
}

class robot{}

class A{};

class B{};

class C: A,b

Clas B: A{};

Class C: B{};
----------------------------------------------------------

Class Singletonclass{

private:
int counter = 0;
static Singletonclass *instance;
static mutex mtx;
Singletonclass(){
counter++;
cout<<counter;
}
public:
static Singletonclass* getinstance(){
{
if(instance == NULL){
mtx.lock();
if(instance == NULL){
instance = new Singletonclass();
}
mtx.unlock();
}
return instance
}

int main(){
return 0;
}

You might also like