美文网首页
Object-orientation

Object-orientation

作者: 津涵 | 来源:发表于2019-02-02 17:19 被阅读0次

Three most important concepts

inheritance继承
encapsulation封装
polymorphism多态

This means that a C# class can be derived from one other class, and any number of interfaces

Differnences between structs (value types) and classes (reference types)

1)Structs are always derived from System.ValueType. They can also implement any number of interfaces.
2)Classes are always derived from either System.Object or a class that you choose. They can also implement any number of interfaces.

相关文章

网友评论

      本文标题:Object-orientation

      本文链接:https://www.haomeiwen.com/subject/rigssqtx.html