Click here to Skip to main content
15,897,371 members
Home / Discussions / C#
   

C#

 
GeneralRe: File to byte[ ] Pin
Dennis C. Dietrich3-Jan-05 7:40
Dennis C. Dietrich3-Jan-05 7:40 
QuestionHow to build patch Pin
Newbie_Toy3-Jan-05 3:34
Newbie_Toy3-Jan-05 3:34 
GeneralSaving Text Versions Pin
Darren Pruitt3-Jan-05 3:19
Darren Pruitt3-Jan-05 3:19 
GeneralRe: Saving Text Versions Pin
leppie3-Jan-05 5:55
leppie3-Jan-05 5:55 
GeneralInterfaces Pin
Bahadir Cambel3-Jan-05 0:05
Bahadir Cambel3-Jan-05 0:05 
GeneralRe: Interfaces Pin
jan larsen3-Jan-05 1:32
jan larsen3-Jan-05 1:32 
GeneralRe: Interfaces Pin
Bahadir Cambel3-Jan-05 8:59
Bahadir Cambel3-Jan-05 8:59 
GeneralRe: Interfaces Pin
DavidNohejl3-Jan-05 9:53
DavidNohejl3-Jan-05 9:53 
jan larsen wrote:

foreach (IDisposable disposableObject in listOfVariousClassInstances)
{
disposableObject.Dispose();
}


That won't work if at least one item from listOfVariousClassInstances will NOT implement IDisposable, right? I guess you know it, bt I think that rookie may not know... so I say it Smile | :)
foreach loop does type casting for every item in collection, so it will raise exception if some item from listOfVariousClassInstances collection can't by casted to IDisposable.

correct me if I am wrong... As I do Smile | :)

best regards,
David 'DNH' Nohejl

Never forget: "Stay kul and happy" (I.A.)
GeneralRe: Interfaces Pin
Bahadir Cambel3-Jan-05 11:52
Bahadir Cambel3-Jan-05 11:52 
GeneralRe: Interfaces Pin
DavidNohejl3-Jan-05 12:30
DavidNohejl3-Jan-05 12:30 
GeneralRe: Interfaces Pin
Bahadir Cambel3-Jan-05 14:27
Bahadir Cambel3-Jan-05 14:27 
GeneralRe: Interfaces Pin
DavidNohejl3-Jan-05 14:50
DavidNohejl3-Jan-05 14:50 
GeneralRe: Interfaces Pin
jan larsen3-Jan-05 20:17
jan larsen3-Jan-05 20:17 
GeneralRe: Interfaces Pin
DavidNohejl3-Jan-05 23:56
DavidNohejl3-Jan-05 23:56 
GeneralRe: Interfaces Pin
jan larsen4-Jan-05 0:48
jan larsen4-Jan-05 0:48 
GeneralRe: Interfaces Pin
DavidNohejl4-Jan-05 1:35
DavidNohejl4-Jan-05 1:35 
Generalabout the xmltextreader Pin
dhol2-Jan-05 19:29
dhol2-Jan-05 19:29 
GeneralRe: about the xmltextreader Pin
DavidNohejl3-Jan-05 9:35
DavidNohejl3-Jan-05 9:35 
GeneralRe: about the xmltextreader Pin
dhol3-Jan-05 16:36
dhol3-Jan-05 16:36 
GeneralRe: about the xmltextreader Pin
DavidNohejl4-Jan-05 1:30
DavidNohejl4-Jan-05 1:30 
GeneralRe: about the xmltextreader Pin
dhol4-Jan-05 17:45
dhol4-Jan-05 17:45 
GeneralRe: about the xmltextreader Pin
dhol4-Jan-05 17:59
dhol4-Jan-05 17:59 
General'Locking' entire folder Pin
kshet262-Jan-05 18:34
kshet262-Jan-05 18:34 
GeneralRe: 'Locking' entire folder Pin
Dave Kreskowiak3-Jan-05 6:15
mveDave Kreskowiak3-Jan-05 6:15 
GeneralRe: 'Locking' entire folder Pin
kshet263-Jan-05 7:31
kshet263-Jan-05 7:31 

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.