Solved

Fixed length string array?

Posted on 2006-11-05
2
221 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

867 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now