Click here to Skip to main content
15,885,366 members

Comments by kjain18 (Top 7 by date)

kjain18 16-Dec-11 3:35am View    
I'm the developer of the code.

As my sample code demonstrates, the size of the DataRow is fixed, and I access the cell element by the corresponding ColumnName. The row is added/updated to the table before it's passed to ProdessDR for processing.

Regards
kjain18 16-Dec-11 3:10am View    
@Abhinav, due to some practical constraints (cannot disclose them) I can only log information; I cannot step through the running code...
kjain18 16-Dec-11 1:11am View    
I guess you're referring to "NullPointerException" but I'm faced with the "IndexOutOfRangeException"...

Also, stepping through the code is not an option.

Regards
kjain18 23-Dec-10 23:01pm View    
Thanks Pete! You're right about both '1' and '2'.
kjain18 23-Dec-10 22:57pm View    
Thanks all for your responses! Apologies for not being v clear initially itself.

I'm trying to implement a generic producer-consumer queue (let's call it 'pcq'). I have a WinForm application which needs to handle (extract information and act on it) various types of user-defined class objects (say, for example, an instance of StudentData class which could have all the performance related information of the student for all the previous years and my application would be asked to draw a graph of the performance for the student). Please note that application may not be aware either of the request type (that's why task type is object), or of the kind or number of actions to be taken (that's why user of the application passes a multicast delegate to the application). Application, hence, essentially provides a 'pcq' for processing user-defined tasks in user-defined manner. The purpose of sharing a dictionary between the user and the application was for the application to dispatch the correct delegates for a given task object upon its processing in the pcq's consumer thread. The dictionary is populated with task-type and multicast delegates before initializing the pcq.

My application would want to do it in a serial manner for all the incoming requests (a request contains an instance of, say StudentData class, BUT can also contain an object of type EmployeeData class, for which the processing would of course be different), and on another thread than the main GUI thread (hence the choice of pcq).