Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Threading;
namespace ConsoleApplication1
{
internal class Program
{
private class A
{
~A()
using System;
using System.Globalization;
using System.Runtime;
using System.Threading;
namespace ConsoleApplication1
{
internal class Program
{
// IMPORTANT: run release x64 build without debugging (Ctrl-F5 to launch)
{
"Project": {
"Import": [
{
"_Project": "$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props",
"_Condition": "Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')"
},
{
"_Project": "$(MSBuildToolsPath)\\Microsoft.CSharp.targets"
}
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>738dc7bb-085a-4e4e-80d7-17346ac8379e</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ClassLibrary1</RootNamespace>
using System;
using System.Linq;
using System.Threading;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Extensions;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Loggers;
using BenchmarkDotNet.Reports;
using BenchmarkDotNet.Running;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Reports;
using BenchmarkDotNet.Running;
using NUnit.Framework;

// * Summary * BenchmarkDotNet-Dev=v0.9.3.0+ OS=Microsoft Windows NT 6.2.9200.0 Processor=Intel(R) Core(TM) i5-2550K CPU @ 3.40GHz, ProcessorCount=4 Frequency=3312788 ticks, Resolution=301.8605 ns HostCLR=MS.NET 4.0.30319.42000, Arch=32-bit RELEASE

Type=CompareCallsBenchmark Mode=Throughput TargetCount=10

Method | Median | StdDev | Scaled |

using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
namespace System.Runtime.CompilerServices
{
#pragma warning disable 1591
// ReSharper disable ArrangeTypeModifiers
public static class FormattableStringFactory

CodeAssertions

Intro

What it is?

Code assertions is a set of helper methods aimed to proof your assumptions at runtime.

When should I use it?

Every time you want to be sure your code is working right.

using System;
using System.Diagnostics;
namespace CodeDrafts
{
static class Program
{
struct A
{
public uint a1;