PC Review


Reply
Thread Tools Rate Thread

confused newbie: simple (?) assignment of string to array, plz help

 
 
K Ruck
Guest
Posts: n/a
 
      6th Nov 2003
or at least I think it should be simple.... here is a snippet:
===================
Public Class Form1
Friend r as int16
Friend i as int16
Friend ValueArray(20,50) as string ' (0 to 20, 0 to 50)

Sub LoadAllFiles
Dim FileString as String
FileString = ""

'then I do stuff to grab a string from a txt file

'I check to make sure I have a string and valid references first:
msgbox (i & " " & r & " " & FileString) 'which gives me a msgbox: 0 0
Textstring from my textfile

ValueArray(i,r) = FileString '<-- this is where it seems to bomb out.

end sub
===================

I'm still new to try/catch, so I welcome feedback on what else I need to do
to diagnose this issue. I also looked through all extensions (?) of the
ValueArray (such as .copy, .chars, etc) and didn't see anything that looked
useful. I'm used to old VBA where I can just set my array equal to whatever
I'm setting it too, which is the syntax I used above.

tia for any help or advice,
Keith




 
Reply With Quote
 
 
 
 
K Ruck
Guest
Posts: n/a
 
      6th Nov 2003
It took hours of trial and error, but I finally figured it out- I was using
the erase statement within my sub to make sure the array was cleared, but
apparently in dotnet that actually erases the array size and everything. Now
it works.


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Confused Newbie - Very Confused:( Wizard Microsoft Access Forms 0 20th Oct 2005 10:37 AM
Newbie: Is there simple way to find a string in a long string? Galaxia Microsoft C# .NET 1 19th Apr 2005 06:25 AM
newbie: nullterminated array's to string ? dtdev Microsoft C# .NET 1 9th Sep 2004 01:27 PM
Byte array to string and back - newbie question =?Utf-8?B?cG9wc292eUBydXNtZXguY29t?= Microsoft Dot NET Framework 2 5th Feb 2004 07:47 PM
Cannot create an object of type 'System.String[]' from its string representation 'String[] Array' for the 'Options' property. Hessam Microsoft C# .NET 0 8th Aug 2003 09:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:12 AM.