Structural (struct) and class (Class)

xiaoxiao2021-03-06  49

1. Struct is the value (Value) type, as a method, the parameter transmission of the function, copies a copy transfer, the result will not change the original value; Class (Class) will; 2, struct has no inheritance, but There is an interface, you can't undertake (Subcaround), you can't be used as a base class; 3. Struct can use new, the class must be used;

转载请注明原文地址:https://www.9cbs.com/read-110211.html

New Post(0)