Shortcut for string.Format.

image_pdfimage_print
   
 

//Microsoft Public License (Ms-PL)
//http://visualizer.codeplex.com/license

using System;
using System.Collections.Generic;

namespace Redwerb.BizArk.Core.StringExt
{
    /// <summary>
    /// Provides extension methods for strings.
    /// </summary>
    public static class StringExt
    {
        /// <summary>
        /// Shortcut for string.Format.
        /// </summary>
        /// <param name="str"></param>
        /// <param name="args"></param>
        /// <returns></returns>
        public static string Format(this string str, params object[] args)
        {
            if (str == null) return null;
            return string.Format(str, args);
        }
   }
}

   
     


This entry was posted in Data Types. Bookmark the permalink.