Click here to Skip to main content
15,888,454 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to auto refresh listbox values Pin
CodyGen15-Jan-06 4:15
CodyGen15-Jan-06 4:15 
GeneralRe: how to auto refresh listbox values Pin
batmanAgen15-Jan-06 4:22
batmanAgen15-Jan-06 4:22 
GeneralRe: how to auto refresh listbox values Pin
Ravi Bhavnani15-Jan-06 7:39
professionalRavi Bhavnani15-Jan-06 7:39 
Questionimages...JPEG or BITMAP Pin
sa maq14-Jan-06 23:00
sa maq14-Jan-06 23:00 
AnswerRe: images...JPEG or BITMAP Pin
Guffa14-Jan-06 23:20
Guffa14-Jan-06 23:20 
Questionc# program using a barcode scanner Pin
steve_rm14-Jan-06 20:18
steve_rm14-Jan-06 20:18 
AnswerRe: c# program using a barcode scanner Pin
Robert Rohde14-Jan-06 21:27
Robert Rohde14-Jan-06 21:27 
AnswerRe: c# program using a barcode scanner Pin
cjengler15-Jan-06 3:19
cjengler15-Jan-06 3:19 
AnswerRe: c# program using a barcode scanner Pin
Dave Kreskowiak15-Jan-06 4:16
mveDave Kreskowiak15-Jan-06 4:16 
GeneralRe: c# program using a barcode scanner Pin
steve_rm15-Jan-06 5:56
steve_rm15-Jan-06 5:56 
QuestionRandom number Pin
hung_ngole14-Jan-06 18:02
hung_ngole14-Jan-06 18:02 
AnswerRe: Random number Pin
Joshua Quick14-Jan-06 18:21
Joshua Quick14-Jan-06 18:21 
AnswerRe: Random number Pin
DigitalKing14-Jan-06 20:27
DigitalKing14-Jan-06 20:27 
GeneralRe: Random number Pin
Joshua Quick14-Jan-06 20:59
Joshua Quick14-Jan-06 20:59 
GeneralRe: Random number Pin
Colin Angus Mackay15-Jan-06 23:58
Colin Angus Mackay15-Jan-06 23:58 
QuestionHelp regarding window form in a window Pin
edel_ong14-Jan-06 17:46
edel_ong14-Jan-06 17:46 
AnswerRe: Help regarding window form in a window Pin
Joshua Quick14-Jan-06 18:30
Joshua Quick14-Jan-06 18:30 
QuestionC# casting problem object to string[] Pin
plsaiuser14-Jan-06 15:34
plsaiuser14-Jan-06 15:34 
AnswerRe: C# casting problem object to string[] Pin
Joshua Quick14-Jan-06 18:15
Joshua Quick14-Jan-06 18:15 
I see two issues here.

1) Your GetRowsList() method's return type is Object, but it actually returns an ArrayList. You lose type safety because of this. It would be better to make the return type more explicit such as ArrayList or at least ICollection.

2) You're casting the returned ArrayList into a string array, which of course it is not.


Here's a solution. Why not not make the return type of GetRowsList() a string[]? You can then convert the ArrayList to a string array and return that instead. Then you can remove the the cast done in the other function.

protected string[] GetRowsList(ref SqlDataReader oReader, long nStart, long nRows)
{
   ArrayList vaResultSet = new ArrayList();
   // Your code goes here...
   return (string[])vaResultSet.ToArray(typeof(string));
}

Questionimage 2 mpeg-2 Pin
Kin Tutnik14-Jan-06 14:11
Kin Tutnik14-Jan-06 14:11 
AnswerRe: image 2 mpeg-2 Pin
Sasuko14-Jan-06 14:33
Sasuko14-Jan-06 14:33 
Questionhow do I implement scrolling? PART 2 Pin
Sasuko14-Jan-06 13:46
Sasuko14-Jan-06 13:46 
AnswerRe: how do I implement scrolling? PART 2 Pin
Dave Kreskowiak14-Jan-06 16:10
mveDave Kreskowiak14-Jan-06 16:10 
AnswerRe: how do I implement scrolling? PART 2 Pin
Robert Rohde14-Jan-06 21:30
Robert Rohde14-Jan-06 21:30 
GeneralRe: how do I implement scrolling? PART 2 Pin
Sasuko15-Jan-06 0:41
Sasuko15-Jan-06 0: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.