ObjectCloner icon indicating copy to clipboard operation
ObjectCloner copied to clipboard

Broken ObjectCloner.ObjectCloner.DeepClone(new double?[2,1])

Open ryanshrott opened this issue 2 years ago • 0 comments

Getting this exception when trying to deep clone a double?[3760,2]

This works:

  •   ObjectCloner.ObjectCloner.DeepClone(new double[2,1])	{double[2, 1]}	double[,]
    

But this breaks! with an exception: ObjectCloner.ObjectCloner.DeepClone(new double?[2,1])

Any idea how to fix it?

System.ArgumentException HResult=0x80070057 Message=Argument must be single dimensional array type Source=System.Core StackTrace: at System.Linq.Expressions.Expression.ArrayLength(Expression array) at ObjectCloner.Internal.DeepCloneExpressionBuilder.CreateArrayCloneExpression() at ObjectCloner.Internal.DeepCloneExpressionBuilder.Build() at ObjectCloner.Internal.DeepCloneInternal.<>c__DisplayClass1_0.<GetDeepCloner>b__0(Type t) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory) at ObjectCloner.ObjectCloner.DeepClone[T](T original) at Internal.ValuationCollection.<>c__DisplayClass8_0.<CalculateValuations>b__0(Int32 j) in

ryanshrott avatar Jul 12 '23 11:07 ryanshrott