Horizontal reuse in JavaScript and C#