Skip to content

Instantly share code, notes, and snippets.

View BillWagner's full-sized avatar
🎸
Working a normal schedule again

Bill Wagner BillWagner

🎸
Working a normal schedule again
View GitHub Profile
@BillWagner
BillWagner / enumerable.cs
Created September 22, 2021 17:12
IEnumerable with index
IEnumerable<string> Sequence()
{
yield return "Speak to Me";
yield return "Breathe in the Air";
yield return "On the Run";
yield return "Time";
yield return "The Great Gig in tAccessViolationExceptione Sky";
yield return "Money";
yield return "Us and Them";
yield return "Any Colour You Like";
@BillWagner
BillWagner / 01-get-started-toc.md
Last active March 29, 2021 14:35
1. C# TOC: Get started node
@BillWagner
BillWagner / 02-whats-new-toc.md
Last active January 29, 2022 10:45
2. C# TOC: What's new
@BillWagner
BillWagner / program.cs
Last active July 14, 2020 14:47
Program to update section references in the C# standard (markdown version)
using System;
using System.Linq;
using System.IO;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Text;
// Consider using the default anchors.
// These anchors are of the form "-1723-arrays-and-the-generic-collection-interfaces"
@BillWagner
BillWagner / new-toc.md
Last active August 29, 2019 01:11
Proposed new TOC for the C# Guide

Notes

Important: This is a point-in-time snapshot of background work used to create a formal plan. The updated issues in the docs repo more accurately reflect the plan.

Using this resource:

  • Consider the H2s as a good roadmap for where content should go.
  • Consider lower level headers inasmuch as they show where existing articles will move over time.
  • Articles will be combined and archived to keep the C# guide current.
@BillWagner
BillWagner / program.cs
Created January 30, 2018 15:25
Equality and Symmetry
using System;
namespace symmetry
{
public class Person : IEquatable<Person>
{
public string FirstName {get;set;}
public string LastName {get;set;}
public bool Equals(Person other)
@BillWagner
BillWagner / main.cs
Last active December 12, 2017 16:04
using System;
using System.Threading.Tasks;
public class Example
{
public static async Task<int> Main()
{
Console.WriteLine("Calling DoWorkAsync");
var taskResult = DoWorkAsync(-5);
@BillWagner
BillWagner / git_profile.sp1
Created October 10, 2017 19:34
Load Posh-Git from GitHub desktop in every powershell instance
"Loading PoshGit..."
. (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1")
. $env:github_posh_git\profile.example.ps1
@BillWagner
BillWagner / funcyCSharp.cs
Created May 2, 2017 21:16
local functions and lambdas and expressions, oh my
static void Main(string[] args)
{
Func<int> foo = () =>
{
int M1()
{
return 19;
}
return M1() + M2();