Click here to Skip to main content
15,913,854 members
Home / Discussions / C#
   

C#

 
AnswerRe: New Project Dialog Pin
Mircea Puiu8-Jan-07 3:29
Mircea Puiu8-Jan-07 3:29 
QuestionElegant way to develop a chronometer Pin
AlexB478-Jan-07 1:47
AlexB478-Jan-07 1:47 
AnswerRe: Elegant way to develop a chronometer Pin
Ravi Bhavnani8-Jan-07 2:48
professionalRavi Bhavnani8-Jan-07 2:48 
GeneralRe: Elegant way to develop a chronometer Pin
AlexB478-Jan-07 2:54
AlexB478-Jan-07 2:54 
QuestionHow to dispose a class Pin
Yustme8-Jan-07 0:14
Yustme8-Jan-07 0:14 
AnswerRe: How to dispose a class Pin
Martin#8-Jan-07 0:23
Martin#8-Jan-07 0:23 
AnswerRe: How to dispose a class Pin
Pete O'Hanlon8-Jan-07 0:30
mvePete O'Hanlon8-Jan-07 0:30 
GeneralRe: How to dispose a class Pin
Yustme8-Jan-07 0:48
Yustme8-Jan-07 0:48 
Hi guys,

I just implemented these two methods:

public void Dispose()
{
Dispose(true);
// This object will be cleaned up by the Dispose method.
// Therefore, you should call GC.SupressFinalize to
// take this object off the finalization queue
// and prevent finalization code for this object
// from executing a second time.
GC.SuppressFinalize(this);
}

private void Dispose(bool disposing)
{
// Check to see if Dispose has already been called.
if (!this.disposed)
{
// If disposing equals true, dispose all managed
// and unmanaged resources.
if (disposing)
{
// Dispose managed resources.
this.Dispose();
}

// Call the appropriate methods to clean up
// unmanaged resources here.
// If disposing is false,
// only the following code is executed.
//CloseHandle(handle);
//handle = IntPtr.Zero;

// Note disposing has been done.
disposed = true;
}
}

And in my Form i call the writeToDoc.Dispose() method like that.

I copied it from msdn library.

Should it work like that too?

Thanks in advance!
GeneralRe: How to dispose a class Pin
Guffa8-Jan-07 1:00
Guffa8-Jan-07 1:00 
GeneralRe: How to dispose a class Pin
Yustme8-Jan-07 1:03
Yustme8-Jan-07 1:03 
GeneralRe: How to dispose a class Pin
Scott Dorman8-Jan-07 17:12
professionalScott Dorman8-Jan-07 17:12 
GeneralRe: How to dispose a class Pin
Not Active8-Jan-07 2:36
mentorNot Active8-Jan-07 2:36 
GeneralRe: How to dispose a class Pin
Mircea Puiu8-Jan-07 3:39
Mircea Puiu8-Jan-07 3:39 
AnswerRe: How to dispose a class Pin
Guffa8-Jan-07 4:10
Guffa8-Jan-07 4:10 
GeneralRe: How to dispose a class Pin
Not Active8-Jan-07 4:15
mentorNot Active8-Jan-07 4:15 
GeneralRe: How to dispose a class Pin
Pete O'Hanlon9-Jan-07 3:33
mvePete O'Hanlon9-Jan-07 3:33 
GeneralRe: How to dispose a class Pin
Scott Dorman8-Jan-07 17:16
professionalScott Dorman8-Jan-07 17:16 
QuestionRowSource or Datasource in ComboBox Pin
phantanagu7-Jan-07 22:39
phantanagu7-Jan-07 22:39 
AnswerRe: RowSource or Datasource in ComboBox Pin
rizgar8-Jan-07 1:54
rizgar8-Jan-07 1:54 
QuestionHelp needed for Displaying Notification Icon Pin
Exelioindia7-Jan-07 22:37
Exelioindia7-Jan-07 22:37 
AnswerRe: Help needed for Displaying Notification Icon Pin
testy_proconsul7-Jan-07 23:18
testy_proconsul7-Jan-07 23:18 
GeneralRe: Help needed for Displaying Notification Icon Pin
Cormac M Redmond8-Jan-07 1:12
Cormac M Redmond8-Jan-07 1:12 
GeneralRe: Help needed for Displaying Notification Icon Pin
Exelioindia8-Jan-07 17:23
Exelioindia8-Jan-07 17:23 
AnswerRe: Help needed for Displaying Notification Icon Pin
Ravi Bhavnani8-Jan-07 2:50
professionalRavi Bhavnani8-Jan-07 2:50 
QuestionMultithreading Pin
indiaone7-Jan-07 21:21
indiaone7-Jan-07 21:21 

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.