how to get dynamic control array position or its index position?
Answer / Diwakar Kumar
In VB.NET, you can get the index position of an element in a dynamic control array using the Array.IndexOf method. Here's an example:
```vbnet
Dim myArray As Object() = {1, 2, 3, 4, 5}
Dim index As Integer = myArray.GetUpperBound(0) ' Get the upper bound of the array
For i As Integer = 0 To index
If myArray(i) = 3 Then ' Check if the element is 3
Console.WriteLine("The position of 3 is " & i) ' Print the position
End If
Next
```
In this example, the position of `3` in the array is printed.
| Is This Answer Correct ? | 0 Yes | 0 No |
What does assert() method do In VB.NET
How to achieve Polymorphism in VB.Net?
What is the exact defination of object?
What is static member?
What are the difference between structure and class?
How do you validate Date by using which validation Control?
How to create Crystal Report in vb.net with coding
1 Answers A3Logics, Ascent, TCS,
hi dear ! thank u for replying to my question regarding adding third party software in vb.net .My next question is that i haven created Data base in SQL server 2000 for Library and has connected that with VB and VB.net separately but it only works on single computer and when i takes my software to another computer on same Network it does not work . Can any body help me what i do to solve. Regards!
How to store jpeg / gif / bmp image in database and how to retrieve them? The most stressful condition is database is distributed and stored images can be retrive from any computer in network and any one can store images from other computer!! plss help its urgent.......RAHUL RATHOD
What is the strong name in .net assembly?
List the types of authentication?
What are the differences between server-side and client-side code?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)