Home > Backend Development > C#.Net Tutorial > What are the characteristics of static member functions?

What are the characteristics of static member functions?

Release: 2020-03-07 15:47:34
Original
4874 people have browsed it

What are the characteristics of static member functions?

Characteristics of static member functions:

1. They are shared by all objects of the class and do not belong to a certain object. It can be called directly through the class name::.

2. Compared with ordinary member functions, there is no hidden this pointer as a parameter. This can be used to encapsulate thread classes.

3. Static member functions can only access static member variables.

4. Static local variables are saved in the global data area instead of on the stack. Each value is kept until the next call until a new value is assigned next time.

The above is the detailed content of What are the characteristics of static member functions?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template