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

C#

 
GeneralAnti-alians Metafile Pin
Werdna14-Jun-04 11:04
Werdna14-Jun-04 11:04 
GeneralRe: Anti-alians Metafile Pin
Alexandre GRANVAUD15-Feb-10 1:59
Alexandre GRANVAUD15-Feb-10 1:59 
GeneralExact strings Pin
Chris Korzeniowski14-Jun-04 9:57
Chris Korzeniowski14-Jun-04 9:57 
GeneralRe: Exact strings Pin
Steven Campbell14-Jun-04 10:12
Steven Campbell14-Jun-04 10:12 
GeneralRe: Exact strings Pin
Chris Korzeniowski14-Jun-04 11:15
Chris Korzeniowski14-Jun-04 11:15 
GeneralRe: Exact strings Pin
Heath Stewart14-Jun-04 11:28
protectorHeath Stewart14-Jun-04 11:28 
GeneralWindows Service App Pin
japanreddy14-Jun-04 9:55
japanreddy14-Jun-04 9:55 
GeneralRe: Windows Service App Pin
Heath Stewart14-Jun-04 10:16
protectorHeath Stewart14-Jun-04 10:16 
Make sure you're cleaning up code. If you use any IDisposable implementations (ADO.NET connections and commands are a good example), make sure you call Dispose on them when finished. It's a good idea to using a using block to make sure resources are released:
using (SqlConnection conn = new SqlConnection(...))
{
  // More code; now even if an exception occurs, the connection is disposed
  // and managed and unmanaged resources - most important - are released
  // immediately.
}
It's also a good idea to instrument your service (using the Event Viewer, WMI events, etc.) so that you know what's going on. Obviously this would be a hard problem to debug (given the amount of time before things start going haywire), so instrumenting your app and responding to events will let you know when a problem starts.

Read some of the exception management and instrumentation blocks in the MSDN Patterns and Practices[^] section.

 

Microsoft MVP, Visual C#
My Articles
Generalneed help on adding C++ project Pin
skinnyreptile14-Jun-04 9:37
skinnyreptile14-Jun-04 9:37 
GeneralRe: need help on adding C++ project Pin
japanreddy14-Jun-04 9:59
japanreddy14-Jun-04 9:59 
GeneralRe: need help on adding C++ project Pin
Heath Stewart14-Jun-04 10:12
protectorHeath Stewart14-Jun-04 10:12 
QuestionUXTHEME - Impossible? Pin
reflex@codeproject14-Jun-04 9:28
reflex@codeproject14-Jun-04 9:28 
GeneralAdd Reference Dialog control Pin
Jeremy Kimball14-Jun-04 8:56
Jeremy Kimball14-Jun-04 8:56 
GeneralRe: Add Reference Dialog control Pin
LongRange.Shooter14-Jun-04 9:15
LongRange.Shooter14-Jun-04 9:15 
GeneralRe: Add Reference Dialog control Pin
Jeremy Kimball14-Jun-04 10:19
Jeremy Kimball14-Jun-04 10:19 
GeneralRe: Add Reference Dialog control Pin
Heath Stewart14-Jun-04 9:19
protectorHeath Stewart14-Jun-04 9:19 
GeneralRe: Add Reference Dialog control Pin
Dmitri Nеstеruk6-Jan-10 2:50
Dmitri Nеstеruk6-Jan-10 2:50 
GeneralRe: Add Reference Dialog control Pin
ian mariano14-Jun-04 9:29
ian mariano14-Jun-04 9:29 
GeneralRe: Add Reference Dialog control Pin
Jeremy Kimball14-Jun-04 10:21
Jeremy Kimball14-Jun-04 10:21 
GeneralClosing all mdichildren forms Pin
Dylan van Heerden14-Jun-04 8:33
Dylan van Heerden14-Jun-04 8:33 
GeneralRe: Closing all mdichildren forms Pin
Heath Stewart14-Jun-04 8:52
protectorHeath Stewart14-Jun-04 8:52 
GeneralRe: Closing all mdichildren forms Pin
Dylan van Heerden14-Jun-04 9:23
Dylan van Heerden14-Jun-04 9:23 
GeneralRe: Closing all mdichildren forms Pin
Heath Stewart14-Jun-04 9:25
protectorHeath Stewart14-Jun-04 9:25 
GeneralRe: Closing all mdichildren forms Pin
Dylan van Heerden14-Jun-04 9:39
Dylan van Heerden14-Jun-04 9:39 
GeneralRe: Closing all mdichildren forms Pin
LongRange.Shooter14-Jun-04 10:12
LongRange.Shooter14-Jun-04 10:12 

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.