here is my code:
class Program
{
static void Main(string[] args)
{
string sentence = string.Empty;
sentence = Console.ReadLine();
string[] sent = sentence.Split(' ');
//to be sorted alphabetically
var x =
from k in sent
orderby k
select k;
foreach (string s in x)
{
Console.WriteLine(s.ToLower());
}
Console.ReadLine();
}
}
is there any method to find and remove duplicate words or I should make my own method?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…