|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Fixed length stringsAre fixed length strings available in VB.Net?
In Quickbasic, fixed length strings could be declared thus: DIM str AS STRING * 10 'gives a string of length 10 Is there some equivalent command in VB.Net Express? -- This is soc.men, we know better. -- Michael Snyder Hello Lost,
http://www.google.com/search?hl=en&q=vb.net+fixed+length+strings -Boo Show quoteHide quote > Are fixed length strings available in VB.Net? > > In Quickbasic, fixed length strings could be declared thus: > > DIM str AS STRING * 10 'gives a string of length 10 > > Is there some equivalent command in VB.Net Express? > "Lost" <lostag***@mailinator.com> schrieb: Yes and no. Could you describe the scenario in more detail? Maybe there is > Are fixed length strings available in VB.Net? a better solution than a fixed-length string. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> Lost <lostag***@mailinator.com> wrote:
> Are fixed length strings available in VB.Net? There's no equivalent, but it's trivially easy to limit either the value> > In Quickbasic, fixed length strings could be declared thus: > > DIM str AS STRING * 10 'gives a string of length 10 > > Is there some equivalent command in VB.Net Express? assigned to a variable, or the result of "reading" from a variable. Show some code and someone will probaby have a more detailed suggestion. -- J. Moreno J. Moreno <pl***@newsreaders.com> wrote:
>Lost <lostag***@mailinator.com> wrote: That's what I've done as a workaround. > >> Are fixed length strings available in VB.Net? >> >> In Quickbasic, fixed length strings could be declared thus: >> >> DIM str AS STRING * 10 'gives a string of length 10 >> >> Is there some equivalent command in VB.Net Express? > >There's no equivalent, but it's trivially easy to limit either the value >assigned to a variable, or the result of "reading" from a variable. Thanks to everyone who answered. -- This is soc.men, we know better. -- Michael Snyder Hello Lost,
> Are fixed length strings available in VB.Net? There is.<VBFixedString(YourStringLength)> Taken from http://msdn2.microsoft.com/en-us/library/x14b6s77.aspx Structure Person Public ID As Integer Public MonthlySalary As Decimal Public LastReviewDate As Long <VBFixedString(15)> Public FirstName As String <VBFixedString(15)> Public LastName As String <VBFixedString(15)> Public Title As String <VBFixedString(150)> Public ReviewComments As String End Structure Best Regards, HKSHK HKSHK <hk***@gmx.net> wrote:
Show quoteHide quote >Hello Lost, Thank you.> >> Are fixed length strings available in VB.Net? > >There is. > ><VBFixedString(YourStringLength)> > >Taken from http://msdn2.microsoft.com/en-us/library/x14b6s77.aspx > > >Structure Person > Public ID As Integer > Public MonthlySalary As Decimal > Public LastReviewDate As Long > <VBFixedString(15)> Public FirstName As String > <VBFixedString(15)> Public LastName As String > <VBFixedString(15)> Public Title As String > <VBFixedString(150)> Public ReviewComments As String >End Structure -- This is soc.men, we know better. -- Michael Snyder
VoIP Dialer
Debug in .Net 2005 Invoking Class from a variable string in VB 2005...! WaitCursor and mouse locked in QueryContinueDrag best way to calculate transfer rate? Checklist box code help needed Get paid to post in forums.. Databinding a check list box how to pass variable from one event to the other? Get paid to post in forums.. |
|||||||||||||||||||||||