I'm new to C# scripting.
I'm reading some code , and inside a class method there is a call to a function to add to a Dictionary instance named Listeners like this:
public class ......
{
private Dictionary<string, List<Component>> Listeners =
new Dictionary<string, List<Component>>();
public void AddListener(Component Listener, string NotificationName)
{
// Add listener to dictionary
if (!Listeners.ContainsKey(NotificationName))
Listeners.Add (NotificationName, new List<Component>());
// Add object to listener list for this notification
Listeners[NotificationName].Add(Listener);
}
}
Now, it seems the call to Listeners.Add has a constructor call
new List<Component>()
as an argument.
Am I getting it right ?