[NamesList] - Combine two collection using AddRange.

This commit is contained in:
Ivandro Ismael 2016-03-27 15:32:16 +01:00
parent 694376f154
commit 33f5155700

View File

@ -49,15 +49,9 @@ namespace Nikse.SubtitleEdit.Core.Dictionaries
public List<string> GetAllNames()
{
var list = new List<string>();
foreach (var name in _namesList)
{
list.Add(name);
}
foreach (var name in _namesMultiList)
{
list.Add(name);
}
var list = new List<string>(_namesList.Count + _namesMultiList.Count);
list.AddRange(_namesList);
list.AddRange(_namesMultiList);
return list;
}