Skip to content

Instantly share code, notes, and snippets.

View bdukes's full-sized avatar

Brian Dukes bdukes

View GitHub Profile

String interpolation

var x = 1;

// same as string.Format("A {0} B", x) 
var y1 = $"A {x} B"; // y == "A 1 B"

// $@ for multiline
var y2 = $@"A
@SCullman
SCullman / Typed Settings Example 1.cs
Last active August 29, 2015 14:22
Typed Settings for DNN
using DotNetNuke.Common;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Entities.Portals;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
namespace AnyNamespace
{
public class ಠ_ಠAttribute : Attribute
{
}
[ಠ_ಠ]
public class Manager
{
// 1000s of lines here
}
@joshuaflanagan
joshuaflanagan / Console command
Created June 1, 2011 22:23
Turn off Always Start When Debugging for all web projects (run within Nuget powershell console)
get-project -all | %{ $_.Properties | ?{ $_.Name -eq "WebApplication.StartWebServerOnDebug" } | %{ $_.Value = "False"} }