csharp

Faking num lock, caps lock and scroll lock leds

How to turn the Num Lock, Caps Lock and Scroll Lock LEDs on and off from C# without changing the key state, using DeviceIoControl.

Building Expression Evaluator with Expression Trees in C# – Improving the Api

Part 4 of the series: binding variables by name with anonymous objects, and compiling an expression once to evaluate it with different values.

Using Reactive Extensions for Streaming Data from Database

How to use Reactive Extensions (Rx) in .NET to run a slow database query in the background and load the results into a grid in chunks.

Building Expression Evaluator with Expression Trees in C# – Part 3

Part 3 of the series: adding support for variables to the C# expression evaluator with Expression.Parameter and compiled lambdas.

Building Expression Evaluator with Expression Trees in C# – Part 2

Part 2 of the series: rewriting the C# expression evaluator with the shunting-yard algorithm and adding support for parentheses.

Building Expression Evaluator with Expression Trees in C# – Part 1

Part 1 of the series: a basic mathematical expression evaluator in C# built with expression trees, developed test by test.

Building Expression Evaluator with Expression Trees in C# – Table of Contents

Table of contents for a four-part series on building a mathematical expression evaluator in C# with expression trees.

AppDomain.AssemblyResolve Event Tips

Tips for handling the AppDomain.AssemblyResolve event in .NET: parsing assembly names, handling repeated calls and avoiding FileNotFoundException.

How to Get Elevated Process Path in .Net

Process.MainModule.FileName throws for elevated processes. Here is how to get the process path in .NET with QueryFullProcessImageName instead.

Bugs in System.Diagnostics.Process Class

Process.StartTime and Process.HasExited throw an access denied Win32Exception for elevated processes. Here is why it happens and how to work around it.