View gist:c2a69c7f40eae8e044f24f11d9ce8df3
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 BCE.AutoCount.POS.Maintenance.Member; | |
using System.Windows.Forms; | |
using System.Reflection; | |
using System.ComponentModel; | |
public void OnFormInitialize(FormAddMember.FormInitializeEventArgs args){ | |
var eventStaticNameProp = typeof(Control).GetField("EventKeyDown", BindingFlags.Static | BindingFlags.NonPublic); | |
var eventStaticName = eventStaticNameProp.GetValue(args.Form); | |
var eventsProp = args.Form.GetType().GetProperty("Events", BindingFlags.NonPublic | BindingFlags.Instance); | |
EventHandlerList list = (EventHandlerList)eventsProp.GetValue(args.Form, null); |
View Program.cs
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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace TupleBenchmarking | |
{ | |
using System; | |
using System.Collections.Generic; |
View regex benchmark
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
private static void Main() | |
{ | |
Console.ReadLine(); | |
Console.WriteLine("Hello, world!"); | |
Console.WriteLine("Usage: benchmark <filename>"); | |
string data = DataIsFuxxkingBig(); | |
Measure(data, new Regex(@"[\w\.+-]+@[\w\.-]+\.[\w\.-]+", RegexOptions.Compiled) ); |