HTSMP – People

      No Comments on HTSMP – People

This post is a part of How To Ship Maintainable Product series Problem with the people Almost every software product is built by humans. A small amount is generated. Humans are the most unpredictable factor – we are like that by definition. To build a maintainable product we should isolate… Read more »

Dictionary and HashTable in C#

      No Comments on Dictionary and HashTable in C#

.NET Framework provides several data structures for constant O(1) access. In software engineering we call them lookup tables. In .NET we can list following lookup-tables (at least): HashTable Dictionary ConcurrentDictionary HybridDictionary Sample code Code samples are taken from MSDN documentation and adjusted to better explain the context. HashTable Dictionary As… Read more »

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 an 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… Read more »