[Eclipse Notes] Just for Fun - Compile and run C # code under Eclipse

xiaoxiao2021-03-06  21

Just for fun, let's look at an Eclipse C # plugin, which is developed and maintained by a French company IMPROVE TECHNOLOGIES, currently supporting Eclipse 3.0 and .NET Framework 1.1.

First, we need to install .NET Framework SDK and Eclipse in this unit.

Next we download and install and install and install the plugin through Eclipse and a desktop: Workbench in Eclipse -> Software Updates -> Find and Install ..., select Search for New Features To Install, select Step, click New Remote Site ... Enter a name and the following URL:

Http://www.improve-technologies.com/alpha/updates/site.xml

Tap, then Eclipse will start loading the above XML document and finds related information. It should be noted that this site.xml actually contains other plugins of IMPROVE TECHNOLOGIES, we don't need it. In the next Search Results page, we only use the entry of C Sharp. After selecting FINISH, this time Eclipse will start installing this plugin. After completion, you will prompt whether to restart Eclipse, and select it.

After restarting Eclipse, we make the final configuration. Open Window -> Preferences, we can see new C # Preferences, you can specify C # compilers and locations, such as: C: /Windows/Microsoft.Net/framework/v1.1.4322/csc.exe

Take a lot, let's test.

Create New-> Other in the project, or use shortcut ctrl n, select C # file of the C # Directory Create a new C # file, enter some test code, select save, then the default will automatically compile this file. We can see the information of the compiler in the% csharpconsoleview below. If everything goes well, you will come out in our Project Directory, you can double-click this EXE file, our C # program can run. Supplementary description: We can right click on the CS file, select Properties (Alt Enter) to specify the output file type and other command line parameters.

The features implemented by this plug-in are actually quite limited. Basically just use existing Compiler, then simplify some operations, then have some Syntax Highlight's features, even combined with Compiler's simple error prompts. But it is not a fun plugin.

The code I use as the test is as follows:

Using

System;

Namespace

Mainnamespace

{Public class mainentry {public static void main () {// add your code Here console.writeline ("to test c # plugin in eclipse); for (int i = 0; i <10; i ) {console. WriteLine ("#" i "#");} console.readline ();}}} Just for Fun.

Use this plug-in to do some simple verification and ideas, if you really want to choose a free C # IDE to do development, I think I will consider SharpDevelop.

转载请注明原文地址:https://www.9cbs.com/read-43929.html

New Post(0)