Skip to content

Instantly share code, notes, and snippets.

View ajpinedam's full-sized avatar

Andres Pineda ajpinedam

View GitHub Profile
@ajpinedam
ajpinedam / HttpServer.cs
Created December 12, 2023 03:22 — forked from define-private-public/HttpServer.cs
A Simple HTTP server in C#
// Filename: HttpServer.cs
// Author: Benjamin N. Summerton <define-private-public>
// License: Unlicense (http://unlicense.org/)
using System;
using System.IO;
using System.Text;
using System.Net;
using System.Threading.Tasks;
@ajpinedam
ajpinedam / Calculator.cs
Created October 6, 2024 22:38 — forked from klmr/Calculator.cs
Workaround for missing numeric type constraints in C# — https://stackoverflow.com/q/32664/1968
using System;
using System.Collections.Generic;
namespace OperatorTest {
public interface ICalculator { }
public interface ICalculator<T> : ICalculator {
T Add(T a, T b);
T Divide(T a, T b);
T Multiply(T a, T b);