Use Int16 (short) as Date in C#

It have range only 10/1/1 to 32/12/31 but occupate just 2 bytes, whereas Date 3 bytes in SQL Server. Types like SmallDateTime or DateTime2 I won’t comparing because stored also time.

Unit tests:



Read More Use Int16 (short) as Date in C#

Structure of flow text in WPF

Starting point for this blogpost.   Principle: Create something which have Blocks/Child/ListItems/RowGroups property Create something which have Inlines property Create elements which are derived from Inline Inline -> Inlines -> Blocks/Child/ListItems/RowGroups   Block derived classes are these : Paragraph – Blocks Section – Blocks BlockUIContainer – Child List – ListItems Table – RowGroups  

Read More Structure of flow text in WPF

Basic terms in .NET Compiler Platform (Roslyn)

I have spent many hours with Roslyn – this blogpost is result of my exploring of its infrastructure: Concepts Syntactic model – Working just with actual file Semantic model – Connection to another source files. Usually trigger compilation, so it’s expensive to hardware resources. SemanticModel.GetDeclaredSymbol() accepts declaration syntax and provides the corresponding symbol. SemanticModel.GetSymbolInfo() accepts …

Read More Basic terms in .NET Compiler Platform (Roslyn)