Click here to Skip to main content
15,902,112 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: Add product key to installation project Pin
Roger Wright27-May-10 15:55
professionalRoger Wright27-May-10 15:55 
GeneralRe: Add product key to installation project Pin
Luc Pattyn27-May-10 16:03
sitebuilderLuc Pattyn27-May-10 16:03 
GeneralRe: Add product key to installation project Pin
Henry Minute28-May-10 1:22
Henry Minute28-May-10 1:22 
GeneralRe: Add product key to installation project Pin
Luc Pattyn28-May-10 2:07
sitebuilderLuc Pattyn28-May-10 2:07 
QuestionEvent for the release of a menu item Pin
manustone27-May-10 5:08
manustone27-May-10 5:08 
AnswerRe: Event for the release of a menu item Pin
Luc Pattyn27-May-10 5:32
sitebuilderLuc Pattyn27-May-10 5:32 
GeneralRe: Event for the release of a menu item Pin
manustone27-May-10 21:50
manustone27-May-10 21:50 
GeneralRe: Event for the release of a menu item Pin
Luc Pattyn28-May-10 2:00
sitebuilderLuc Pattyn28-May-10 2:00 

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.