Method (computer programming) 方法 (电脑科学)
(重定向自Member function)
A method (or message) in object-oriented programming (OOP) is a procedure associated with an object. An object is made up of data and behavior, which form the interface that an object presents to the outside world. Data is represented as properties of the object and behavior as methods. For example, a Window
object would have methods such as open
and close
, while its state (whether it is opened or closed) would be a property.