Skip to content

Instantly share code, notes, and snippets.

@jaredpar
jaredpar / is-reproducible.cs
Created Jan 13, 2021
Program to check if files were compiled with the determinism flag
View is-reproducible.cs
using System;
using System.IO;
using System.Linq;
using System.Reflection.PortableExecutable;
foreach (var filePath in args)
{
using var stream = File.OpenRead(filePath);
var peReader = new PEReader(stream);
var any = peReader.ReadDebugDirectory().Any(x => x.Type == DebugDirectoryEntryType.Reproducible);
@Gutek
Gutek / C# Version Cheat Sheet.md
Last active Aug 6, 2020
Short cheat sheet of changes in C# language from version 6 to 9
View C# Version Cheat Sheet.md

CS 6

read-only auto properties

Small help with immutable types...

// private readonly int _age;
// public int Age { get { return _age; } }
public int Age { get; }
@EgorBo
EgorBo / SSE4.1 and AVX2 in .NET Core 2.1.cs
Last active Nov 18, 2019
SSE4.1 and AVX2 in .NET Core 2.1.cs
View SSE4.1 and AVX2 in .NET Core 2.1.cs
using System;
using System.Linq;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
namespace ConsoleApp29
{
public class Program