Clears the stringbuilder object - CSharp Language Basics

CSharp examples for Language Basics:StringBuilder

Description

Clears the stringbuilder object

Demo Code


using System.Text;
using System;/*from w  w  w  .j  av  a  2 s .co  m*/

public class Main{
        /// <summary>
        /// Clears the stringbuilder object
        /// </summary>
        /// <param name="sb">StringBuilder object</param>
        public static StringBuilder Clear(this StringBuilder sb)
        {
            Validation.IsNotNull(sb, "sb");

            return new StringBuilder();
        }
}

Related Tutorials