using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 倒序
{
    class Program
    {
        public static string Get(string str)
        {   
            String[] s = str.Split(new char[] { ';' });
            List<string> list = new List<string>();
            foreach (string a in s)
            {
                if (!list.Contains(a))
                {
                    list.Add(a);
                }
            }
            return string.Join(";", list.ToArray());
        }

        static void Main(string[] args)
        {
            string str = "abcfdfd,adfd,dfdsf,adfd";
            Console.Write(Get(str));
            Console.ReadLine();
        }
    }
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-21
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-03-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2021-08-04
相关资源
相似解决方案