Click here to Skip to main content
15,923,909 members
Home / Discussions / C#
   

C#

 
GeneralRe: DateTimePicker CustomFormat Problem Pin
half-life31-Mar-08 5:41
half-life31-Mar-08 5:41 
GeneralWeb Browser component related Query..... Pin
Aditya Baraya31-Mar-08 4:17
Aditya Baraya31-Mar-08 4:17 
GeneralRe: Web Browser component related Query..... Pin
led mike31-Mar-08 4:31
led mike31-Mar-08 4:31 
GeneralRe: Web Browser component related Query..... Pin
Aditya Baraya31-Mar-08 4:34
Aditya Baraya31-Mar-08 4:34 
GeneralRe: Web Browser component related Query..... Pin
led mike31-Mar-08 5:08
led mike31-Mar-08 5:08 
GeneralRe: Web Browser component related Query..... Pin
Aditya Baraya31-Mar-08 18:23
Aditya Baraya31-Mar-08 18:23 
GeneralRe: Web Browser component related Query..... Pin
led mike1-Apr-08 5:18
led mike1-Apr-08 5:18 
QuestionHow to access an object of an arraylist, from a hashtable? Pin
Ravi Mahavrathayajula31-Mar-08 4:08
Ravi Mahavrathayajula31-Mar-08 4:08 
I have declared a Hashtable.
The "Value" field of the hashtable refers to an ArrayList.
The Array List contains a list of objects.

Now how can I refer to a particular object in the arraylist referring to its respective "key" from the hashtable?

To make it clear I'm embedding the code here.

<br />
ArrayList errorlist = new ArrayList();<br />
Hashtable errorstable = new Hashtable();<br />
<br />
error = new Errorcodes(tokens[3].ToString(), tokens[4].ToString());<br />
errorlist.Add(error);<br />
errorstable.Add(tokens[2].ToString(), errorlist);<br />
<br />
//.......<br />
<br />
foreach (DictionaryEntry de in errorstable)<br />
{<br />
      if (de.Key.ToString() == fetchcodes[4].ToString())<br />
      {<br />
           string evalue = //<objectvalue>; <br />
           //Should retrive the object from arraylist corresponding to the value in hashtable. <br />
           SW.WriteLine("\t\t\t" + "public const int ");<br />
           break;<br />
      }<br />
}<br />
</objectvalue>

GeneralRe: How to access an object of an arraylist, from a hashtable? Pin
led mike31-Mar-08 4:28
led mike31-Mar-08 4:28 
GeneralRe: How to access an object of an arraylist, from a hashtable? Pin
Gareth H31-Mar-08 4:29
Gareth H31-Mar-08 4:29 
GeneralRe: How to access an object of an arraylist, from a hashtable? Pin
Ravi Mahavrathayajula31-Mar-08 4:44
Ravi Mahavrathayajula31-Mar-08 4:44 
GeneralRe: How to access an object of an arraylist, from a hashtable? Pin
led mike31-Mar-08 5:11
led mike31-Mar-08 5:11 
GeneralRe: How to access an object of an arraylist, from a hashtable? Pin
darkelv31-Mar-08 5:18
darkelv31-Mar-08 5:18 
GeneralRe: How to access an object of an arraylist, from a hashtable? Pin
Ravi Mahavrathayajula31-Mar-08 5:34
Ravi Mahavrathayajula31-Mar-08 5:34 
Generalcode snippet Pin
ellllllllie31-Mar-08 3:52
ellllllllie31-Mar-08 3:52 
GeneralRe: code snippet Pin
Colin Angus Mackay31-Mar-08 3:54
Colin Angus Mackay31-Mar-08 3:54 
GeneralRe: code snippet Pin
ellllllllie31-Mar-08 4:18
ellllllllie31-Mar-08 4:18 
GeneralRe: code snippet Pin
DavidNohejl31-Mar-08 5:04
DavidNohejl31-Mar-08 5:04 
GeneralRe: code snippet Pin
Gareth H31-Mar-08 4:22
Gareth H31-Mar-08 4:22 
GeneralRe: code snippet Pin
carbon_golem1-Apr-08 3:02
carbon_golem1-Apr-08 3:02 
QuestioncheckBox and datagrid Pin
Metik31-Mar-08 2:14
Metik31-Mar-08 2:14 
AnswerRe: checkBox and datagrid Pin
Rajesh R Subramanian31-Mar-08 2:53
professionalRajesh R Subramanian31-Mar-08 2:53 
Generalconstructors in VisualC#.NET Pin
shaheen1331-Mar-08 1:38
shaheen1331-Mar-08 1:38 
GeneralRe: constructors in VisualC#.NET Pin
J4amieC31-Mar-08 1:39
J4amieC31-Mar-08 1:39 
GeneralRe: constructors in VisualC#.NET Pin
Malcolm Smart31-Mar-08 1:41
Malcolm Smart31-Mar-08 1:41 

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.