Computer is rigid fixed, people are active open, beginner C # The first day to give me the feeling is: employing active open-minded thinking to the computer to communicate with, find temper, conducive to both sides in-depth cooperation, which is the lesson tonight, careful, careful, bold
C # Basics
1, hello! World!!!
1 { // output hello! world!!; 2 Console.WriteLine ("hello! World!!! " ); 3 // prevent flash-back; 4 console.readline (); 5 6 }
Take the first step into the IT world and say hello to the world
2. String definition variable
Apply to the eldest: string A, B, C, D; is to open up four completely separate spaces in the memory space to hold the strings. This is the simplest, most intuitive and easy to understand.
Assigning values to variables
It can be that way
1 {2 stringA, B, C, D;3A= ("9527");4B= ("1314");5C= ("0000");6D= ("5555");7 Console.WriteLine (a);8 Console.WriteLine (b);9 Console.WriteLine (c);Ten Console.WriteLine (d); One A - -Console.ReadLine ();
It could be that way.
1 {2 //Output: Please enter your name:;3Console.Write ("Please enter your name:");4 //assigns a value to the information you enter;5 stringA =console.readline ();6 //outputs the information corresponding to A;7 Console.WriteLine (a);8 //prevent flash-back;9 console.readline ();Ten One}
Make the simplest analogy: a mountain you want to open a hole to store goods or in the mountains to build something, then you need to dig out a mountain or a few caves, and then in the mountain to store or build your own things, or you can not enter, then according to this logic:
1 {2 //Defining Variables3 stringA, B, C, D;4 //Output: Please enter your name:;5Console.Write ("Please enter your name:");6 //assigns a value to the information you enter;7A =console.readline ();8Console.Write ("Your Hobbies:");9b = Console.ReadLine () + ("? ");TenC= ("That 's a coincidence! "); OneD= ("my hobby is similar to you, I like the house most!!! "); A //assign a value to a -A = ("Hello,") +A; - //outputs the variables corresponding to the a,b,c,d; the Console.WriteLine (a); - Console.WriteLine (b); -Console.Write (c+d); - + - //prevent flash-back; +Console.ReadLine ();
3, int int. The most basic understanding of parse
int is the arithmetic that subtraction the computer to run the numbers.
1 {2 intA, B, C;3A =1;4b =2;5c =6;6 intD = A + B +C;7 intE = b *C;8 intF = C-A;9 intg = c/b;Ten One Console.WriteLine (d); A Console.WriteLine (e); - Console.WriteLine (f); - Console.WriteLine (g); the -Console.ReadLine ();
2017-2-17,c# base, input and output, define variable, variable assignment, int. The basic understanding of parse, in this beginner can also read (not to be continued)