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

后端 未结 3 755
被撕碎了的回忆
被撕碎了的回忆 2020-12-07 03:22

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.

However, wh

3条回答
  •  暖寄归人
    2020-12-07 03:36

    The List 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, not List.

提交回复
热议问题