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} | |
]; |
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 { |
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 |