-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
Here is a piece of code to recreate the bug, I hope.
using System.Collections.Generic;
using System.Linq;
using Force.DeepCloner;
namespace DeepClonerBug
{
internal class Program
{
static void Main(string[] args)
{
var org = new Dictionary<Location, Location[]>
{
{ new Location { Name = "A" }, new[] { new Location { Name = "1" } } }
};
org[org.Keys.First()].ToString();
var clone = org.DeepClone();
// throws System.Collections.Generic.KeyNotFoundException: 'The given key was not present in the dictionary.'
clone[clone.Keys.First()].ToString();
}
}
public class Location
{
public string Name { get; set; }
}
}
Metadata
Metadata
Assignees
Labels
No labels