更新时间:2023-11-17 13:58:10
错误信息非常清楚,只需更改Quote:using System;
to
使用系统;
使用 System.Collections.Generic;
using System;
namespace CoolStuffBro
{
class MainClass
{
public static void Main (string[] args)
{
string name;
int age;
string jade;
string boston;
string sydney;
var names = new List<string> {
"jade",
"boston",
"sydney"
};
int Result = Random.Next (names.Count);
names.RemoveAt (Result);
Console.WriteLine ("",names);
string[] selectableNames = new string[3] { jade, boston, sydney };
Console.WriteLine ("Welcome to the find your date app.");
Console.WriteLine ("To begin type your name below: ");
name = Console.ReadLine ();
Console.WriteLine ("Welcome {0}, please enter your age below:",name);
age = int.Parse (Console.ReadLine ());
Console.WriteLine ("Finding dates for {0}, age {1}.", name, age);
}
}
}
The error message is pretty clear, just change fromQuote:using System;
to
using System; using System.Collections.Generic;
错误CS0246:找不到类型或命名空间名称“List”。你是否缺少使用指令的`System.Collections.Generic'? (CS0246)(CoolStuffBro)
CS0246 类型或命名空间名称 'ErrorViewModel'找不到(您是否缺少 using 指令或程序集引用?)
CS0246:找不到类型或命名空间名称'clsAnnounceController'(您是否缺少using指令或程序集引用?)
错误CS0246:找不到类型或命名空间名称“WebserverRequest”(您是否缺少using指令或程序集引用?)
编译器错误消息:CS0246:找不到类型或名称空间名称'Type/Namespace'(是否缺少using指令或程序集引用?)