Solved

Fixed length string array?

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

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 …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

785 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