Some bits of code from xna and monogame projects I've worked on