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