Beginner. NET

Source: Internet
Author: User

Every time we are learning a thing, I think first we have to understand what it can do why we use it, I am also a beginner, learning with everyone is really a good thing!

My first lesson is learning. NET is starting with cmd, so share my notes with everyone I hope it will be useful to everyone!

1. Cmd is actually the 1 software command prompt that comes with the Windows system.

CMD: There are some programs that can only be run at the command prompt.

CMD's working path: It is the path that is displayed in the front when the CMD program is run.

Common commands for CMD:

1). Dir lists the files and folders under the current working path.

2). Switch the working path:

The CD command changes the working path of the CMD program.

Syntax CD to change the working path.

When switching the work path, you cannot use the CD command if you want to switch across the drive

Write the name of the letter directly and add a 1 colon to it.

For example, I want to switch from C:\windows to D D:

Summary: Different folder switches with 1 drive characters use the CD command

Switch to another drive letter directly using the drive letter name:

The name of the folder or file can be pressed to complete automatically when you press the TAB key 1 and a half.

CD/Will go back to the root directory of the current working path.

3). mkdir---> Make dir to create a folder. Create 1 folders under the current working path

4). RD-to-delete folders can only delete empty folders.

5). del command to delete files

folder and file names when deleting folders and files We can use wildcard notation.

* represents any number of characters.

2. Run window Win+r run

Environment variable PATH: Environment variable path is 1 1.

The effects of these paths:

When we enter the name of the 1 program in the Run window, we determine

The system will look in the directories to see if they have the program, and if you have this program, run it. If the program is not in all the paths, the error is not correct.

If we want our program to start in the window again, then we just need to add the path of the folder where our programs are located.

When we enter the name of the program in the Command Prompt window: The search order at this time: first find out if the current working path has this program. If there is, execute. If not, go to the path.

3. Write C # programs.

A. Preparation: The C # Syntax specification must be done. It doesn't matter if you don't know, because my brother will teach you.

Must be installed on the system.   NET platform. About. NET platform WinXP: not with by default. NET Framework win vista:3.0 win7:3.5 win8:4.0

B. Start writing. NET Programs

1). Use any text editing tool to write the source code that conforms to the C # syntax specification.

2). Change the suffix name of this text file to. cs

Friendly tip: To display the suffix name of the file in the system settings.

xp/win7 My Computer Tools folder option to view the suffix name of the hidden file

About the file suffix name: The file's suffix name does not affect the contents of the file itself.

The suffix of the file determines what software the system uses to open the file.

The suffix name of the C # source file is. cs

3). Use. NET platform provides 1 programs called CSC to compile our C # source files into "executable program"

The path to this program: C:\Windows\Microsoft.NET\Framework\v4.0.30319

In order to facilitate our use of this program we add the directory where this program is located to path.

Switch the CMD's working path to the path where C # source code is located.

Use the CSC C # source file full name. 1 EXE files will be generated under the working path.

This EXE file is the program we wrote to run it

If the source code does not conform to the C # Syntax specification, then the EXE file is not generated at compile time and the cause of the error is indicated.

The C # language is case-sensitive.

----------------------------------------------------------------

Steps for handwriting C # programs

1. Use any text editing tool to write source code that conforms to the C # syntax specification.

C # is case-sensitive.

Write code in a plain English input method

2. Change the suffix of this file to. cs

. CS is the suffix name for C # source files

3. Use. The 1 CSC commands in the net platform compile our source file into an executable program.

A. The path to this program: C:\Windows\Microsoft.NET\Framework\v4.0.30319

This program cannot be run separately and must be run under CMD.

B. In order to facilitate our use of the CSC command in CMD we call the CSC program in the same folder as the environment variable path.

C. Switch the working path of CMD to the path where the C # source file resides.

D. Compile with the CSC command.

CMD input: The full name of the CSC C # source file.

At this point, we're going to generate 1 exe files under the working path. This file is the program we wrote.

Young man run it.

If the code in the source file does not conform to the C # specification, the error will be at compile time. EXE is not generated.

Solution: Change

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.