From 7a854a6583803db4b16074a0e8376518eddfc09e Mon Sep 17 00:00:00 2001 From: Daniel Gyulai Date: Thu, 19 Nov 2020 17:39:43 +0100 Subject: [PATCH] Bugfix with empty except arrays --- CoviDok/BLL/PropertyCopier.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CoviDok/BLL/PropertyCopier.cs b/CoviDok/BLL/PropertyCopier.cs index 51020a7..d309141 100644 --- a/CoviDok/BLL/PropertyCopier.cs +++ b/CoviDok/BLL/PropertyCopier.cs @@ -10,7 +10,11 @@ namespace CoviDok.BLL { public static void Copy(T source, T dest, string[] except = null) { - List forbidden = new List(except); + List forbidden = new List(); + if (except != null) + { + forbidden.AddRange(except); + } PropertyInfo[] properties = source.GetType().GetProperties(); foreach (var property in properties) {