Category Archives: C#

Func vs Expression

      1 Comment on Func vs Expression

This is another post about C# basics 🙂 Our code sample is like following: What we have here is Func ‘f’ and Expression ‘e1’ initialized with same value (x, y) => (x + y) * 2 Lines 21,22 and 23 will all print the same output: 6. So what is… Read more »

Throwing exception in C#

      1 Comment on Throwing exception in C#

In C# there are 3 of ways to throw exception. throw throw ex throw new Exception(“message”, innerException) Our sample: I will make changes in line 30 (purple box) and catch exception in parent method in simple try{} catch(Exceptiop e){} block. Method throwing actual exception is called ThrowExceptionMethod() and is not… Read more »

OperationResult pattern

      2 Comments on OperationResult pattern

Communication between layers/modules/subsystems works best when API is simple and self explanatory. Pieter Hintjens wrote a great article about API design. For today\’s article we will focus on point 9: Keep it Simple to Use Introduction This post is an extension of following post https://localwire.pl/throw-exception-at-me/. I found worth sharing my… Read more »

BizTalk – how to create message on orchestration programically

Since 2 years I have the opportunity to work with BizTalk. This post is one of \”BizTalk series\”. I\’ll keep posting interesting tricks that are easy to do, but not so easy to find on internet. Today I\’ll show you how to create a message inside BizTalk orchestration. There are… Read more »