Click here to Skip to main content
15,887,328 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

What is ICollection?

What is meant by below code

C#
public virtual ICollection<Department> Departments { get; set; }


Thanks in advance..
Posted

1 solution

XML
The ICollection<T> interface is the base interface for classes in the System.Collections.Generic namespace. The ICollection<T> interface extends IEnumerable<T> and is extended by IDictionary<TKey, TValue> and IList<T>. An IDictionary<TKey, TValue> implementation is a collection of key/value pairs, like the Dictionary<TKey, TValue> class. An IList<T> implementation is a collection of values, and its members can be accessed by index, like the List<T> class.


C#
private void SendEmail(string host, int port,
        string username, string password,
        string from, string to,
        string subject, string body,
        ICollection&amp;lt;string&amp;gt; attachedFiles)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900