In some types of dependable applications (e.g. controlling some electronic devices) the execution time of a program has to be very short to enable the appropriate control of the device. Implementing code for Kamika’s device that measures small particles in the air or in the liquid we are using C# language. Some parts of the code were also transformed into C++ to find overheads. The main part of the paper are results of some comparative experiments measuring the performance of alternative C# constructions. We were especially interested in extension methods which enable to “add” methods to existing types without creating a new derived type, recompiling, or modifying the original type.