Hide a window instead of closing it in WPF

I wanted to give WPF a try and was creating a timer application which will pop up a window once a while. But what I wanted was for the application to keep running in the tray even when its closed. The following code does NOT work in WPF for some reason: private void Window_Closing(object sender, [...]

Using StreamReader without locking the file in C#

I was using the StreamReader class to read the contents of a text file. I was under the assumption (well I know its a bad thing)  that because I am only reading the contents of the file, the file would be available for other applications to read or write. Guess what, i was wrong. The [...]

Follow

Get every new post delivered to your Inbox.