How can we help you today? How can we help you today?
jackjoy
Another example: [IL code] .method private hidebysig static string GetArchestraCommonPath() cil managed { // Code size 56 (0x38) .maxstack 3 .locals init (string V_0, class [mscorlib]Microsoft.Win32.RegistryKey V_1, class [mscorlib]System.Exception V_2, string V_3) .try { IL_0000: ldsfld class [mscorlib]Microsoft.Win32.RegistryKey [mscorlib]Microsoft.Win32.Registry::LocalMachine IL_0005: ldstr "SOFTWARE\\ArchestrA" IL_000a: ldc.i4.0 IL_000b: callvirt instance class [mscorlib]Microsoft.Win32.RegistryKey [mscorlib]Microsoft.Win32.RegistryKey::OpenSubKey(string, bool) IL_0010: stloc.1 IL_0011: ldloc.1 IL_0012: ldstr "CommonPath" IL_0017: callvirt instance object [mscorlib]Microsoft.Win32.RegistryKey::GetValue(string) IL_001c: castclass [mscorlib]System.String IL_0021: stloc.0 IL_0022: leave.s IL_0034 } // end .try catch [mscorlib]System.Exception { IL_0024: stloc.2 IL_0025: ldloc.2 IL_0026: callvirt instance string [mscorlib]System.Exception::get_Message() IL_002b: call void [System]System.Diagnostics.Trace::Write(string) IL_0030: ldnull IL_0031: stloc.3 IL_0032: leave.s IL_0036 } // end handler IL_0034: ldloc.0 IL_0035: ret IL_0036: ldloc.3 IL_0037: ret } // end of method GalaxyManager::GetArchestraCommonPath [C# code] private static string GetArchestraCommonPath() { string str; try { str = (string) ((string) Registry.LocalMachine.OpenSubKey(@SOFTWARE\ArchestrA, false).GetValue("CommonPath")); } catch (Exception exception) { Trace.Write(exception.get_Message()); return null; } return str; } / comments
Another example: [IL code] .method private hidebysig static string GetArchestraCommonPath() cil managed { // Code size 56 (0x38) .maxstack 3 .locals init (string V_0, class [mscorlib]Micros...
0 votes