Skip to content

Instantly share code, notes, and snippets.

@Manuzor
Manuzor / AccessLevelOverview.cs
Last active January 17, 2018 11:18
Shows the default access levels in C#
namespace Name.Space
{
/* internal */ class TopLevelClass
{
/* private */ int Field;
/* private */ TopLevelClass() { }
/* private */ void Method() { }
@Manuzor
Manuzor / miniwin32.d
Last active December 3, 2017 14:58
Missing implicit `nothrow` when `-betterC` is passed to dmd v2.077.0
/+
Scenario:
Compile this file with dmd v2.077.1 and -betterC and it will complain:
> dmd miniwin32.d -m64 -betterC
.\miniwin32.d(38): Error: function miniwin32.culprit is not nothrow
.\miniwin32.d(32): Error: nothrow function miniwin32.windowCallback may throw
Declaration of WNDCLASSA:
struct WNDCLASSA {
// ...
@Manuzor
Manuzor / fizzbuzz.d
Created May 12, 2015 07:31
FizzBuzz with two conditionals
module fizzbuzz;
import std.stdio : writefln;
import std.conv : to;
void fizzbuzz(int i) {
auto msg1 = i.to!string;
auto msg2 = "";