.NET programming basic course

As I had mentioned in one of my previous posts I attended a programming course dedicated for C#/.NET beginners. The course was organised by polish IT leader Comarch (at the end of this post you will find a link to the course on their website).
I have to say that most of the topics presented during the course were nothing new to me. But, it’s completely different than learning on your own no matter if it’s from a book or YouTube course or lecture. Having that possibility to ask questions and get instant answer is the biggest advantage. Sometimes, you think that you might have not understood something you ask a question to clarify and you get an affirmative answer –  that’s a confidence boost. That gives you that feeling that you’re on the right track. You can’t get that any other way than face-to-face learning experience.
What’s more that improves the quality of the course is the fact that it was mostly all time practice. The theory part was more of a brief introduction to the topic than a lecture. All important things were presented with an example and tested by students ourselves.
After completing the course I have one advice for anyone who wants to get into programming: be extremely careful when learning online. Some of the learning materials are not prepared with that mindset that someone who’s going to learn is absolute beginner. They tend to go shortcuts, don’t pay attention to details which denies learners to fully comprehend the knowledge. And sometimes they teach bad habits (for instance I have not heard before the course about the ‘private field, public property’ convention).
What I learnt during the course and I find most important for me at this stage is deeper insight into class inheritance and polymorphism.
I am pretty happy with the course but still there were some disappointments. I was really hoping to get some more details about such aspects as interfaces, data-binding and MVVM model. We talked a bit about interfaces, the tutor showed us an example of data-binding and he said few words about MVVM. But I was simply hoping for more.
Generally, I find the course much beneficial for me and I will surely continue with courses from Comarch. The course ended with issuing a certificate. That’s my first 🙂
Thanks, Michal

Programowanie .NET – kurs podstawowy (Comarch)


I have finished another quick project. The plan for this was to introduce myself to WPF and XAML. My general thoughts are that despite that WinForms seems to be easier and quicker way to design a Windows application I find WPF more organised and more controllable that WinForms. I designed all windows for this application using only XAML editor (not the visual one) in Visual Studio. That gives better understanding what is happening with the window.

The application itself is quite simple: it converts Roman numbers to Decimal, and the other way around. Algorithms of conversion are quite simple so I won’t describe them here (they can be found in readme file, or by analysing the code).

That was quite a nice way to leap into WPF. Next week, I’m going to three-day basics of .NET programming course which I hope will give me more insight to WPF and MVVM model (which, I’ve deducted from some of the YouTube lectures about WPF, is essential for writing a well-organised and maintainable applications).

Stay tuned!

ClickOnce installer (*.zip)
Source code (*.zip)
Readme file (*.txt)

Localising your application

Some time ago, while working on an abandoned project (which, I have to admit honestly, turned out to be too laborious and complicated for me at that point) I had worked out a method to localise the program using XML files. That worked perfectly okay but only recently I have that there are way easiest methods to achieve that.
Let’s start with XML method. Available languages have a unique file with all strings stored in. The file is organised as follows:

As you can see each window has a specific section in XML file, and only this section will be loaded when a window is displayed. Every window has a method which loads all related strings:

Drawbacks of this method are clearly visible: you have to write a method which will load all strings from XML file. And you have to be extremely careful not to omit any text you want to display. It worked but not effectively at all.

There is other much simpler method which I found at AltControlDelete.pl. It uses resource files and System.Globalization. General idea is that you create individual *.resx file for each language: Lang.resx for default (English) language and Lang.xx-XX.resx, where xx-XX is the name of a culture (for instance, pl-PL for Polish). What’s important is that access modifier for those files must be set as public as shown below.

These files must be stored in one folder (let say “Languages”). Now, you need to include them in your source code and you’re ready to use these strings in your code:

To use it with XAML you need to add appropriate namespace to Window element in XAML file:

Now, to switch between languages you need to change Culture in your process:

Of course, you need to build your app in a way that user has the possibility to switch between languages as he intends.

That’s about it. The method with *.resx files is much simpler and most of all quicker and to some point less prone to omissions and mistakes. Of course, there are other methods (for instance, Mulitilingual app toolkit  from Microsoft) but this one seems to me that is easy enough and does not require any add-on or third-party software other than Visual Studio).

This post is based on articles available at www.altcontroldelete.pl by Jerzy Piechowiak.