using System;
using System.Windows.Forms;
namespace ExtensionMethods
{
///
/// Add extensions to
///
public static class TextBoxExtensions
{
///
/// Indicates whether the content of the specified is null or an string
///
///
/// . True: TextBox is empty. False: TextBox is not empty
public static bool IsEmpty(this TextBox txt)
{
return String.IsNullOrEmpty(txt.Text);
}
///
/// Indicates whether the content of the specified is not null and not an string
///
///
/// . True: TextBox is not empty. False: TextBox is empty
public static bool IsNotEmpty(this TextBox txt)
{
return !String.IsNullOrEmpty(txt.Text);
}
}
}