错误CS1729:类型`System.Collections.Generic.List <string>'不包含带有'5'参数的构造函数

som*_*ing 0 c# constructor compiler-errors list

我正在学习C和C#,这个问题适用于C#.这个问题是书中的代码,代码不能编译,错误是:错误CS1729:类型System.Collections.Generic.List<string>' does not contain a constructor that takes5'参数.

这是代码:

    public static void Main (string[] args)
    {
        List<string> names = new List<string>("Christa ",
                                          "  Sarah",
                                          "Jonathan",
                                          "Sam",
                                          " Schmekowitz");
Run Code Online (Sandbox Code Playgroud)

mus*_*der 6

改变(){}.

List<string> names = new List<string>{"Christa ",
                                      "  Sarah",
                                      "Jonathan",
                                      "Sam",
                                      " Schmekowitz"};
Run Code Online (Sandbox Code Playgroud)