I am a learner of C#.Can you please explain me what is the difference between assigning a collection to interface.
I see some examples,initialize
List<int> few = new List<int>() { 12, 123, 211, 200 };
But some assign collection to interface
IList<int> someList=new List<int>(){12,23,56,78};
When would we need the later one?.Pros and cons with examples will educate me well ,if you kindly provide the one.