本文主要是介绍C++与C#方法命名的不同,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
C++与C#方法命名的不同
C#的命名规范
- ✔️ DO use PascalCasing for all public member, type, and namespace names consisting of multiple words.
- ✔️ DO use camelCasing for parameter names.
- ❌ DO NOT capitalize each word in so-called closed-form compound words.
- ❌ DO NOT assume that all programming languages are case sensitive. They are not. Names cannot differ by case alone.
参考:
https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/capitalization-conventions
据说C#变量命名有其历史原因。
https://softwareengineering.stackexchange.com/questions/53498/what-is-the-philosophy-reasoning-behind-cs-pascal-casing-method-names
这篇关于C++与C#方法命名的不同的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!