newtelligence.DasBlog.Web.Core.ValidTagCollection.ToString C# (CSharp) Method

ToString() public method

Returns a T:System.String that represents the current ValidTag.
public ToString ( ) : string
return string
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            foreach( ValidTag tag in this ){
                if( tag.IsAllowed ){
                    sb.Append( tag.ToString() + ", " );
                }
            }

            if( sb.Length > 0 ){
                // remove trailing ", "
                sb.Remove(sb.Length - 2, 2);
            }

            return sb.ToString();
        }