Language: C#
IsNullOrEmpty Extending string
/// <summary> /// Extendendo string usando o proprio isnullorempty /// assim fica muito mais intuitivo /// </summary> /// <param name="txt"></param> /// <returns></returns> public static bool IsNullOrEmpty(this string txt) { return String.IsNullOrEmpty(txt); } /// <summary> /// Extendendo string usando o proprio isnullorempty /// </summary> /// <param name="txt"></param> /// <returns></returns> public static bool IsNotNullOrEmpty(this string txt) { return (!String.IsNullOrEmpty(txt)); }
Tags:
Description:
Extending string class i love do ".IsNullOrEmpty" or ".IsNotNullOrEmpty"
Report Abuse
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search

