Click here to Skip to main content
15,914,444 members
Home / Discussions / C#
   

C#

 
GeneralRe: Dispose method calls itself for no reason Pin
mirko865-Jan-09 12:08
mirko865-Jan-09 12:08 
GeneralRe: Dispose method calls itself for no reason Pin
Luc Pattyn5-Jan-09 12:55
sitebuilderLuc Pattyn5-Jan-09 12:55 
GeneralRe: Dispose method calls itself for no reason Pin
mirko865-Jan-09 13:13
mirko865-Jan-09 13:13 
GeneralRe: Dispose method calls itself for no reason Pin
mirko865-Jan-09 13:26
mirko865-Jan-09 13:26 
GeneralRe: Dispose method calls itself for no reason Pin
Luc Pattyn5-Jan-09 13:44
sitebuilderLuc Pattyn5-Jan-09 13:44 
GeneralRe: Dispose method calls itself for no reason Pin
mirko865-Jan-09 13:54
mirko865-Jan-09 13:54 
GeneralRe: Dispose method calls itself for no reason Pin
Luc Pattyn5-Jan-09 13:38
sitebuilderLuc Pattyn5-Jan-09 13:38 
GeneralRe: Dispose method calls itself for no reason Pin
mirko865-Jan-09 13:50
mirko865-Jan-09 13:50 
hi man, well no not one of my try catches are empty so i know when an exception happens, what i was refering to when i said dispose called itself was that i added a little piece of code to my dispose method, a call to the method that checks if any changes has been made, so whenever i close my form , the form lets me know if there were in fact any changes, this call im talking about has as parameter a treeeview node name, at first i thought this was the problem, maybe i havent selected any nodes so if i make the reference treeview.selectednode.text it would make sense that it gave me a nullreference exception since nothing is selected, but i erased that line and left the dispose method as visual studio puts it for me and the error still happens sometimes.

i mean even if i messed up in the dispose method by adding a line of code with a null reference, the program , as far as i know, only calls the dispose method when im closing the form, so why would the dispose method call itself after i saved my form's changes IF I HAVENT EVEN CLOSED THE FORM YET???

and ONLY sometimes, i mean i do the same steps over and over again and most times nothing bad happens and dispose method doesnt call itself for no reason, until i actually close the form.

thanks for your replies
GeneralRe: Dispose method calls itself for no reason Pin
Luc Pattyn5-Jan-09 14:37
sitebuilderLuc Pattyn5-Jan-09 14:37 
GeneralRe: Dispose method calls itself for no reason Pin
MidwestLimey5-Jan-09 14:30
professionalMidwestLimey5-Jan-09 14:30 
GeneralRe: Dispose method calls itself for no reason Pin
Mark Churchill5-Jan-09 16:40
Mark Churchill5-Jan-09 16:40 
AnswerRe: Dispose method calls itself for no reason Pin
Jon Rista6-Jan-09 10:26
Jon Rista6-Jan-09 10:26 
GeneralRe: Dispose method calls itself for no reason Pin
mirko866-Jan-09 11:08
mirko866-Jan-09 11:08 
GeneralRe: Dispose method calls itself for no reason Pin
Jon Rista6-Jan-09 11:45
Jon Rista6-Jan-09 11:45 
GeneralRe: Dispose method calls itself for no reason Pin
mirko866-Jan-09 11:57
mirko866-Jan-09 11:57 
GeneralRe: Dispose method calls itself for no reason Pin
mirko866-Jan-09 12:37
mirko866-Jan-09 12:37 
QuestionHow to use C# class library dll controls in C++ Win32 project Pin
atisman5-Jan-09 10:10
atisman5-Jan-09 10:10 
AnswerRe: How to use C# class library dll controls in C++ Win32 project Pin
EliottA5-Jan-09 10:13
EliottA5-Jan-09 10:13 
Question[Message Deleted] Pin
Vady_15-Jan-09 9:47
Vady_15-Jan-09 9:47 
AnswerRe: Hii Allll !!!! Pin
#realJSOP5-Jan-09 10:29
professional#realJSOP5-Jan-09 10:29 
GeneralRe: Hii Allll !!!! Pin
EliottA5-Jan-09 10:55
EliottA5-Jan-09 10:55 
GeneralRe: Hii Allll !!!! Pin
User 66585-Jan-09 11:22
User 66585-Jan-09 11:22 
GeneralRe: Hii Allll !!!! Pin
vaghelabhavesh5-Jan-09 13:02
vaghelabhavesh5-Jan-09 13:02 
JokeRe: Hii Allll !!!! Pin
Silvyster5-Jan-09 13:45
Silvyster5-Jan-09 13:45 
GeneralRe: Hii Allll !!!! Pin
#realJSOP5-Jan-09 23:45
professional#realJSOP5-Jan-09 23:45 

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.