"SV" <> wrote in message
news:...
> 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

Advertisements

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.

On May 20, 6:28 pm, "Mark Rae [MVP]" <> wrote:
> "SV" <> wrote in message
>
> news:...
>
> > 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...?
>
> --
> Mark Rae
> ASP.NET MVPhttp://www.markrae.net

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.

On May 20, 6:28 pm, "Mark Rae [MVP]" <> wrote:
> "SV" <> wrote in message
>
> news:...
>
> > 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...?
>
> --
> Mark Rae
> ASP.NET MVPhttp://www.markrae.net

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!