Click here to Skip to main content
15,889,479 members
Home / Discussions / C#
   

C#

 
GeneralRe: Returning a collection class Pin
Andrew Bromfield15-Jul-03 6:22
Andrew Bromfield15-Jul-03 6:22 
GeneralRe: Returning a collection class Pin
Frank Olorin Rizzi15-Jul-03 6:28
Frank Olorin Rizzi15-Jul-03 6:28 
GeneralRe: Returning a collection class Pin
Andrew Bromfield15-Jul-03 6:50
Andrew Bromfield15-Jul-03 6:50 
GeneralRe: Returning a collection class Pin
Frank Olorin Rizzi15-Jul-03 7:18
Frank Olorin Rizzi15-Jul-03 7:18 
GeneralRe: Returning a collection class Pin
Andrew Bromfield15-Jul-03 8:06
Andrew Bromfield15-Jul-03 8:06 
GeneralRe: Returning a collection class Pin
Frank Olorin Rizzi15-Jul-03 12:19
Frank Olorin Rizzi15-Jul-03 12:19 
GeneralRe: Returning a collection class Pin
Andrew Bromfield16-Jul-03 4:13
Andrew Bromfield16-Jul-03 4:13 
GeneralRe: Returning a collection class Pin
Frank Olorin Rizzi16-Jul-03 4:49
Frank Olorin Rizzi16-Jul-03 4:49 
RS2003 wrote:
I found the error by implementing a try, catch block. I caught the error and displayed the details in a messagebox. The details pointed me directly to the problem.

I'm guessing that I should change Object to IndividualCustomer in all the above method signatures, does this sound correct?


Andrew,
glad to hear you found the problem !

As far as using try and catches, my personal experience is that they are a *great tool*, especially during development. While coding (especially in .NET since I rely upon so many .NET classes), I found that my instinct is now to "first of all wrap everything that might throw an exception in a try/catch", and moreover, I try to have a different catch for every different thing that might throw an exception (so that I can quickly find out where the problem is). This might sound an overkill, but a) the VisualStudio documentation (with the Dynamic help) helps a lot in checking what exception (if any) might be thrown by the various .NET classes, and b) I admit I am not that throughfull... There are cases where I know I will never hit a specific error condition because of the way my code is structured, so in some cases I skip the try/catch...

In any case,
as far as changing Object to IndividualCustomer, it sounds like a good idea, especially if this collection should and will always contain only IndividualCustomer objects.

Hope you'll solve this out now,
Frank
GeneralRe: Returning a collection class Pin
Andrew Bromfield16-Jul-03 10:36
Andrew Bromfield16-Jul-03 10:36 
GeneralDrawing on Desktop Pin
Juergen15-Jul-03 3:48
Juergen15-Jul-03 3:48 
GeneralRe: Drawing on Desktop Pin
jtmtv1816-Jul-03 16:50
jtmtv1816-Jul-03 16:50 
GeneralRe: Drawing on Desktop Pin
Juergen16-Jul-03 22:08
Juergen16-Jul-03 22:08 
GeneralRe: Drawing on Desktop Pin
jtmtv1816-Jul-03 22:34
jtmtv1816-Jul-03 22:34 
GeneralRe: Drawing on Desktop Pin
Juergen16-Jul-03 22:47
Juergen16-Jul-03 22:47 
GeneralRe: Drawing on Desktop Pin
jtmtv1816-Jul-03 23:04
jtmtv1816-Jul-03 23:04 
GeneralSerialization in C# Pin
Stephane David14-Jul-03 22:38
Stephane David14-Jul-03 22:38 
GeneralRe: Serialization in C# Pin
Nathan Blomquist15-Jul-03 3:57
Nathan Blomquist15-Jul-03 3:57 
GeneralRe: Serialization in C# Pin
Stephane David15-Jul-03 4:33
Stephane David15-Jul-03 4:33 
GeneralRe: Serialization in C# Pin
Nathan Blomquist15-Jul-03 9:55
Nathan Blomquist15-Jul-03 9:55 
GeneralRe: Serialization in C# Pin
Anonymous16-Jul-03 6:03
Anonymous16-Jul-03 6:03 
GeneralMSMQ Question Pin
ripsi14-Jul-03 19:55
ripsi14-Jul-03 19:55 
Generalhelp me, how to autoscroll in richtextbox Pin
KETUINHA14-Jul-03 17:31
KETUINHA14-Jul-03 17:31 
GeneralRe: help me, how to autoscroll in richtextbox Pin
J. Dunlap14-Jul-03 19:06
J. Dunlap14-Jul-03 19:06 
GeneralRe: help me, how to autoscroll in richtextbox Pin
KETUINHA14-Jul-03 20:49
KETUINHA14-Jul-03 20:49 
GeneralRe: help me, how to autoscroll in richtextbox Pin
J. Dunlap14-Jul-03 21:05
J. Dunlap14-Jul-03 21:05 

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.