Snippet Compiler
Snippet compiler is based on windows? You can use it to compile, compile, and run code. This tool is useful if you have a small code segment and you do not want to create a complete Visual Studio. NET project (and all files that accompany the project) for it.
Note: Visual Basic versions earlier than 6.0 can run and debug without saving project files, which is very convenient. This feature is useful when writing a small program temporarily. After Visual Studio. NET, you have to create and save many files like Visual C ++, even for a very small project. However, it is said that this feature will be restored after Visual Studio 2005 Express, which sounds great.
For example, suppose I want to explain how to use Microsoft ?. . NET Framework to start another application. In snippet compiler, I will start by creating a file that can create a small console application. You can create code snippets in the main method of the console application, which is exactly what I want to do here. The following code snippet demonstrates how to create a notepad instance from the. NET Framework:
Using system;
Using system. collections;
Public class myclass
{
Public static void main ()
{
System. Diagnostics. Process proc = new system. Diagnostics. Process ();
Proc. startinfo. filename = "notepad.exe ";
Proc. Start ();
Proc. waitforexit ();
}
}
Of course, the code snippet itself cannot be compiled, and this is exactly where snippet compiler is used. Figure 1 shows the sample code in snippet compiler.
Figure1Snippet Compiler
To test the code snippet, you only need to press the play (run) button (green triangle) and it will run in debug mode. This code snippet generates a pop-up console application and displays notepad. When you close notepad, the console application is also closed.
Personally, when I try to create a small example for someone who asks for help, I find that snippet compiler is so valuable-if you do not use this tool, I usually have to create a new project to make sure that each part can be compiled, then send the code snippet to the helper, and delete the project. Snippet compiler makes the process easier and more enjoyable.
Snippet compiler is written by Jeff key and can be downloaded from the http://www.sliver.com/dotnet/SnippetCompiler.
Go to the. NET programmer's ten essential tools-directory