using System; using System.Collections.Generic; using System.Linq; using System.Text;namespace ConsoleApplication5 { class Program { static void Main(string[] args) { String[] arry =new String[]{"abcdef","ghijklmn"}; String str="abcd"; if (
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;namespace ConsoleApplication5
{
class Program
{
static void Main(string[] args)
{
String[] arry =new String[]{"abcdef","ghijklmn"};
String str="abcd";
if (arry.Contains(str))
{
Console.WriteLine("A");
}
else
{
Console.WriteLine("B");//B
}
}
}
}
【文章出处:日本大带宽服务器 http://www.558idc.com/jap.html 欢迎留下您的宝贵建议】