A lot of things are unsatisfactory and I feel so tired. sometimes I think about what it is for, but I still have to continue learning. I hope I can stick to it and I will be able to learn C # After graduation next year.
Int/double/string variable = Console. ReadLine ();
Int/double/string variable 1 = Convert. ToInt32 (variable );
The above two programs are equivalent to the following programs.
Int/double/string variable 1 = Convert. TOInt32 (Consol. ReadLine (); ------ enter the variable and Convert it to the corresponding type and assign the variable value to variable 1.
This statement converts the input characters to be converted to the int, double, or string type and then assigns them to the variable.
Convert. ToInt32 (); Convert to 32-Bit Signed int type.
Try
{
Conversion error may occur.
}
Catch
{
If an exception occurs in try, it is transferred to catch.
}
C # exception capture method.
Main (name = chinese = math = english = Console. WriteLine (, name, chinese + math + english, (chinese + math + english )/View Code Main (Console. writeLine (seconds = days = seconds/(* remainSecond = seconds % (*); hour = remainSecond/; remainSecond = remainSecond %; min = remainSecond/; second = remainSecond %View Code
Escape Character: \ n newline \ t Tab
\ B backspace \ output "\"
@ Adds an @ symbol to the front of the string, which has two meanings: (1) if \ is in the string, it is not understood as an escape character. (2) The string can be wrapped in a line break.