Skip to content

Instantly share code, notes, and snippets.

@kureikei
Created March 26, 2015 03:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kureikei/31f34932329407e845b9 to your computer and use it in GitHub Desktop.
Save kureikei/31f34932329407e845b9 to your computer and use it in GitHub Desktop.
using System;
using System.Dynamic;
namespace Haiku
{
class Program
{
static void Main(string[] args)
{
ここで.一句
.柿食えば
.鐘が鳴るなり
.法隆寺();
}
}
class ここで : DynamicObject
{
public static dynamic 一句
{
get { return new ここで(); }
}
public override bool TryGetMember(GetMemberBinder binder, out object result)
{
Console.WriteLine(binder.Name);
result = this;
return true;
}
public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result)
{
Console.WriteLine(binder.Name);
Console.ReadKey();
result = this;
return true;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment