Console.WriteLine(string.Format("{0} [{1}]", "object1", null));

Result:

object1 []

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.