This is still a draft.
?
Simba College: a fair and aboveboard.
The National Day holiday ended, my mood is this:
You always get up early and don't get up early.
Sleeping alone till Dawn
You dream of that copy with no regrets.
I know you don't even want to go to work.
You always get up early and don't get up early.
Holiday is always short, work is too difficult
Take a sick leave and sleep another day.
Today we talk about C # functions and encapsulation
You have a lot of information on this topic, everyone who has written code and who has not written the code knows these things.
And I don't have a lot of new angles, remember this first.
It's not math, it's not math, it's not math.
I contacted the earliest language is basic, at that time the function is not so popular, not the visual Basic,dos era contact. There are some system functions can be called, their own small program is less than the definition of functions, perhaps can not be defined, anyway, I learned that would be completely unaware.
What about basic? Isn't this a C # article? Just to tell you that there was a language that was not so dependent on functions and encapsulation, functions are not required. But C #, or C-system language, is based on functions and encapsulation. So you might think, what about a code that doesn't have to function or encapsulate? The past basic has a line number that can be goto one line and then execute. We rely on this goto, dividing the code into chunks and jumping around.
This is essentially a package without grammatical guarantees, essentially a function. In C language, you can also use Goto, actually compiled into machine language, it is goto to Goto.
To organize a function together is called encapsulation. A function that specifically marks a function as a piece of the syntax of a program.
Each line of code is your precious asset, such as clothes, two or three pieces of time, you can just put it there. Dozens of pieces of time, not sorting out a bit of trouble. Hundreds of pieces, you may have to split the room before the racks.
This requirement is the demand for encapsulation, which is naturally occurring as the complexity of the system increases.
If you do not feel the need for a moment, then do not consider the research function, research encapsulation, first to use a function to write the entire program, has been so, has been so. You can also become a unique programmer if you don't feel the need for encapsulation in the end.
Simba College-unity-you 0 basic C # series (iv) Functions and encapsulation