c# - VS14 SaveFile/OpenFileDialog slow down ending an execution (why?) -
working in visual studios 2015, .net 4.5, c# 6.0.
i'm using built in .net dialogs, openfiledialog , savefiledialog, , using results via richtextbox.savefile(string) , richtextbox.openfile(string) methods. in lieu of msdn documentation of these methods (https://msdn.microsoft.com/en-us/library/8bf5hy2e%28v=vs.110%29.aspx?f=255&mspperror=-2147217396) seems though methods should handling resources involved (file streams used saving/loading) internally.
yet, when call these methods during debug execution, ending execution takes 20s+, while ending same debug exe without invoking methods takes 1s. methods not closing filestreams, or there other reason vs having hard time closing these executions?
sample:
private void saveas(childform forminquesiton) { dialogresult result = savefiledialog1.showdialog(); if (result == dialogresult.ok) { forminquesiton.filename = savefiledialog1.filename; forminquesiton.richtextbox1.savefile(savefiledialog1.filename); forminquesiton.text = meaningfultext(forminquesiton.filename); } }
Comments
Post a Comment