|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Simple: how to add speaces to a stringHello All:
I have a simple question: how do I concatenate spaces to a string? Say I have "John Doe" as my string and I want "John Doe " with 15 spaces following his name. How do I do this? In old VB6, I would use the Space function. What is available in .NET?. I am trying to avoid using carry over functions, since I want to learn the framework as well as possible. TIA, -- Joe Take a look at PadLeft, PadRight
example: dim x as string x = "test" x.padleft(15," ") Show quoteHide quote "Joe" <J**@discussions.microsoft.com> wrote in message news:89580253-C2CA-4E57-926A-BB538A5F586B@microsoft.com... > Hello All: > > I have a simple question: how do I concatenate spaces to a string? Say I > have "John Doe" as my string and I want "John Doe " with 15 > spaces following his name. How do I do this? > > In old VB6, I would use the Space function. What is available in .NET?. > I > am trying to avoid using carry over functions, since I want to learn the > framework as well as possible. > > TIA, > -- > Joe Thanks.
-- Show quoteHide quoteJoe "AMDRIT" wrote: > Take a look at PadLeft, PadRight > > example: > > dim x as string > x = "test" > x.padleft(15," ") > > > > > > "Joe" <J**@discussions.microsoft.com> wrote in message > news:89580253-C2CA-4E57-926A-BB538A5F586B@microsoft.com... > > Hello All: > > > > I have a simple question: how do I concatenate spaces to a string? Say I > > have "John Doe" as my string and I want "John Doe " with 15 > > spaces following his name. How do I do this? > > > > In old VB6, I would use the Space function. What is available in .NET?. > > I > > am trying to avoid using carry over functions, since I want to learn the > > framework as well as possible. > > > > TIA, > > -- > > Joe > > >
Dynamic Controls - referencing
running application using vb.net Treeview drives me crazy! Data Types and structure Memory Usage? Different Approaches to Saving settings: Which is better? How to load hierarchical Db data in treeview?? Deleting configurations Windows XP Style Screen resolution w/ 2 monitors Form Shake |
|||||||||||||||||||||||