String join of distinct string I have a class like this one:

class EmailClass 
{
    public string MailAdresse { get; set; }
    public string MailAdresseCC { get; set; }
}


Through a JSON deserialization I obtain a List&lt;EmailClass&gt; and two other strings anotherMailAddress and justAnotherMailAddress.

I need to join all those adresses in one big string (the separator is ";"). For this purpose I wrote this code:

// this one is populated in another section but it 
// is put there for the sake of knowing the  variable name
List&lt;EmailClass&gt; splittedList

List&lt;string&gt; listOfAdresses = new List&lt;string&gt;();
string joinedAdresses = String.Empty;

listOfAdresses.AddRange(splittedList.Select(x =&gt; x.MailAdresse));
listOfAdresses.AddRange(splittedList.Select(x =&gt; x.MailAdresseCC));
listOfAdresses.Add(anotherMailAddress);
listOfAdresses.Add(justAnotherMailAdresses);

joinedAdresses = String.Join(";", listOfAdresses.Distinct().ToArray());


Now, is there a more polished way to obtain this result?
How much will Distinct() affect the performance on medium result set (~100.000 adresses)? I've read that the complexity of the function should be O(n), is this true?
Use a HashSet then it will only contain unique values, duplicates will be discarded when calling Add based upon the hashcode of the string. This should be far more efficient than calling Distinct.

List&lt;EmailClass&gt; splittedList

HashSet&lt;string&gt; listOfAdresses = new HashSet&lt;string&gt;();

// HashSet does not contain an AddRange method.
foreach (var emailClass in splittedList)
{
    listOfAdresses.Add(emailClass.MailAdresse);
    listOfAdresses.Add(emailClass.MailAdresseCC);
}

listOfAdresses.Add(anotherMailAddress);
listOfAdresses.Add(justAnotherMailAdresses);

string joinedAdresses = String.Join(";", listOfAdresses.ToArray());


--

Following the "feedback" from Almaz, here's a basic benchmark to show the performance difference (using unique values for each address):

private static void Main(string[] args)
{
    List&lt;EmailClass&gt; splittedList = Enumerable.Range(1, 100000).Select(i =&gt; new EmailClass
    {
        MailAdresse = i.ToString() + "@email.com",
        MailAdresseCC = i.ToString() + "cc@email.com"
    }).ToList();

    OriginalMethod(splittedList);
    HashSetMethod(splittedList);
    LinqMethod(splittedList);

    Console.ReadLine();
}

private static void OriginalMethod(List&lt;EmailClass&gt; splittedList)
{
    var sw = new Stopwatch();
    sw.Start();
    List&lt;string&gt; listOfAdresses = new List&lt;string&gt;();

    listOfAdresses.AddRange(splittedList.Select(x =&gt; x.MailAdresse));
    listOfAdresses.AddRange(splittedList.Select(x =&gt; x.MailAdresseCC));
    listOfAdresses.Add("someone@email.com");
    listOfAdresses.Add("someone.else@email.com");
    var joinedAdresses = String.Join(";", listOfAdresses.Distinct().ToArray());
    sw.Stop();
    Console.WriteLine("OriginalMethod");
    Console.WriteLine(sw.Elapsed);
}

private static void HashSetMethod(List&lt;EmailClass&gt; splittedList)
{
    var sw = new Stopwatch();
    sw.Start();
    HashSet&lt;string&gt; listOfAdresses = new HashSet&lt;string&gt;();

    foreach (var emailClass in splittedList)
    {
        listOfAdresses.Add(emailClass.MailAdresse);
        listOfAdresses.Add(emailClass.MailAdresseCC);
    }

    listOfAdresses.Add("someone@email.com");
    listOfAdresses.Add("someone.else@email.com");

    string joinedAdresses = String.Join(";", listOfAdresses.ToArray());
    sw.Stop();
    Console.WriteLine("HashSetMethod");
    Console.WriteLine(sw.Elapsed);
}

private static void LinqMethod(List&lt;EmailClass&gt; splittedList)
{
    var sw = new Stopwatch();
    sw.Start();
    var emails = splittedList.SelectMany(emailClass =&gt; new[] { emailClass.MailAdresse, emailClass.MailAdresseCC })
        .Concat(new[] { "someone@email.com", "someone.else@email.com" })
        .Distinct();

    var joinedAdresses = String.Join(";", emails);
    sw.Stop();
    Console.WriteLine("LinqMethod");
    Console.WriteLine(sw.Elapsed);
}


Results run in release mode without debugger attached:

OriginalMethod: 00:00:00.0789540
HashSetMethod:  00:00:00.0488568
LinqMethod:     00:00:00.0668056


Ramping up to 1,000,000 items

OriginalMethod: 00:00:00.8189667
HashSetMethod:  00:00:00.6891028
LinqMethod:     00:00:01.0157357


As you can see, the HashSet approach is substantially faster than the OP and significantly faster than the Linq approach.