how to adjust “is a type but is used like a variable”?

后端 未结 4 926
有刺的猬
有刺的猬 2020-12-06 11:07

I\'m trying to generate some code in a web service. But it\'s returning 2 errors:

1) List is a type but is used like a variable

2) No overload for method \

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-06 11:52

    This

    List li = List();
    

    needs to be:

    List li = new List();
    

    and you need to create a Customer constructor which takes the 3 arguments you want to pass. The default Customer constructor takes no arguments.

提交回复
热议问题