Follow the video to learn C # ASP. NET First day

Source: Internet
Author: User

Course Highlights:

When the storage path is not found, right-click to open the file location, you can find the path of file storage
VS layout if the adjustment is confusing, click the Window menu, check Reset window layout
Some windows if not found, then in the view to find
. NET is a platform. The inside is a class, a tool, a method
First Console program (Point Run, is a cmd window)
The entry function main function All programs are started with main
Console.WriteLine ();//output one line of words on the screen
Console.ReadLine ();//Request the user to enter a paragraph of text
Console.readkey ();//Request the user to press a key
Console.readkey ();//The only place to use is to prevent the console program from shutting down immediately
Tips for debugging
Set breakpoints and add a breakpoint before each line of code on the left. Click Start Debugging to pause to the place where you set the breakpoint.
Let the user enter a piece of code
String S=console.readline ();//Store a user-typed line of text into a variable of type string (container s)
Console.WriteLine (s);
Console.WriteLine ("{0} hello", s);
The program code is executed from the top down line
C # is case-sensitive, case-sensitive
To enclose a function parameter with ()
Note: Single-line Comments (//), Multiline comments (/*/)

Course Code:

First Console Program

1 usingSystem;2 usingSystem.Collections.Generic;3 usingSystem.Linq;4 usingSystem.Text;5 usingSystem.Threading.Tasks;6 7 namespaceFirst Console program8 {9     class ProgramTen     { One         Static voidMain (string[] args) A         { -            //Console.WriteLine ("Hello, hi!"); -            //string S=console.readline ();//input from console the            //Console.WriteLine (s);//What to enter and what to output on the console -             //with placeholders -Console.WriteLine ("Please enter your name."); -             stringName =console.readline (); +Console.WriteLine ("{0} It's nice to meet you .", name); - Console.readkey (); +         } A     } at}
View Code

Program code runs from top to bottom

usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Threading.Tasks;namespacerun from top to bottom {classProgram {Static voidMain (string[] args) {            inti =3; intj =5; ints = i +J;                Console.WriteLine (s); I=Ten;            Console.WriteLine (s);        Console.readkey (); }    }}
View Code

Follow the video to learn C # ASP. NET First day

Related Article

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.