Click here to Skip to main content
15,902,492 members
Home / Discussions / C#
   

C#

 
GeneralRe: Changing the default WindowClassName of a .NET Form? Pin
Yuval Naveh10-Oct-06 23:32
Yuval Naveh10-Oct-06 23:32 
QuestionRemoting and dynamic port allocation Pin
SkyTom10-Oct-06 22:04
SkyTom10-Oct-06 22:04 
QuestionDeployment Question Pin
wasife10-Oct-06 21:34
wasife10-Oct-06 21:34 
QuestionSize of COM objects Pin
drabiger10-Oct-06 21:33
drabiger10-Oct-06 21:33 
QuestionAdding custom property pages to Outlook 2003 using C# <-- Question Pin
SquallNaruto10-Oct-06 21:15
SquallNaruto10-Oct-06 21:15 
QuestionAssign shortcutkeys to combobox values in gridview Pin
WillemM10-Oct-06 21:04
WillemM10-Oct-06 21:04 
Questionhow to declare 2 dimensional arraylists in C# Pin
Keshav V. Kamat10-Oct-06 21:04
Keshav V. Kamat10-Oct-06 21:04 
AnswerRe: how to declare 2 dimensional arraylists in C# Pin
WillemM10-Oct-06 21:09
WillemM10-Oct-06 21:09 
The best way to create that is to use the hashtable, although its a map and not a list you can still access the keys as if they were a list of values.

Hashtable table = new Hashtable();

To create a two dimensional arraylist you will have to write something like this:

ArrayList list1 = new ArrayList();

for(int x = 0; x < 10; x++) {
list1.Add(new ArrayList());
}

but this uses significant more memory and is not advisable if you only need the first lists index to access the second list. In that case you are better of with a hashtable that uses an Int32 value as key and ArrayList as value.

WM.

What about weapons of mass-construction?

GeneralRe: how to declare 2 dimensional arraylists in C# Pin
Keshav V. Kamat10-Oct-06 21:11
Keshav V. Kamat10-Oct-06 21:11 
AnswerRe: how to declare 2 dimensional arraylists in C# Pin
wheelerbarry10-Oct-06 22:39
wheelerbarry10-Oct-06 22:39 
AnswerRe: how to declare 2 dimensional arraylists in C# Pin
WillemM10-Oct-06 21:06
WillemM10-Oct-06 21:06 
GeneralRe: how to declare 2 dimensional arraylists in C# Pin
Keshav V. Kamat10-Oct-06 21:08
Keshav V. Kamat10-Oct-06 21:08 
GeneralRe: how to declare 2 dimensional arraylists in C# Pin
WillemM10-Oct-06 21:10
WillemM10-Oct-06 21:10 
Questionanimatiom control Pin
Parshant Verma10-Oct-06 21:01
Parshant Verma10-Oct-06 21:01 
AnswerRe: animatiom control Pin
Alper Camel11-Oct-06 4:32
Alper Camel11-Oct-06 4:32 
QuestionDate Time format in Grid view Pin
Shahzad.Aslam10-Oct-06 20:30
Shahzad.Aslam10-Oct-06 20:30 
QuestionFolder browse exception Pin
Parshant Verma10-Oct-06 19:24
Parshant Verma10-Oct-06 19:24 
AnswerRe: Folder browse exception Pin
quiteSmart10-Oct-06 20:53
quiteSmart10-Oct-06 20:53 
QuestionRe: Folder browse exception Pin
Parshant Verma10-Oct-06 21:04
Parshant Verma10-Oct-06 21:04 
QuestionshList View is not getting cleared Pin
Aslam Bari10-Oct-06 18:26
Aslam Bari10-Oct-06 18:26 
QuestionCreate events for windows User Control.Urgent!!! Pin
RenuKhot10-Oct-06 18:21
RenuKhot10-Oct-06 18:21 
AnswerRe: Create events for windows User Control.Urgent!!! Pin
Aslam Bari10-Oct-06 18:58
Aslam Bari10-Oct-06 18:58 
GeneralRe: Create events for windows User Control.Urgent!!! Pin
RenuKhot10-Oct-06 23:18
RenuKhot10-Oct-06 23:18 
Questionc# and xml Pin
moadbrkt10-Oct-06 16:37
moadbrkt10-Oct-06 16:37 
AnswerRe: c# and xml Pin
Andrei Ungureanu10-Oct-06 19:08
Andrei Ungureanu10-Oct-06 19:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.