As a PHP veteran, temporarily received a fire task, help debug a bunch of C # code, I Win8.1 32 bit, install Microsoft Visio 2013 is not installed, install win8.1 comes with IIS6.0,
Installation is successful, dead or alive unable to start the ASP. NET Web site, depending on the prompt service dependent on startup, still cannot start IIS ...
Collapsed. Also put my local mongodb, Apache, MySQL caused the normal start ...
What to do? Can't you debug C # code snippets without Microsoft Visio and IIS?
Not too!
1. First make sure you have installed. NET Framework and then put the. NET directory to the system environment variable, specifically. NET Framework of what version is of little concern
Like mine is C:\Windows\Microsoft.NET\Framework\v4.0.30319.
Then add your C:\Windows\Microsoft.NET\Framework\v4.0.30319 to the WINDOWS system environment variable
2. Build your C # code snippet
Like E:\php\data\localweb , there's test.cs underneath.
Using system;using system.io;namespace Helloworld{public class Hello {static void Main () {StreamWriter SW = File.appe Ndtext ("test.txt"); int i;for (i=1; i<=10; i++) {sw. WriteLine (i); Console.WriteLine (i);} Sw. Flush (); Sw. Close (); Console.WriteLine ("Run End."); Console.readkey ();}}}
3. Compiling your C # code snippet with the. NET CSC command
4. After successful execution, the Test.cs will be generated in your directory Test.exe
Double-click to run your Test.exe
Haha at this time you are debugging success! You can see the result of the code running!
Bonus:
The generated test.txt, if you want to count the contents of the test.txt, how many times different values appear, and in the order of many to few, here is the following code snippet for friendship:
<?php$temp = array_count_values (file (' Test.txt ', file_ignore_new_lines)); Arsort ($temp); Var_dump ($temp);
To PHP Programmers: Fast execution of C # code Snippets fast running C # code debugging C # C # write people file operations