Archive for the 'c#' Category

23
Sep
11

finding leaks in c/c++ code under windows


Easy way of finding leaks in C/C++ code: vld.

  1. Install it
  2. Add it to the include paths and to the directories
  3. Make sure the vld dll is in PATH ( may require an IDE restart )
  4. include in one of your sources
  5. run the code in debug
  6. check the output window, after you close the binary
  7. fix leaks

07
Jun
09

c# selecting a directory in an “open file” dialog


If you need to select a directory in an “open file” dialog, you can use the following code :


FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.ShowDialog();
string selected = dialog.SelectedPath;

The window will look like this :
dialog

07
Jun
09

c# modal forms


If you want to have a modal form, make sure you call the ShowDialog method on it, like this :


YourForm form = new YourForm();
form.ShowDialog();

06
Jun
09

a nice feeling about coding


After coding a form with syntax highlighting support in :

  1. PyQt
  2. PyGTK

I decided to give it a shot in C#. This was one fun experience! Even though it’s a static typed language, I really enjoyed the process, and I’m gonna continue the project in it. I really like some of the available controls and the native look on the applications.

Haven’t felt this way in a while.

15
May
09

omg I have to code in C


I just spent about 2 hours with a very odd bug. Ok, maybe it’s not that odd if you know your C, but for me, it was a nasty experience. Dynamic allocation is not as easy as it seems.

21
Apr
09

design patterns in C


I have a ( bad ) feeling that design patterns in C require you to make use of the preprocessor .

27
Mar
09

refreshing my C#

I think it’s been 2 years since I last used C#. I remember it was a fun experience, and I would like to get to know it better. Lambdas, extension methods, properties … This is nice 🙂

I’m tired of waiting for Java to catch up




Blog Stats

  • 218,521 hits