Correcting duplicate names in generic array - follow up
Because we are dealing now with objects, we need to create a copy of each FileContent to achieve the same result like in your previous question.  

Instead of having var currentFile = file where file had been a string, we now use var currentFile = new FileContent() { Content = file.Content, Name = file.Name };.  

In addition, we are using the HashSet&lt;T&gt; only for look up and return an IEnumerable&lt;FileContent&gt; instead of an array.   

private IEnumerable&lt;FileContent&gt; ChangingDuplicateNames(FileContent[] files)
{
    var hashSet = new HashSet&lt;string&gt;(StringComparer.OrdinalIgnoreCase);
    foreach (var file in files)
    {
        var currentFile = new FileContent() { Content = file.Content, Name = file.Name };
        int counter = 0;
        while (!hashSet.Add(currentFile.Name))
        {
            currentFile.Name = CreateFileName(file.Name, ref counter);
        }
        yield return currentFile;
    }
} 


and call it like so  

FileContent[] result = ChangingDuplicateNames(files).ToArray();