This chapter describes the basic syntax of C #, such as the structure and code of the first class and the block structure of the statement. Next we will introduce the annotation writing method and the use of preprocessing commands.
With these basic knowledge, we will begin to explain the declaration, initialization, and usage of variables. Next, we will discuss the Data Types of declarative variables, the security of data types, and the conversion between data types, and then introduce operators because of the calculation between variables. Next we will explain how to use logical operators to transition to branches and loops.
This chapter seems to have many pages, but in fact it mainly includes some basic knowledge and VS usage methods and techniques. Therefore, you must be familiar with VS tool application while learning all the knowledge points.
Knowledge Review
Lao Tian: In the first chapter, we explained the concept of. NET Framework and the composition of. NET Framework, as well as the basic operating mechanism of. Net applications. Next I explained the features of C #, and finally made two simple and interesting. Net applications. Here are a few questions to test you:
1. What is the full name of CLR? What is the role?
2. How to modify the Text attribute of the control?
3. What is the solution directory?
Xiaotian: these three questions are too simple. I have taken notes. Next I will give you a separate answer
1. The full name of CLR is "RunTime in general language", and commondomainageruntiome in English;
2. Modify the Text attribute of the control directly in Visual Studio. Right-click the control and modify the Text item in the property.
3. The solution directory is actually a container used to put all projects and resource files of a project or solution in one physical location. Use "solution name. sln" to open the entire solution.
I have understood these questions, but I am confused about the last project. Although 90% of the Code is automatically generated by Visual Studio, I am a little confused about the only few sentences. In particular, why is the Text attribute of the button in the second WEB application executed in the Page_load event? Why is the Text attribute of the Label1 control executed only after the button is clicked?
This article is a new one. For more information, see the source and author!