Contents tagged with c#
-
Querying a SharePoint list via Microsoft.Graph after upgrading to .NET SDK v5
I've just finished upgrading all the project references in a CRM solution I built a while ago, which was using the Microsoft.Graph v4 .NET SDK (via the Microsoft.Graph v4.35.0 NuGet package, to be …
-
Reactive Extensions - Their NuGet packages were renamed
This is an aide-memoire which may be of use to others, though it's old news and almost certainly won't be relevant unless you've got some relatively old codebases that need to be maintained and …
-
Converting a load of files from UTF-16 to UTF-8
There's a database here that I've been meaning to get into source control for a long time. Luckily we have regular backups of it (that have been restore proven) and it never changes so it's been …
-
Using Windows 10 UWP APIs from a .NET Core application
One of the things that Microsoft talked about at Build 2019 was how they intended to broaden availability of UWP APIs so that they can be consumed by non-UWP (in the "store only / sideload only" …
-
Reading and writing a memory-mapped file in .NET Core
According to Wikipedia, a Memory-mapped file is:
A memory-mapped file is a segment of virtual memory that has been assigned a direct byte-for-byte correlation with some portion of a file or file- …
-
Scaffolding an Entity Framework Core database in a project that targets .NETStandard
I've been working on a project recently for storing system configuration data (I know, I know, this is a problem that's been solved a thousand times over!) and after defining the database structure …
-
Adding a delay to ASP.NET Core Web API methods to simulate slow or erratic networks
I recently commented on a tweet by @jongalloway, saying:
A thousand times this! Run your app with an artificial delay introduced into server responses and look for things that don't make sense. …
-
Adding logging to an old .NET 4.0 project via Castle Windsor to measure performance
Recently I've been working with a reasonably old codebase, one that's using Castle / Castle.Windsor 3.1.0 which dates back to late 2012, targeting plain .NET Framework 4.0. This has been 'interesting' …
-
Resolving 'missing' assemblies where the assembly has been renamed
We've probably all seen assembly binding redirects kicking around in config files, looking like this:
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
< …
-
Don't store monetary values as doubles
It's something that everyone should know, but apparently not...
I had an issue raised by a user recently for a piece of software that I inherited where they were being told that EUR 31,995.27 was …