¡@

Home 

c# Programming Glossary: closing

Keeping ASP.NET Session Open / Alive

http://stackoverflow.com/questions/1431733/keeping-asp-net-session-open-alive

than 10 min on the server as I want closed sessions by closing the browser window to time out fast. Suggestions code samples..

TransactionScope automatically escalating to MSDTC on some machines?

http://stackoverflow.com/questions/1690892/transactionscope-automatically-escalating-to-msdtc-on-some-machines

global connection object opening the connection first and closing it last is at odds against the logic of opening a connection.. the logic of opening a connection as late as possible and closing it as soon as possible. c# .net transactions transactionscope..

Creating a byte array from a stream

http://stackoverflow.com/questions/221925/creating-a-byte-array-from-a-stream

least be correct. It doesn't assume any responsibility for closing the stream the caller should do that. See this article for more..

When should I dispose of a data context

http://stackoverflow.com/questions/389822/when-should-i-dispose-of-a-data-context

your application experiences problems with connections not closing and you suspect the automatic closing behavior is not working.. with connections not closing and you suspect the automatic closing behavior is not working you can use the Dispose pattern as a..

Creating pdf files at runtime in c# [closed]

http://stackoverflow.com/questions/465433/creating-pdf-files-at-runtime-in-c-sharp

file writing to it line by line embedding images etc and closing the pdf file all in C# code What I want is a set of tools and..

Capture console exit C#

http://stackoverflow.com/questions/474679/capture-console-exit-c-sharp

I need an event that can be triggered when the program is closing so that I can cleanup all of the other threads and close all..

How can I close a login form and show the main form without my application closing?

http://stackoverflow.com/questions/4759334/how-can-i-close-a-login-form-and-show-the-main-form-without-my-application-closi

a login form and show the main form without my application closing I have two forms in my project Login and Main . What I'm trying..

Creating a blocking Queue<T> in .NET?

http://stackoverflow.com/questions/530211/creating-a-blocking-queuet-in-net

set an empty queue just returns rather than blocking bool closing public void Close lock queue closing true Monitor.PulseAll.. than blocking bool closing public void Close lock queue closing true Monitor.PulseAll queue public bool TryDequeue out T value.. TryDequeue out T value lock queue while queue.Count 0 if closing value default T return false Monitor.Wait queue value queue.Dequeue..

How can I insert an image into a RichTextBox?

http://stackoverflow.com/questions/542850/how-can-i-insert-an-image-into-a-richtextbox

can insert in the RTF code of a document. Don't forget the closing Next you get the RTF code from your RichTextBox rtbBox.Rtf insert..

Generate a PDF that automatically prints

http://stackoverflow.com/questions/6167995/generate-a-pdf-that-automatically-prints

Disposing the document before closing the stream clears out any data structures used by the Document..

how can i get text formatting with iTextSharp

http://stackoverflow.com/questions/6882098/how-can-i-get-text-formatting-with-itextsharp

If we wrote anything then we'll always have a missing closing tag so close it here if result.Length 0 result.Append span..

Why catch and rethrow Exception in C#?

http://stackoverflow.com/questions/881473/why-catch-and-rethrow-exception-in-c

filter out NoDataFound. do special cleanup like maybe closing the dirty database connection. throw this preserves the stack.. just like java . finally normal clean goes here like closing open files . Catch the more specific exceptions before the less..

ExecuteReader requires an open and available Connection. The connection's current state is Connecting

http://stackoverflow.com/questions/9705637/executereader-requires-an-open-and-available-connection-the-connections-curren

it to the pooled set of active connections instead of closing it. Once the connection is returned to the pool it is ready.. obviously there's no reason to avoid creating opening or closing connections since actually they aren't created opened and closed..

How can I make a .Net Winforms application that only runs in the System Tray?

http://stackoverflow.com/questions/995195/how-can-i-make-a-net-winforms-application-that-only-runs-in-the-system-tray

of the very basics but does not address any of these Does closing the application from the system tray properly close any open..

Avoiding the woes of Invoke/BeginInvoke in cross-thread WinForm event handling?

http://stackoverflow.com/questions/1364116/avoiding-the-woes-of-invoke-begininvoke-in-cross-thread-winform-event-handling

troubles. I appreciate your spare thought cycles on this. Closing in on the trouble... The following is the later half of the..

How to stop BackgroundWorker on Form's Closing event?

http://stackoverflow.com/questions/1731384/how-to-stop-backgroundworker-on-forms-closing-event

to stop BackgroundWorker on Form's Closing event I have a form that spawns a BackgroundWorker that should.. on main thread hence Invoke Action ... call. If in HandleClosingEvent I just do bgWorker.CancelAsync then I get ObjectDisposedException.. on Invoke ... call understandably. But if I sit in HandleClosingEvent and wait for bgWorker to be done than .Invoke ... never..

Closing a form and then call another one

http://stackoverflow.com/questions/2751076/closing-a-form-and-then-call-another-one

a form and then call another one I want to close the current..

ContextSwitchDeadlock Was Detected error in C#

http://stackoverflow.com/questions/2797677/contextswitchdeadlock-was-detected-error-in-c-sharp

main window with a ghost that displays Not Responding . Closing the window won't work no click events have any effect. What..

Using the iterator variable of foreach loop in a lambda expression - why fails?

http://stackoverflow.com/questions/3168375/using-the-iterator-variable-of-foreach-loop-in-a-lambda-expression-why-fails

Eric Lippert has an in depth explanation of this behaviour Closing over the loop variable considered harmful Closing over the loop.. Closing over the loop variable considered harmful Closing over the loop variable part two basically it's the loop variable..

From Eric Lippert's blog: “don't close over the loop variable” [duplicate]

http://stackoverflow.com/questions/3190578/from-eric-lipperts-blog-dont-close-over-the-loop-variable

along with some interesting discussion in the comments Closing over the loop variable considered harmful Closing over the loop.. comments Closing over the loop variable considered harmful Closing over the loop variable part two share improve this answer..

Handling the window closing event with WPF / MVVM Light Toolkit

http://stackoverflow.com/questions/3683450/handling-the-window-closing-event-with-wpf-mvvm-light-toolkit

event with WPF MVVM Light Toolkit I'd like to handle the Closing event when a user clicks the upper right 'X' button of my window.. I know how to do this in the code behind subscribe to the Closing event of the window then use the CancelEventArgs.Cancel property... approach. I think the good approach would be to bind the Closing event to a Command in my ViewModel. I tried that i Interaction.Triggers..

How to properly and completely close/reset a TcpClient connection?

http://stackoverflow.com/questions/425235/how-to-properly-and-completely-close-reset-a-tcpclient-connection

the connection tcpClient.GetStream .Close tcpClient.Close Closing the client does not close the stream. share improve this answer..

Fading out a window

http://stackoverflow.com/questions/5958508/fading-out-a-window

this event can even occur for windows. You need to handle Closing prevent it from actually closing start an animation and close.. Completed event of the animation occurs. e.g. Window ... Closing Window_Closing private void Window_Closing object sender CancelEventArgs.. of the animation occurs. e.g. Window ... Closing Window_Closing private void Window_Closing object sender CancelEventArgs e..

Determine list of event handlers bound to event

http://stackoverflow.com/questions/660480/determine-list-of-event-handlers-bound-to-event

event I have a WinForms form that won't close. In OnFormClosing e.Cancel is set to true. I am guessing that some object in my.. that some object in my application has bound to the Closing or FormClosing event and is blocking the close. To find out.. object in my application has bound to the Closing or FormClosing event and is blocking the close. To find out I'd like to determine..

Customizing a TabControl for the Closing of Individual Tabs

http://stackoverflow.com/questions/803540/customizing-a-tabcontrol-for-the-closing-of-individual-tabs

a TabControl for the Closing of Individual Tabs My scenario is the following I am working..

Is there a reason for C#'s reuse of the variable in a foreach?

http://stackoverflow.com/questions/8898925/is-there-a-reason-for-cs-reuse-of-the-variable-in-a-foreach

entirely justified. I discuss this problem in detail here Closing over the loop variable considered harmful Is there something..

Why is Application.Restart() not reliable?

http://stackoverflow.com/questions/95098/why-is-application-restart-not-reliable

shutting down or starting up. Two examples The Closing event on a form can stop an app's shutdown If you're doing checking..