Why not just chain off of StringBuilders ToString() method.

StringBuilder sb = new StringBuilder();


sb.Append("Today is a confusing day");
sb.ToString().Split()
sb.ToString().indexOf()
sb.ToString().Substring()


On Fri, Jun 24, 2011 at 6:00 AM, ankit m a cool dude with hot atitude <
jainismru...@gmail.com> wrote:

> Hi All,
>
> I am having a small problem regarding memory management in .NET.
>
> Suppose we declared and defined a string variable str="Today is a confusing
> day"
> Now we used this string in our code. After that we need to have some other
> data in the str variable. So before assigning it some other string like
> str="Now all the confusions are resolved" we need to dispose the memory held
> by previously assigned string as strings are immutable.
>
> Please don't tell me about StringBuilder as I can not use it becoz I have
> to do a lot of split,indexOf,lastindexof,Substring operations.
>
> Thanks in advance,
> Akki
>
> --
> You received this message because you are subscribed to the Google
> Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
> Web Services,.NET Remoting" group.
> To post to this group, send email to dotnetdevelopment@googlegroups.com
> To unsubscribe from this group, send email to
> dotnetdevelopment+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
> or visit the group website at http://megasolutions.net
>

-- 
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to dotnetdevelopment@googlegroups.com
To unsubscribe from this group, send email to
dotnetdevelopment+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net

Reply via email to