no dogma blog
no dogma blog
Blog Posts
Podcast
Web API Lambda Course
Polly Course
Photos
Contact
Support this Site
About
RSS
Light
Dark
Automatic
C#
Working with JSON in .NET, a better way?
Full source code available here. Two recent experiences with C# and JSON frustrated me with how difficult it is to work JSON inside an application. I have also been learning Node.
Oct 9, 2020
#
C#
,
dotNet
,
dynamic
,
Elasticsearch
Enum ToString(), Caching for Performance
Full source code available here. A while ago I was working on a program that had to convert enums values to strings as it saved data. When I removed the enum value from the data that was saved it went noticeably faster.
Jul 24, 2020
#
C#
,
Enum
,
ToString
,
Caching
Executing a Method on All Implementations of an Interface
Full source code available here. Have you ever wanted to execute a method on all implementations of an interface? Say you have an interface called IGenerator and four implementations of it – GeneratorA, GeneratorB, GeneratorC, and GeneratorD.
Jun 1, 2020
#
Activator
,
C#
,
CreateInstance
,
Interfaces
Simple Func<T> and Func<T1, T2, TResult> Examples
Full source code available here. About a month ago I wrote a post with a simple explanation of how to use methods that take Action or Action<T> as parameters. Actions themselves take 0 to 16 parameters and return nothing.
Apr 10, 2020
#
C#
,
Lambda
,
Func
Parameterized SQL WHERE IN clause C#
If you are using some legacy SQL in C# you’ll occasionally need to write a WHERE IN. You don’t want to end up writing something like the below, either directly or through some sort of loop.
Jan 28, 2016
#
Extension Method
,
Parameters
,
SQL
,
WHERE IN
,
C#
«
Cite
×