string StrA = "ABCDE";
            
string StrB = "AE";
            
char[] ArryA = StrA.ToCharArray();
            
char[] ArryB = StrB.ToCharArray();
            
int number = 0;
            
for (int j = 0; j < ArryA.Length; j++)
            {
                
for (int i = 0; i < ArryB.Length; i++)
                {
                    
if (ArryA[j].Equals(ArryB[i]))
                    {
                        number
++;
                    }
                }
            }
            
if (number == StrB.Length)
            {
                Console.WriteLine(
"true");
            }
            
else
            {
                Console.WriteLine(
"false");
            }
            Console.ReadKey();

               

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-22
猜你喜欢
  • 2022-02-08
  • 2021-11-21
  • 2021-11-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案