From 565afd35baab8b2846ebc80a6802a375b3fd876e Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 1 Sep 2019 17:46:47 +0300 Subject: Added bug reporting module to PPC !! --- .../Tango.Core/ExtensionMethods/ObjectExtensions.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/Tango.Core') diff --git a/Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs b/Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs index b5e430829..fe2c7ff9a 100644 --- a/Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs +++ b/Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs @@ -205,7 +205,18 @@ namespace Tango.Core.ExtensionMethods return GetPropertyValueByPath(obj.GetType().GetProperty(Split[0]).GetValue(obj, null), RemainingProperty); } else - return obj.GetType().GetProperty(propertyPath).GetValue(obj, null); + { + var prop = obj.GetType().GetProperty(propertyPath); + + if (prop != null) + { + return prop.GetValue(obj, null); + } + else + { + return obj.ToString(); + } + } } else { -- cgit v1.3.1