prog.lang | Programming.C#

神人

以C#自行開發編譯器 (Compiler DIY)

using 
 * Reflection to hack in the AuthManager into a private field.
var t = typeof(RunspaceConfiguration);
var f = t.GetField("_authorizationManager", BindingFlags.Instance | BindingFlags.NonPublic);
f.SetValue(_currentRunspace.RunspaceConfiguration, new DummyAuthorizationManager());

STRING SPLIT
string source = "a,b, b, c";
string[] items = source.Split(new char[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries);