Skip to content

Instantly share code, notes, and snippets.

@GrantByrne
GrantByrne / Program.cs
Created Aug 18, 2015
Otter2D Getting Started
View Program.cs
using Otter;
namespace TumblrGame
{
class Program
{
static void Main(string[] args)
{
Game game = new Game("Tumblr Game", 1000, 750);
game.Start();
@GrantByrne
GrantByrne / UserValidator.cs
Created Apr 24, 2014
Using Fluent Validation with WPF - Dead Simple
View UserValidator.cs
using System.Text.RegularExpressions;
using FluentValidation;
using WpfFluentValidationExample.ViewModels;
namespace WpfFluentValidationExample.Lib
{
public class UserValidator : AbstractValidator<UserViewModel>
{
public UserValidator()
{
View AverageColor.cs
class Program
{
static void Main(string[] args)
{
ILitmus litmus = new DirectxColorProvider();
// Get the Average Color of the Screen
LitmusColor color = litmus.GetAverageColor();
Console.WriteLine("Red:{0}\nGreen:{1}\nBlue:{2}\n", color.Red, color.Green, color.Blue);
View FileStorageService.cs
using Newtonsoft.Json;
using System.IO;
namespace SweetShowRenamer.Lib.Service
{
public class FileStorageService<T>
{
/// <summary>
/// Gets the object serialized in a file on the machine
/// </summary>