Convert String To Upper Ignore Null

image_pdfimage_print

//http://validationframework.codeplex.kutayzorlu.com/
//License:  Microsoft Permissive License (Ms-PL) v1.1

using System;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml;

namespace ValidationFramework.Extensions
{
    /// <summary>
    /// String helper methods
    /// </summary>
  public static class StringExtensions
  {
        internal static string ToUpperIgnoreNull(this string value)
        {
            if (value != null)
            {
                value = value.ToUpper(CultureInfo.InvariantCulture);
            }
            return value;
        }
  }
}
This entry was posted in Data Types. Bookmark the permalink.