Java Attack c#--development Environment

Source: Internet
Author: User

Before you enter this Chapter. I would like to say a few words. For the author to speak of language is not good or bad. Only if it is not suitable for use. When the last article was sent to the homepage, I suddenly found that there might be a controversy. This is the Author's concern, which I do not want to see. The reason why I want to write this series is not to show which language is good or bad. But to help those who might be like me before in Java Development. Suddenly want to see C #. Or go out and start a business. discover the people of C # for the current company. I hope the readers will understand the purpose of the Writer. At the same time I am also afraid of trouble, so this series of articles I will not put on the home page. The back will be sent to the first candidate Area. Not even this will not let the author publish it. It shouldn't be.

This chapter is a brief statement

In the previous chapter, I opened a head for this series, learned the learning route and knew the development tools to Use. In general, when learning new computer languages, I will ask what development tools are used in this Language. So this chapter will look at the development tools of C # in Microsoft Visual Studio. Originally I wanted to go into the solution of how to install Microsoft Visual Studio. But also think that everyone will know how to install it. A handful of Microsoft Visual Studio software on the Web. Downloading is the next Step. Then the Author's learning environment is on The. NET Framework 4.0. It is also said that the author only explained to the 4.0 version of the Syntax. Software tools are used by Microsoft Visual Studio 2013.

Development environment

After installing the Software. The first time you open Microsoft Visual studio, The software will let you choose the appropriate development language. Why would you let people choose? primarily, Microsoft Visual Studio is just a development platform for. Net. It has nothing to do with computer language. there are several languages Under. NET. Among them are F #, vb.net, c #, C + +, and so On. So be sure to choose c #. Let's take a look at the development surface interface of Microsoft Visual Studio. As follows

Note: If Solution Explorer is not found, look in the menu "view" at the top of Microsoft Visual Studio.

I did not want to introduce Microsoft Visual Studio too much at the Beginning. I think there are two interfaces commonly used in general Development. One is the Toolbox view on the left (for WinForm development). One is the Solution Explorer (most commonly used) on the right. Equivalent to the Project Explorer view inside Eclipse. The "file" menu in the upper right corner is the entrance to the new Project. No matter what it looks like. Let's create a new Helloexample project to learn about the development Environment. Clicking on the File New project will bring up the "new project" selection box. As follows

Let's look at the contents of the New Project selection box First. You can look at the tree menu on the left. the "templates" section below will let you choose the Language menu for your new project. We are mostly stuck in Visual C # this part. The next step is to select the corresponding development type. is Pc-side development or web Development. Pc-side development is also divided into the console and Winform,window services (this author has a little doubt: count not the PC side). Give me an Example.

Console: A typical cmd command comes out of the WINDOW. (equivalent to Java Project)

WINFORM:360 Defender Software. (equivalent to Java's AWT and swing Programming)

Window service: Background services for SQL Server 2008. (i have not developed it.)

Because it is the learning stage, I will use the Console. That is. The following section of the new project selection box is used to fill in the naming (name) and save path (location) of the new Project. It's worth noting that the last one is called the solution Name. Let's fill out the project name First. When you fill out the project name "helloexample", readers should find that the solution name will follow along with the discovery of the Change. Don't touch it First. Just Look. Click "ok". All right! New Success. Under

In the above I have mentioned the solution, then what is the solution? I am not sure if readers have developed projects that are composed of multiple project Projects. I use eclipse more when I do Java Development. Remember that time I was developing a large web site for medical Schools. So the project is made up of many project Projects. Suddenly the supervisor asked me to maintain a project for another group. This time the Author's physical working directory is very messy. In order to let the author clear Points. The author creates a new folder for medical schools under the working directory. Pull all the corresponding project projects IN. Another group of projects is the same Approach. This time the folder is a bit similar to the Solution. this means that the solution is a project container with multiple project Projects. The author is defined in this way. In addition, because of the two project reasons, but also by the Multi-Project project Composition. The Project Explorer view of Eclipse becomes MESSY. Sometimes it is unclear which project the project project belongs to. The author is not any way. Only two eclipse can be opened. of course, I've also tried to see if Microsoft Visual Studio can open multiple solutions in a single development interface. Excuse me! The author Failed.

The solution can actually be built independently and then in a new project. So what does it do? In the new project selection box, under the tree menu "Visual C #", There is one called "other project types". If you open it, you can find the corresponding new Solution. As follows

After the solution has been created Successfully. Want to add a project to the new solution? Just select the new Solution. is also the scenario name in the Solution Explorer View. This is the red circle in the upper right image. Right-click the current solution Add new project to enter the previous "new project" selection box.

Solutions and projects after the new completion, we still have to look at their physical files on the waiter what is it? This is convenient to study later. Take the previous project "helloexample" to see it.

The solution will generate a file with The. sln Extension. At the same time, you will build a solution name the same as the root directory (helloexmape). If you want to see someone else's Project. Just click on the file with the SLN extension as you Want. If it was eclipse, it would be import. I believe we all KNOW. The Helloexmape folder under the root directory (helloexmape) above is Project Engineering. Let's go inside and check it Out.

As you can see above, there are class files, bin folders, obj folders, files with the csproj extension, propertise folders.

Class file: is the corresponding source code File. Like a *.java file. Just here, Java becomes cs.

Bin folder and obj Folder: The former is the source of the generated files after the debug mode is run, which is the source of the generated files after running in release Mode. That is the equivalent of telling Microsoft Visual Studio whether you want to debug or Publish. Embodied in the middle of the top of Microsoft Visual Studio and started Together.

Files with the csproj extension: the suffix of the project project in Java I believe everyone knows it. Such as. Project. Is the information used to record project Projects. It just turned out to end with CSPROJ.

Propertise folder: manifest.mf file you should know. Is the Java inside the Meta-inf clip has a bit like. Inside the AssemblyInfo file is equivalent to Manifest.mf.

After understanding the development environment above, we will try to start it. But I still want to write a word to print Hello World.

1 usingSystem;2 usingSystem.Collections.Generic;3 usingsystem.linq;4 usingsystem.text;5 6 namespaceHelloexample7 {8     class program9     {Ten         Static voidMain (string[] Args) one         { a             Console.WriteLine ("Hello world"); -         } -     } the}

In addition to the print Hello World. It is the Author's own writing, the other is Generated. so, the explanation of the Code. The Zhangche later Spoke. This chapter is mainly about learning the development environment. Click Start in the top section of Microsoft Visual Studio. The default is run in debug Mode. You can also choose a Shortcut. Please press F5 or ctrl+f5. The difference is that after the Ctrl+f5 is running, the window is closed after a click. The F5 is switched off after it has been Run.

Above is successful startup, the Bin folder corresponds to the generated file. In fact, as long as the EXE file can Be. The PDB file is a post-compilation message. This includes the line number of the Code. The following xxx.vshost.exe is related to this Microsoft Visual Studio.

This chapter summarizes

This chapter is primarily a preliminary look at the development environment for LEARNING. of course, the environment is not only the author's introduction of so Much. Only wait until later to be Useful. The author is in the Introduction.

Java Attack c#--development Environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.