Solved

Fixed length string array?

Posted on 2006-11-05
2
223 Views
Last Modified: 2010-04-23
Hello Experts,

I have a fixed length string I would like to put into an array

so for example:

 Dim hello(0) As New VB6.FixedLengthString(15)
 Dim hello(1) As New VB6.FixedLengthString(30)
 Dim hello(2) As New VB6.FixedLengthString(19)

Each string in the array will differ in fixed length...

However visual basic doesn't allow arrays when using fixedlength strings.

Is there any simple way around this?

Thanks Experts.
0
Comment
Question by:DSLX
2 Comments
 
LVL 17

Accepted Solution

by:
ZeonFlash earned 95 total points
ID: 17878817
I'm not sure why you're using old school FixedLengthStrings (hopefully it's for intefacing with an old VB6 object!), but here's how you can do it in .NET:

        Dim hello(3) As VB6.FixedLengthString

        hello(0) = New VB6.FixedLengthString(15)
        hello(1) = New VB6.FixedLengthString(30)
        hello(2) = New VB6.FixedLengthString(19)
0
 

Author Comment

by:DSLX
ID: 17878893
That works, exactly what I was looking for thanks :)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB.net Facial recognition software (time and attendance) 6 60
VB.NET 1 28
Visual Studios 1 76
How to share My.Settings in multiple application instances ? 7 23
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question