using system.reflection; static void showenvironmentinfodemo() { type type = typeof(environment); propertyinfo[] pis = type.getproperties(); if (pis != null && pis.any()) { parallel.foreach(pis, x => { console.writeline($"name:{x.name},value:{x.getvalue(x)}"); }); } }
static void consolewindowdemo() { try { type type = typeof(console); propertyinfo[] pis = type.getproperties(); if (pis != null && pis.any()) { parallel.foreach(pis, x => { console.writeline($"name:{x.name},value:{x.getvalue(x)}"); }); } } catch { } }
static void maximizeconsolewindow() { console.setwindowsize(console.largestwindowwidth, console.largestwindowheight); }