Click here to Skip to main content
16,004,924 members
Home / Discussions / C#
   

C#

 
QuestionAbout encoding setting? Pin
pmasknguyen4-Dec-05 3:34
pmasknguyen4-Dec-05 3:34 
QuestionComboBox question Pin
1nsp1r3d4-Dec-05 1:11
1nsp1r3d4-Dec-05 1:11 
AnswerRe: ComboBox question Pin
Curtis Schlak.4-Dec-05 2:38
Curtis Schlak.4-Dec-05 2:38 
GeneralRe: ComboBox question Pin
1nsp1r3d4-Dec-05 3:36
1nsp1r3d4-Dec-05 3:36 
GeneralRe: ComboBox question Pin
Curtis Schlak.4-Dec-05 11:31
Curtis Schlak.4-Dec-05 11:31 
QuestionUsing Dispose in Classes? Pin
redfish343-Dec-05 23:24
redfish343-Dec-05 23:24 
AnswerRe: Using Dispose in Classes? Pin
Guffa3-Dec-05 23:41
Guffa3-Dec-05 23:41 
AnswerRe: Using Dispose in Classes? Pin
Colin Angus Mackay3-Dec-05 23:42
Colin Angus Mackay3-Dec-05 23:42 
The reason is that you have zero control over when the "finalizer" (as the destructor is called in C#) is called.

If you have a class that has a Dispose method then you are supposed to call it when you are done with any object of that class. The Dispose method would normally close connections to external resources, free up unmanaged objects and so on.

You call Dispose from the finaliser in case the caller of the class did not clean it up properly. It also means that you only have one method where the clean up code resides.

You can have the language automatically called Dispose on objects with an IDisposable interface like this:

using (SomeDisposableObject obj = new SomeDisposableObject())
{
    // Do stuff with obj
}
// By the time the code gets here obj.Dispose() has been called by
// the framework.


Does this help?


My: Blog | Photos

"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious


AnswerThanks for Help Pin
redfish344-Dec-05 13:07
redfish344-Dec-05 13:07 
QuestionWhat Does this Code Mean? Pin
redfish343-Dec-05 23:21
redfish343-Dec-05 23:21 
AnswerRe: What Does this Code Mean? Pin
Colin Angus Mackay3-Dec-05 23:44
Colin Angus Mackay3-Dec-05 23:44 
GeneralRe: What Does this Code Mean? Pin
leppie4-Dec-05 2:30
leppie4-Dec-05 2:30 
AnswerRe: What Does this Code Mean? Pin
Colin Angus Mackay3-Dec-05 23:46
Colin Angus Mackay3-Dec-05 23:46 
AnswerRe: What Does this Code Mean? Pin
Guffa3-Dec-05 23:52
Guffa3-Dec-05 23:52 
AnswerThanks for Help Pin
redfish344-Dec-05 13:21
redfish344-Dec-05 13:21 
QuestionSmaller bitmap within a larger bitmap Pin
billb21123-Dec-05 16:22
billb21123-Dec-05 16:22 
QuestionReading and Writing XML Configuration Files Pin
budidharma3-Dec-05 10:20
budidharma3-Dec-05 10:20 
AnswerRe: Reading and Writing XML Configuration Files Pin
S. Senthil Kumar4-Dec-05 2:26
S. Senthil Kumar4-Dec-05 2:26 
QuestionHow to scroll a tabpage's panel by an external button Pin
bc11183-Dec-05 8:23
bc11183-Dec-05 8:23 
AnswerRe: How to scroll a tabpage's panel by an external button Pin
Curtis Schlak.3-Dec-05 10:42
Curtis Schlak.3-Dec-05 10:42 
QuestionWhat is the equivalent of LOBYTE and HIBYTE in C#? Pin
bouli3-Dec-05 6:48
bouli3-Dec-05 6:48 
AnswerRe: What is the equivalent of LOBYTE and HIBYTE in C#? Pin
dnewmon3-Dec-05 9:27
dnewmon3-Dec-05 9:27 
QuestionDynamically Generating Table in a Web Application Pin
farhan19763-Dec-05 3:36
farhan19763-Dec-05 3:36 
AnswerRe: Dynamically Generating Table in a Web Application Pin
Dave Kreskowiak3-Dec-05 4:54
mveDave Kreskowiak3-Dec-05 4:54 
AnswerRe: Dynamically Generating Table in a Web Application Pin
farhan19763-Dec-05 18:19
farhan19763-Dec-05 18:19 

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.