powershell Check whether two C# builds result in binaries that are functionally identical (within reasonable limits). I spent some of my weekend determining whether the IL changed between builds. The following script builds a solution, generates intermediate language from the build result, filters out stuff that always changes (such
c# GetEnumerator and GetAsyncEnumerator both return a new instance of an enumerator. GetEnumerator and GetAsyncEnumerator return a new instance of an enumerator. As a result... var e1 = sequence.GetEnumerator(); var e2 = sequence.GetEnumerator(); Console.WriteLine(e1 == e2); // false!!!Corollary1: if we call e1.MoveNext(), the
c# ReSharper: Exclude all C# projects from analysis We have a project with 72 files. ReSharper takes too many minutes to load. Exclude all the projects! Run this PowerShell script. Paste its output into your *.DotSettings or *.DotSettings.User file. dir
c# What is a .NET Mutex? https://msdn.microsoft.com/en-us/library/system.threading.mutex(v=vs.110).aspx a primitive .NET type one thread owns it at a time WaitOne(int) blocks the calling thread returns true when
c# C# local functions as explanatory variables TL;DR; Among other use cases, local functions can be explanatory variables for short routines. For instance this anonymous function... private void SomeMethod() { // anonymous function var characters = dNormal.Where(c => CharUnicodeInfo.GetUnicodeCategory(
c# ReSharper Code Cleanup from the Command Line TL;DR; We can run ReSharper's Code Cleanup and Code Inspection from the command line. Here is how. Download the ReSharper Command Line Tools. Extract the tools. Enter the unzipped directory. View the
vim Vim with C#.NET Core and OmniSharp-Roslyn on Windows The result C# code completion and other rich editing features in Vim. The high level steps Details of these steps are in the OmniSharp-Vim repository. The steps are non-trivial. For each step I've