System.Text.Str ingBuilder ToString Method has two overloads one has no
parameter and the other one is the one that u are looking for.....
public System.String ToString ( System.Int32 startIndex , System.Int32
length )
--
Thanks,
Yunus Emre ALPÖZEN
BSc, MCAD.NET
"Dave" <Dave@discussio ns.microsoft.co m> wrote in message
news:ACE39913-0734-4068-96F5-A6204FFD03E4@mi crosoft.com...[color=blue]
> Substring returns a given string from a string. Is there an equivalent way
> to
> get a substring from a StringBuilder?[/color]
That's not quite what I needed. I need to do the following,
StringBuilder sb1= new StringBuilder(" 0123456789")
StringBuilder sb2= new StringBuilder(" old info")
sb2= sb1(0,4) //wrong
Giving sb2 equal to "0123"
Of course the line above marked wrong is wrong. So how would I do this? I
need the wrong line to clear out the old info and put in the first four
character from the other stringbuilder object.
"Yunus Emre ALPÖZEN [MCAD.NET]" wrote:
[color=blue]
> System.Text.Str ingBuilder ToString Method has two overloads one has no
> parameter and the other one is the one that u are looking for.....
>
> public System.String ToString ( System.Int32 startIndex , System.Int32
> length )
>
> --
>
> Thanks,
> Yunus Emre ALPÖZEN
> BSc, MCAD.NET
>
> "Dave" <Dave@discussio ns.microsoft.co m> wrote in message
> news:ACE39913-0734-4068-96F5-A6204FFD03E4@mi crosoft.com...[color=green]
> > Substring returns a given string from a string. Is there an equivalent way
> > to
> > get a substring from a StringBuilder?[/color]
>
>
>[/color]
"Dave" <Dave@discussio ns.microsoft.co m> wrote in message
news:893DE8FE-1A66-4A39-8A5A-EE5ADA56C4AC@mi crosoft.com...[color=blue]
> That's not quite what I needed. I need to do the following,
>
> StringBuilder sb1= new StringBuilder(" 0123456789")
> StringBuilder sb2= new StringBuilder(" old info")
>
> sb2= sb1(0,4) //wrong
>
> Giving sb2 equal to "0123"
>
> Of course the line above marked wrong is wrong. So how would I do this? I
> need the wrong line to clear out the old info and put in the first four
> character from the other stringbuilder object.[/color]
Comment