Can one define multiple contraints for single type argument in Generic Class ? Yes , one can specify multiple contraints for single type argument in […]
Category: CSharp Interview Questions
How to one constraint type argument passed in Generic class ?
Type argument in Generic class can be constrainted using Generic constraint. Syntax for Generic constrint is below : class B<T> where T: Typeconstraint where B […]
Explain lock statement – C# Threading ?
lock ensures that another thread does not enter critical section if one thread is in critical section code. This means one thread gets mutual exclusive […]
What are Named Parameters in C# 4.0 ?
Named Parameters in C# 4.0 What are Named Parameters in C# 4.0 ? Named Parameters allows developers to not look at the order of parameters […]
What are various Threading problems ?
Below are few important Threading problems : Thread explosion – We usually keep increasing thread count without increasing the performance Shared data protection – Shared […]
Platform Invoke – C#
Platform Invoke – C# A platform invoke call to an unmanaged DLL function When platform invoke calls an unmanaged function, it performs the following sequence […]
What is Shadowing in .NET?
Shadowing in .NET When a method is defined in base class are not overridable and one needs to provide different implementation for the same in derived class. […]
Why C# does not support multiple class inheritance ?
Why C# does not support multiple class inheritance ? Multiple inheritances are not supported in C#. Consider the below example. public class Class1 { public […]
What are difference between Singleton and Static class?
What are difference between Singleton and Static class? Singleton Class can extend classes and implement interfaces, while a static class cannot implement the interface. Singleton […]
State different generic collections defined in System.Collections.Generic Namespace ?
Different generic collections defined in System.Collections.Generic Namespace are listed below : List<T> – Represents a strongly typed list of objects that can be accessed by index. […]
