Technology & Me ...

C# 6.0 Language Features – Declaration Expressions

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…

C# 6.0 Language Features – nameof 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…

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….

1 of 13
12345