Click here to Skip to main content
15,917,005 members
Home / Discussions / C#
   

C#

 
QuestionGraph Plot : Crystal Report--->C# Pin
lavate malllik27-May-10 19:40
lavate malllik27-May-10 19:40 
AnswerRe: Graph Plot : Crystal Report--->C# Pin
Henry Minute28-May-10 1:10
Henry Minute28-May-10 1:10 
QuestionHow to display windows application and windows service in System try Pin
Rajesh_K_Sharma27-May-10 19:04
Rajesh_K_Sharma27-May-10 19:04 
AnswerRe: How to display windows application and windows service in System try Pin
mfinky27-May-10 19:59
mfinky27-May-10 19:59 
QuestionDelete data from file Pin
future383927-May-10 17:26
future383927-May-10 17:26 
AnswerRe: Delete data from file Pin
AspDotNetDev27-May-10 18:33
protectorAspDotNetDev27-May-10 18:33 
QuestionWhere Does VS Store Element Properties? Pin
Roger Wright27-May-10 16:42
professionalRoger Wright27-May-10 16:42 
AnswerRe: Where Does VS Store Element Properties? Pin
AspDotNetDev27-May-10 17:24
protectorAspDotNetDev27-May-10 17:24 
GeneralRe: Where Does VS Store Element Properties? Pin
Roger Wright27-May-10 18:48
professionalRoger Wright27-May-10 18:48 
AnswerRe: Where Does VS Store Element Properties? Pin
Dr.Walt Fair, PE27-May-10 17:31
professionalDr.Walt Fair, PE27-May-10 17:31 
GeneralRe: Where Does VS Store Element Properties? Pin
Roger Wright27-May-10 18:50
professionalRoger Wright27-May-10 18:50 
AnswerRe: Where Does VS Store Element Properties? Pin
Luc Pattyn27-May-10 17:34
sitebuilderLuc Pattyn27-May-10 17:34 
GeneralRe: Where Does VS Store Element Properties? Pin
Roger Wright27-May-10 18:55
professionalRoger Wright27-May-10 18:55 
AnswerRe: Where Does VS Store Element Properties? Pin
Henry Minute28-May-10 1:18
Henry Minute28-May-10 1:18 
QuestionHow to implement a cleanup method for managed resource? Pin
jabbawok27-May-10 15:28
jabbawok27-May-10 15:28 
AnswerRe: How to implement a cleanup method for managed resource? Pin
Luc Pattyn27-May-10 16:20
sitebuilderLuc Pattyn27-May-10 16:20 
Hi,

yes, Dispose is typically used to clean up unmanaged resources, such as memory allocated by native code. And is normally not needed for dealing with end-of-life aspects of managed resources, as the GC will find and collect those itself. However, IMO nothing is keeping you from using the same Dispose method for hiding the ToolStrip.

Example: you probably know the using construct gets used to automatically Dispose of an object when the code block is exited. This is also used by stream I/O; StreamWriter implements a Dispose, so a using construct will call Dispose, which basically closes the stream.

using (StreamWriter sw = File.CreateText(path)) {
    sw.WriteLine("Hello");
    sw.WriteLine("And");
    sw.WriteLine("Welcome");
}

is an example in MSDN. Flush, Close and Dispose are all invisble; using calls Dispose, Dispose closes, and closing implies flushing first.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

I only read formatted code with indentation, so please use PRE tags for code snippets.

I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).

GeneralRe: How to implement a cleanup method for managed resource? Pin
hammerstein0528-May-10 0:53
hammerstein0528-May-10 0:53 
QuestionCreate a table in C# Pin
ASPnoob27-May-10 14:41
ASPnoob27-May-10 14:41 
AnswerRe: Create a table in C# Pin
Luc Pattyn27-May-10 14:57
sitebuilderLuc Pattyn27-May-10 14:57 
QuestionAdd product key to installation project Pin
Enobong Adahada27-May-10 7:11
Enobong Adahada27-May-10 7:11 
AnswerRe: Add product key to installation project Pin
optimus_prime127-May-10 7:43
optimus_prime127-May-10 7:43 
AnswerRe: Add product key to installation project Pin
Henry Minute27-May-10 12:42
Henry Minute27-May-10 12:42 
GeneralRe: Add product key to installation project Pin
Luc Pattyn27-May-10 12:52
sitebuilderLuc Pattyn27-May-10 12:52 
GeneralRe: Add product key to installation project Pin
Henry Minute27-May-10 12:54
Henry Minute27-May-10 12:54 
GeneralRe: Add product key to installation project Pin
Luc Pattyn27-May-10 13:02
sitebuilderLuc Pattyn27-May-10 13:02 

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.