Skip to content

Instantly share code, notes, and snippets.

View stoora's full-sized avatar

Belhassen Chedly Bouteraa stoora

View GitHub Profile
@aethercowboy
aethercowboy / ExampleGame.cs
Last active June 26, 2025 22:30
Monogame with IHostedService DI
public class ExampleGame : Game, IGame
{
public Game Game => this;
private readonly ISomeDependency _someDependency;
public ExampleGame(ISomeDependency someDependency)
{
_someDependency = someDependency;
}
@jrusbatch
jrusbatch / AvailablePorts.cs
Created December 5, 2012 02:17
Find an Available Port with C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.NetworkInformation;
using System.Net;
namespace AvailablePort
{
class Program