📜  c# 在数组中 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:50.052000             🧑  作者: Mango

代码示例1
using System.Linq; //Then you can use linq Contains() method

string[] printer = {"jupiter", "neptune", "pangea", "mercury", "sonic"};
if(printer.Contains("jupiter"))
{Console.WriteLine("'jupiter' is in the array");}