After a few sections, I am very lazy, I have to find a time to make up ...
1. Strong type
Refers to a variable whose type is explicitly specified when it is defined. Such as:
string S;
int x;
2. Weak type
The type is determined only when the value is assigned.
var s;
var x;
Dynamic type
ViewBag;
personally think : The advantage of using a strong type is that you can point out the fields inside, without needing you to go to the database to view, or write a typo paragraph
Below I create a project
Here, I'm not connected to the database test (a little trouble, the principle is OK) Create class Save
and call it out.
I'm not using viewbag here.
But it's like he's making a mistake.
。。。 Hit the face.
Must be to include
... I don't really have a good idea.
Help!!!
Create a class, how to use a strongly typed
Always said not to contain getnumerator
Anyway
It's settled.
You can also show the values in the class.
19: MVC Strong Type declaration