本文介绍了Private Sub,Function和Class之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下各项之间有什么区别:
What are the differences between the following:
- Private Sub
- Private Function
- 私人舱位
何时应使用每一个?
推荐答案
私有是一个修饰符,它给出了类,子或函数的范围。
Private is a modifier than gives the scope of the class, sub, or function.
一个子和函数都是子例程,或者是可以在程序中调用的代码部分。它们之间的区别在于,一个函数有一个返回值,而一个子函数没有返回值。
A sub and a function are both subroutines, or sections of code that can be called in the program. The difference between them is that a function has a return value and a sub does not.
类是一组代码,可以包含子函数,函数和其他内容
A class is a group of codes that can include subs, functions, and other stuff.
这篇关于Private Sub,Function和Class之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!