BigFont Blog
  • Home
  • About
  • Bibliography (Work)

c#

A collection of 7 posts

Check whether two C# builds result in binaries that are functionally identical (within reasonable limits).
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

  • Shaun Luttin
    Shaun Luttin
1 min read
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

  • Shaun Luttin
    Shaun Luttin
1 min read
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

  • Shaun Luttin
    Shaun Luttin
1 min read
What is a .NET Mutex?
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

  • Shaun Luttin
    Shaun Luttin
1 min read
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(

  • Shaun Luttin
    Shaun Luttin
1 min read
ReSharper Code Cleanup from the Command Line
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

  • Shaun Luttin
    Shaun Luttin
1 min read
Vim with C#.NET Core and OmniSharp-Roslyn on Windows
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

  • Shaun Luttin
    Shaun Luttin
2 min read
BigFont Blog © 2022
Latest Posts Ghost