Solved

Searching the 2-D array

Posted on 2007-03-27
1
145 Views
Last Modified: 2013-11-26
Hi,

I have a 2-D array. First dimension has name of control and the second dimension has the associated value. Let us say first dimension has name of all text boxes and the second has its value. Now how do I seach value for a particular text box, for example, I want to know the value of say txtName?

I do not want to loop through the array as my array will be large and this approach will be time consuimg.

Regards,
MI
0
Comment
Question by:vj_mi
1 Comment
 
LVL 25

Accepted Solution

by:
dstanley9 earned 500 total points
ID: 18802900
The built-in search methods do not support multi-dimensional arrays.

If possible, I would not use an array, but use a Hashtable in .NET 1.1 or a Dictionary<string,???> in .NET 2.0 where ??? is the type of value you want to store.  There are much easier to search and manupulate than a 2-D array.

0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now