Hi there,
I am using ASP.Net 2.0 with VB.Net.
I want to define variables. For example I want to create variable of
type TableRow and while defining I don't know how many rows i needed.
So what i want to do in my code:
For i As Integer = 0 To dt.Tables(0).Rows.Count - 1
dim tr_i as New TableRow
' other code.....
Next i
But it will define variable as tr_i...but i want tr_0,
tr_1,tr_2,.........
Is it possible?
Thanks,
SV
Eliyahu Goldin - 20 May 2008 09:26 GMT
It is possible that you are not exactly on the right track. What do you want
to achieve?

Signature
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
> Hi there,
>
[quoted text clipped - 19 lines]
>
> SV
Patrice - 20 May 2008 09:44 GMT
This is called an Array. I would suggest to read at least once the language
specification so that you have an idea of what you have at your disposal...
You may want also to explain what you are trying to do (This is a datarow,
not a tablerow, you can browse each row using for each. You already have
this array using dt.Tables(0).Rows(i) etc....)
--
Patrice
"SV" <swetavyas@gmail.com> a écrit dans le message de groupe de discussion :
894d04a4-258c-47e4-8503-817e0bc5e4c6@y18g2000pre.googlegroups.com...
> Hi there,
>
[quoted text clipped - 19 lines]
>
> SV
Mark Rae [MVP] - 20 May 2008 11:28 GMT
> Is it possible?
As others have mentioned, dynamic variables are possible in .NET but are
generally considered to be poor programming practice.
There will almost certainly be much more efficient methods - can you explain
a bit more about what you're trying to do...?

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
SV - 21 May 2008 05:15 GMT
Thanks all for your replies.
I think I was not able to explain you very well. But I tried to do the
things using arrays but didn’t get exactly what I want.
Anyways, I have solved the problem.
I really appreciate your precious replies.
Thanks.
> > Is it possible?
>
[quoted text clipped - 7 lines]
> Mark Rae
> ASP.NET MVPhttp://www.markrae.net
Juan T. Llibre - 21 May 2008 11:53 GMT
re:
!> Anyways, I have solved the problem
It could help others if you posted the solution you arrived at.
Sharing information like that is the very purpose of these newsgroups.
Can you ?
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
Thanks all for your replies.
I think I was not able to explain you very well. But I tried to do the
things using arrays but didn’t get exactly what I want.
Anyways, I have solved the problem.
I really appreciate your precious replies.
Thanks.
> "SV" <swetav...@gmail.com> wrote in message
>
[quoted text clipped - 11 lines]
> Mark Rae
> ASP.NET MVPhttp://www.markrae.net