Monday, April 2, 2012

C#(Method Remove Unnecessory Spaces)


public static string getString(string text)

{
    try
    {
        return Regex.Replace(text, @"\s+", " ").Trim();
    }
    catch (Exception ae)
    {
        return text;
    }
}

//Note: This Method Will Remove Unnecessory Spaces From The Data

No comments:

Post a Comment