-
-
Save kureikei/31f34932329407e845b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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