Skip to content

Instantly share code, notes, and snippets.

Marc Symonds MarcSymonds

Block or report user

Report or block MarcSymonds

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
MarcSymonds / MultipleEnumerators.cs
Created Apr 24, 2017
C#.Example - Multiple enumerators within a class to enumerate in multiple ways
View MultipleEnumerators.cs
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
/// <summary>
/// Example of multiple enumerators within a class so that you can enumerate through values
/// hosted by the class in different ways. In this example, one enumerator allows you to go
MarcSymonds / ConvertToRomanNumerals.js
Created Apr 25, 2017
JavaScript.Example - Convert a number to Roman numerals. Only works effectively up to 9999.
View ConvertToRomanNumerals.js
function convertToRoman(num) {
var romanNumerals = [
{number: 1, numeral: "I", sub: 0},
{number: 5, numeral: "V", sub: -1},
{number: 10, numeral: "X", sub: -2},
{number: 50, numeral: "L", sub: -1},
{number: 100, numeral: "C", sub: -2},
{number: 500, numeral: "D", sub: -1},
{number: 1000, numeral: "M", sub: -2}
MarcSymonds / MultipleIndexers.cs
Last active Jun 7, 2019
C#.Example - Multiple indexers within a class
View MultipleIndexers.cs
using System;
using System.Collections.Generic;
/// <summary>
/// Example of multiple indexers within a single class.
/// Why you might want/need to do this, who knows?
/// </summary>
namespace CSharp_Examples {
You can’t perform that action at this time.