Use string.Format to handle strings that are empty or null 11 February, 2009 Roel van Lisdonk 0 Comments Console.WriteLine(string.Format("{0} [{1}]", "object1", null)); Result: object1 [] Tags: C# Leave a ReplyYour email address will not be published. Required fields are marked *Comment * Name * Email * Website Δ This site uses Akismet to reduce spam. Learn how your comment data is processed. Post navigation Previous: SSIS package configurationNext: GetFiles, sorted by Creation DateTime, filtered by include file mask and exclude file mask, including subfolders in C#