top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is use of Interlocked class ?

+1 vote
336 views
What is use of Interlocked class ?
posted Mar 25, 2014 by Atul Mishra

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Interlock class is used to increment, decrement, exchange, etc. on shared variable between multiple threads.

answer Mar 27, 2014 by Pavan P Naik
Similar Questions
+4 votes

Why can’t we use a static class instead of singleton?

+1 vote

All constructors are public then why not destructor? If it is private then how compiler access these private destructor?

+1 vote
using System;

namespace CareerRideTest
{    
  class A
  {    
    public A()
    {
      Console.WriteLine("I am in A");
    }
  }

  class B : A
  {
    public B()
    {
      Console.WriteLine("I am in B");
    }
  }

  class C : B
  {
    static C()
    {
      Console.WriteLine("I am in Static C");
    }
    public C()
    {
      Console.WriteLine("I am in C");
    }
  }    

  class MainClass
  {
    static void Main(string[] args)
    {
      C obj = new C();    
      Console.ReadKey();    
    }
  }    
}
...