tags:

views:

77

answers:

2

What does it mean? I used a list of list in asp.net mvc and sent them through viewdata of ActionResuls to retrieve it in views. But when I change it to list of list the it give me an error of HttpWebException. When I check it inside the immediate window, it tells me that the error is:

Using the generic type 'System.Collections.Generic.List<T>' requires 1 type arguments

So, what does it mean and what did I do wrong using it?

+1  A: 

The List<T> class is a generic type.

In order to use it, you need to provide a type argument.

For example, if you want to have a list of integers, you need to declare it as List<int>, not List.

SLaks
A: 

I guess you wrote something like List<List>> ...
But there is no class named List.. - List has a generic type parameter.
For example - list of lists of integers should be

List<List<int>> listOfLists = .....

For better understanding of C# generics take a look here.

Itay