Crafting Beautiful Code

    • BarModeler
    • Web apps
    • About
  • Tumblr
  • LinkedIn
  • GitHub
  • It is not always possible to rewrite your C or C++ legacy applications in .NET languages in one shot. Sometimes you have to do it module by module, step by step. In other words, you may have to use unmanaged DLLs in your .NET applications.Suppose you want to an unmanaged… Read more.

    May 1

    ·

    C++, Software Development

    ·

    3–4 minutes
  • In one of my C++/CLI projects, I need to use a class exported from a unmanaged DLL. When I build the C++/CLI project, I get two linking errors: LNK2028 and LNK2029. The linker cannot find the GetObject() method of a class. First, I made sure that the export library of… Read more.

    Apr 28

    ·

    C++, Uncategorized, Visual Studio

    ·

    2–3 minutes
  • Found a very nice, concise Scrum Cheat Sheet. Read more.

    Mar 27

    ·

    Cheat Sheets, Software Development

    ·

    1–2 minutes
  • In the C++ CLI Cheat Sheet, I tried to list side by side how to do certain things in C++/CLI and C#. Read more.

    Mar 13

    ·

    C++, Cheat Sheets

    ·

    1–2 minutes
  • Published an article on CodeProject, discussing about the issues related to binding ObservableCollection to ListView and ComboBox controls. Please read the article here. Read more.

    Feb 8

    ·

    Articles, WPF

    ·

    1–2 minutes
  • In WPF, we can bind an ObservableCollection<T> object to the ItemsSource property of an ItemsControl, e.g. a ComboBox. When we add or remove an element from the collection, the control bound to the collection will get updated automatically. However, we modify an element of the collection, the control won’t get… Read more.

    Jan 30

    ·

    WPF

    ·

    1–2 minutes
  • In a WPF application, I have several Button controls each bound to a ICommand property of a ViewModel. In one of the method of a ViewModel, I invoke a method with a worker thread. When the method is done, it will change the value of a property, which would causes… Read more.

    Jan 30

    ·

    C#, WPF

    ·

    1–2 minutes
  • The Problem Suppose you need to use a legacy C++ class designed in COM style. Some methods of the class return HRESULT, and take a pointer as a parameter that could point to an int, a short, a std::string, an enum, and so on. For example: Solution 1 The most… Read more.

    Jan 17

    ·

    Articles, C++, Software Development

    ·

    3–4 minutes
  • In C#, we can check if an event variable is null before firing the event. For example: public class MyClass { public event EventHandler MyEvent; public void FireEvent() { // Check if there is any event handler registered. if (MyEvent != null) { MyEvent(this, new EventArgs()); } } } But… Read more.

    Nov 4

    ·

    Uncategorized

    ·

    1–2 minutes
  • I was chatting with my colleague the other day about the Liskov Substitution Principle and Design by Contract. We know the rule (copied from Wikipedia) is that Subclasses in an inheritance hierarchy are allowed to weaken preconditions (but not strengthen them) and strengthen postconditions and invariants (but not weaken them).… Read more.

    Oct 28

    ·

    Software Development

    ·

    1–2 minutes
Prev
1 … 4 5 6 7
Next

Crafting Beautiful Code

A design for writers who want their posts displayed as a direct conversation, with no images or post titles. Titleless also has diverse style variations to spark your creativity. Enjoy!

Designed with WordPress

Month Discover: Henri Rousseau's Virgin Forest with Sunset (1910). Original from the Kunstmuseum Basel Museum.

 

Loading Comments...
 

    • Subscribe Subscribed
      • Crafting Beautiful Code
      • Already have a WordPress.com account? Log in now.
      • Crafting Beautiful Code
      • Subscribe Subscribed
      • Sign up
      • Log in
      • Report this content
      • View site in Reader
      • Manage subscriptions
      • Collapse this bar