Skip to content

Instantly share code, notes, and snippets.

View Pilchie's full-sized avatar
🏠
Working from home

Kevin Pilch Pilchie

🏠
Working from home
View GitHub Profile
/// <summary>
/// אבגדהוז חטיכלמנ סעפצקרשת
/// </summary>
public class ClassWithHebrewSummary { }
class Program
{
static void Main(string[] args)
{
ClassWithHebrewSummary.Equals(null, null);
@Pilchie
Pilchie / gist:5087540
Created March 5, 2013 02:33
Getting variables declared in a session.
using Roslyn.Scripting.CSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
class Program
{
static void Main(string[] args)
{
class Program
{
static void Main(string[] args)
{
var view = new MyView();
view.Bind/*<MyViewModel, MyView, int>*/(view.ViewModel, vm => vm.Prop1, v => v.Prop2);
}
}
class MyViewModel
@Pilchie
Pilchie / DateTimeRoundTrip.csx
Created July 20, 2012 06:59
"RoundTrip" format for DateTime
using System.Globalization;
var dt = DateTime.UtcNow;
var dt2 = DateTime.ParseExact(dt.ToString("o", CultureInfo.InvariantCulture), "o", CultureInfo.InvariantCulture);
Console.WriteLine(dt == dt2);