From d1e8b5dc2cfa93bf042773b4bf04a0f0bfc1f53d Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 8 Jan 2018 15:28:10 +0200 Subject: Added code comments for: CodeGeneration. Core. --- .../ExtensionMethods/StringExtensions.cs | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Software/Visual_Studio/Tango.Logging/ExtensionMethods/StringExtensions.cs (limited to 'Software/Visual_Studio/Tango.Logging/ExtensionMethods/StringExtensions.cs') diff --git a/Software/Visual_Studio/Tango.Logging/ExtensionMethods/StringExtensions.cs b/Software/Visual_Studio/Tango.Logging/ExtensionMethods/StringExtensions.cs new file mode 100644 index 000000000..f969adeda --- /dev/null +++ b/Software/Visual_Studio/Tango.Logging/ExtensionMethods/StringExtensions.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; + +namespace Tango.Logging +{ + /// + /// Contains extension methods. + /// + public static class StringExtensions + { + /// + /// Converts the object to string. If the object is null, will return null. + /// + /// The object. + /// + public static String ToStringSafe(this object obj) + { + return obj != null ? obj.ToString() : String.Empty; + } + } +} -- cgit v1.3.1