Good point. Though, I still needed the padd functionality. 



Patrick Burrows
Well I woke up this morning With the cold water
--------------------
Now Playing: phish - billy breathes - 03 - waste (unnamed server)
--------------------



> -----Original Message-----
> From: Bill Schmidt [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, May 30, 2002 10:51 AM
> To: [EMAIL PROTECTED]
> Subject: Re: C# Equivs of VB Functions
> 
> 
> Patrick,
> 
> Its just as well that you did hit send, because PadRight, 
> PadLeft are not
> the 'correct' answer (even if they might work).  The correct 
> answer is to
> use one of the overloads of the string constructor.  That is, type
>     string MyVar = New string(
> and pick the appropriate constructor (i.e, the one that takes 
> a char and an
> int as parameters).
> 
> Since you're learning C# (as I am), I'll take the liberty of 
> saying "Use
> the appropriate constructor, dummy!"  Us former VB types have 
> to get used
> to the concept of using constructors whenever creating a new 
> object (both
> from a client perspective, and from an object design perspective).
> 
> Bill
> 
> On Thu, 30 May 2002 10:41:31 -0400, Patrick Burrows
> <[EMAIL PROTECTED]> wrote:
> 
> >Nevermind. Looks like PadRight or PadLeft will do what I want.
> >
> >(you always find the answer as soon as you hit send... it is an
> >unwritten rule of listservers).
> >
> >
> >Patrick Burrows
> >Found an old dog And he seems to like me
> >--------------------
> >Now Playing: phish - billy breathes - 03 - waste (unnamed server)
> >--------------------
> >
> >
> >
> >> -----Original Message-----
> >> From: Patrick Burrows
> >> Sent: Thursday, May 30, 2002 10:40 AM
> >> To: [EMAIL PROTECTED]
> >> Subject: C# Equivs of VB Functions
> >>
> >>
> >> Is there an equivalent in C# of the VB String() function? I want to
> >> create a line of 65 "-" characters (am formatting some text).
> >>
> >> In VB, I just do:
> >>         MyVar = String(65,"-")
> >>
> >> Am looking through the members of the String class and don't see
> >> anything.
> >>
> >> I mean, obviously, I can accomplish the same thing in
> >> probably a couple
> >> dozen different ways. Just am trying to learn the object 
> model as much
> >> as I am trying to get the project finished.
> >>
> >> Patrick Burrows
> >> With a horrid little pistol and a lariat
> >> --------------------
> >> Now Playing: 01 dolly dagger (unnamed server)
> >> --------------------
> >>
> >> You can read messages from the DOTNET archive, unsubscribe
> >> from DOTNET, or
> >> subscribe to other DevelopMentor lists at 
> http://discuss.develop.com.
> >>
> >
> >You can read messages from 
> the DOTNET archive, unsubscribe from DOTNET, or
> >subscribe to other DevelopMentor lists at http://discuss.develop.com.
> 
> You can read messages from the DOTNET archive, unsubscribe 
> from DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.
> 

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to