C sharp programming for absolute beginners

来源:互联网 发布:金太阳炒股软件下载 编辑:程序博客网 时间:2024/04/29 17:48

In C# programming, you have code inside methods, which are inside classes, which are inside namespaces

In the .NET environment (of which C# is a primary language) are layers of code that go from general to specific. The outer, most general, layer is the namespace. Inside a namespace, you find

a series of classes, which contain methods, which contain statements.

Think of the layers as something like an address on an envelope. When you address an envelope, you write specific information, such as the house number. You also put the street name, which is more general, and the state, which is broad. The post office can deliver your letter by

getting it to the correct state, then the correct city, then the right part of the city, and finally the specific house. Namespaces in the C# language work very much like this.

A namespace is usually made up of one or more classes. A class is a definition for a specific kind of object.

Anything a computer can describe (a database, a file, an image, a cow, whatever) can be encoded

as an object. The things an object can do are called its methods, and the characteristics of an object are called its properties.

 

 

 

 

 

原创粉丝点击