diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-09-01 17:46:47 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-09-01 17:46:47 +0300 |
| commit | 565afd35baab8b2846ebc80a6802a375b3fd876e (patch) | |
| tree | fa478fa30e6b4bed5b629ef307d35e743bacf0d5 /Software/Visual_Studio/Tango.Core/ExtensionMethods | |
| parent | b3ffc4c7ba0b7f9bb34c878ae186d380ac41a07f (diff) | |
| download | Tango-565afd35baab8b2846ebc80a6802a375b3fd876e.tar.gz Tango-565afd35baab8b2846ebc80a6802a375b3fd876e.zip | |
Added bug reporting module to PPC !!
Diffstat (limited to 'Software/Visual_Studio/Tango.Core/ExtensionMethods')
| -rw-r--r-- | Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs | 13 |
1 files changed, 12 insertions, 1 deletions
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 { |
