C # Object-oriented

Source: Internet
Author: User

First, why the need for object-oriented:

Before object-oriented, structured programming is the mainstream of program design, which is called "process-oriented" programming.

A process-oriented approach to development typically has the following issues:

1. Poor reusability of software

2. Poor maintainability of software

3. Poor software flexibility

Object in object-oriented programming is a data structure with state (attribute) and behavior (method), which is used to describe something in the real world and model things in the real world.

Ii. the relationship between objects and classes:

Class: An abstract definition of a thing;

Object: An objective concrete thing.

2.1. Creating classes and objects

     declaration class: class className//< category name >

{

fields< fields >

methods< methods >

properties< Properties >

}

    created object:className object=new Constructor (parameter list);

Class Name Object name construction method ()

C # Object-oriented

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.