Reputation: 259
Can anyone tell me the meaning and the usage of List<ListViewItem>
?
And also the difference between ListviewItem
and List<ListViewItem>
?
Upvotes: 0
Views: 1153
Reputation: 40223
According to MSDN a ListViewItem is an object that
"Represents an item in a ListView control."
The List<ListViewItem> is a (non-UI related) List of ListViewItems.
See the List<T> documentation at MSDN for an explanation of those, but it's essentially a useful .NET collection of a specified type of item (in this case ListViewItem).
Upvotes: 4
Reputation: 65496
List<> is a generic list. By putting a type like ListViewItem in the brackets you tell the clr to create a new type that is specifically a list of of ListViewItems. ListViewItem could easily be replaced by another type - say string, to create a list those types, say List<string>
.
Upvotes: 4
Reputation: 1071
I would think the second one is a List that consists of ListViewItem where as ListviewItem is just an individual item.
Upvotes: 2