What is generics and have you ever used any generic classes? ( .NET Generic Interview questions)
Generics- In simple terms we will define it as General type of programming.
Rather defining something for specific types we will create it in general manner which will work for multiple types.
Let's have an example.
public T Add
In technical terms, we will create something (class or function) in such a way that while developing we won't specify the type for which we are creating rather while end developer when actually use it will specify the type.
Examples for generic class:
Yes, I do have used List and Dictionary.
Can you give me the example how you used them?
Below is an awesome C# Generic interview questions with answers video provided by questpond.com