| class Program | 
| 2 | { | 
| 3 | static void Main(string[] args) | 
| 4 | { | 
| 5 | String s = "HelloWorld"; | 
| 6 | Console.WriteLine(s); | 
| 7 | } | 
| 8 | } | 
| .method private hidebysig static void Main(string[] args) cil managed | 
| 02 | { | 
| 03 | .entrypoint | 
| 04 | // Code size 15 (0xf) | 
| 05 | .maxstack 1 | 
| 06 | .locals init ([0] string s) | 
| 07 | IL_0000: nop | 
| 08 | IL_0001: ldstr "HelloWorld" | 
| 09 | IL_0006: stloc.0 | 
| 10 | IL_0007: ldloc.0 | 
| 11 | IL_0008: call void [mscorlib]System.Console::WriteLine(string) | 
| 12 | IL_000d: nop | 
| 13 | IL_000e: ret | 
| 14 | } // end of method Program::Main | 
| class Program | 
| 02 | { | 
| 03 | static void Main(string[] args) | 
| 04 | { | 
| 05 | String s = "HelloWorld"; | 
| 06 | s = "HelloC#"; | 
| 07 | s = "HelloJava"; | 
| 08 | String s1= "HelloC#"; | 
| 09 | Console.WriteLine(s); | 
| 10 | } | 
| 11 | } | 
| 欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |