On Sat, Jun 18, 2005 at 11:03:09PM +0000, Paulinho wrote:
> Hi,
>
> I'm trying clean a StringBuilder....
>
> code:
>
> StringBuilder IsqlSelect = new StringBuilder();
>
> IsqlSelect.Append("Hi Monkeys");
> ...
> ...
> IsqlSelect.Equals(string.Empty); //I try this too: IsqlSelect.Equals("");
> IsqlSelect.Append("Bye Monkeys");
>
> Console.Write(IsqlSelect.ToString()); // I hope "Bye Monkeys", but "Hi
> MonkeysBye Monkeys" is the result
Equals is for testing equality. Easiest way is to set Length = 0.
IsqlSelect.Length = 0;
*poof*. the string goes away!
-pete
--
Peter Johanson
<[EMAIL PROTECTED]>
_______________________________________________
Gtk-sharp-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list