What is the difference between a Static Constructor and a Singleton?

* Static constructors are run once for a type at an unknown time before any of the static members ar ...


What is the difference between SingleOrDefault() and FirstOrDefault() methods?

* Both SingleOrDefault() and FirstOrDefault() LINQ methods return default value of the passed collec ...


Why do we need Adapter when we can use an Interface?

Adapter is used in cases when we need to use two incompatible interfaces. The adapter provides the c ...


What are the differences between a Static class and a Singleton?

- singleton class can be instantiated only once, static class can't be instantiated. - singleton cl ...


Explain async and await

* async and await keywords are used for asynchronous operations * awaiting a process puts in a sep ...


What is the difference between Finalize() and Dispose() methods?

* Finalize() method releases unmanaged resources but don't assure garbage collection * Dispose() me ...


What is the difference between CopyTo and Clone methods?

* CopyTo() method copies the contents of an existing array into another array * Clone() method crea ...


How can I call the base implementation of an overridden virtual method?

Using the C# language constructs, you cannot explicitly call the base function from outside the scop ...


What is LINQ?

* LINQ stands for __Language Integrated Queries__ * LINQ library offers a set of features to perfo ...


What are the differences between const and readonly?

__const:__ * const creates constants whose value doesn't change over time * const variables are s ...


Can we execute multiple catch blocks?

you can write multiple catch blocks for a try block, but only the exception block that closely match ...


What are the differences between a String and a StringBuilder?

__String:__ * Strings are immutable * A new instance of string is returned when each time a string ...


What are the differences between an Array and an ArrayList?

__Arrays:__ * An Array uses a vector array for storing data * It can store only a single data type ...


What are Jagged Arrays?

An array of arrays is called a __Jagged Array__. Each individual array within the Jagged Array can b ...


What is meant by Boxing and Unboxing?

The method of converting a value type into a reference type is called as __BOXING__ ``` int a = ...


We use cookies to provide you with a great user experience, analyze traffic and serve targeted promotions.   Learn More   Accept