Re: Array mixed with integers and strings?



I tried this too jeff when i first started in vb.net

something like
Array := { "Hello", 2 }

It cant be done easily...

so the solution I used, is I created a Class and the created 2 properties of
it.
1 a string and the other a numeric
Then I arrayified the Class...and worked like a charm.

Another solution I think will work is to create a variable that is a
datagrid, and save the data in there like data lines.

Miro

"Jeff" <none@xxxxxxxxxxxx> wrote in message
news:464da17c$0$16403$88260bb3@xxxxxxxxxxxxxxxxxxxx

...still new to vb.net 2005

I understand the concept of arrays, and have used them in other languages,
but was hoping that someone could get me started with something.

I have a fairly long list of values that start in textboxes and listboxes
that are both integers and strings. I need to store them in an array to
pass to subs and stored procedures used in a database. Can I mix the
integers and strings (both of varying lengths) in the same array? If so,
could someone provide a simple example that I could build upon or point me
in the right direction?

Thanks

Jeff


--
Posted via a free Usenet account from http://www.teranews.com



.



Relevant Pages

  • Re: K&R2 Secition 5.9 - major blunders
    ... Each element of b doesn't point to a 20 element array of int. ... This mistake is crucial because ... my explanation is really the qualities of something else: ... > The use of the array of pointers is to store the strings. ...
    (comp.lang.c)
  • Re: K&R2 Secition 5.9 - major blunders
    ... Each element of b doesn't point to a 20 element array of int. ... This mistake is crucial because ... my explanation is really the qualities of something else: ... > The use of the array of pointers is to store the strings. ...
    (comp.lang.c)
  • Re: Returning array of strings through callback from unmanaged to
    ... Is the array of strings a jagged array or fixed length array? ... It is imperative that I am able to return the array of strings from the ... I have control over how many strings I want the unmanaged code to return ... What I want to accomplish is to pass a callback function to unmanaged ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: attempting to return values from array from w/in a function
    ... What I get is an array w/ only the most recent array entry. ... I am new to PHP & do not have formal scripting ... you end up comparing strings, but the test you mean probably is simply: ... case 1: {codeblock} ...
    (comp.lang.php)
  • Re: Concatenate integer to string
    ... F2003 adds allocatable-length strings. ... Since a character with allocatable ... It seems that the deferred length has a special proparty, different from a deferred array size, in that the standard assignment operator will allocate the length. ...
    (comp.lang.fortran)