Technology & Me ...

Conditionally compile XAML in an Universal App

Conditional compilation feature is primarily used to include or exclude a portion of source code file based on certain condition. In a typical C# program, you can use preprocessor directives to perform conditional compilation as shown below – public double MyMethod(int input) { double result; #if CONDITION result = input * 0.5; #else result = input * 0.10; #endif return result; } If the CONDITION is set, result = input * 0.5 code will get compiled otherwise result = input * 0.10 will be compiled. Such type of conditional compilation is commonly used if you want to isolate platform specific…

C# 6.0 Language Features – String Interpolation

Welcome to C# 6.0 language features article series. As you might have heard about Visual Studio 2015 and .Net framework 4.6 announcements in various Microsoft events earlier, one of the most exciting news was the next version of C# language, which is 6.0 and new features added to it. C# has come a long way since 2002 when C# 1.0 was released along with Visual Studio. Since then with every major release of .Net framework, C# became better and better language, which has tremendously helped application developers to minimize the code complexity and focus on business functionality. With the new…

Send messages to MSMQ using ScriptCS

Microsoft Message Queuing [MSMQ] is one of the most commonly used framework for building distributed applications. It provides reliable, secure, optional transaction based messaging model, which guarantees message delivery. Messages can be sent and remain in queue until they processed by message handler. Related messages can be processed using a transaction to ensure they are sent in order, delivered only once and successfully retrieved in destination queue. In case of any failure, entire transaction gets rolled back. While sending the message to the queue, if the message handler goes offline, MSMQ persists the message till the message handler becomes active….

Microsoft forced me to buy an iPhone

It was hard, but inevitable I guess. After using three Windows Phone devices in last 3 years, I finally bought an iPhone 6 yesterday. It was hard, really hard for me to move away from Microsoft and buy an Apple product. I always believed that Microsoft had a real chance to gain in smartphone market share and give a decent competition to Android and iOS. After Nokia acquisition, my hopes were almost doubled…but at the same time I was very disappointed with the latest Lumia smart phones from Microsoft. I am working on different Microsoft technologies for almost 15 years…

C# 6.0 Language Features – Null Conditional Operator

Welcome to C# 6.0 language features article series. As you might have heard about Visual Studio 2015 and .Net framework 4.6 announcements in various Microsoft events earlier, one of the most exciting news was the next version of C# language, which is 6.0 and new features added to it. C# has come a long way since 2002 when C# 1.0 was released along with Visual Studio. Since then with every major release of .Net framework, C# became better and better language, which has tremendously helped application developers to minimize the code complexity and focus on business functionality. With the new…

1 of 13
12345