gpt4 book ai didi

vb.net - 局部变量 : Pascal or Camel Casing?

转载 作者:行者123 更新时间:2023-12-04 02:22:06 26 4
gpt4 key购买 nike

VB.NET 中,MS 命名局部变量的标准是什么,Camel 还是 Pascal 大小写?

例如

 Sub X()
Dim myVariable As Integer
End sub

Sub X()
Dim MyVariable As Integer
End Sub

最佳答案

来自guidelines (在字段名称下):

The naming guidelines for fields apply to static public and protected fields. You should not define public or protected instance fields. For more information, see Field Design.

Do use Pascal casing in field names.

Do name fields with nouns or noun phrases.

Do not use a prefix for field names. For example, do not use g_ or s_ to distinguish static versus non-static fields


虽然所有示例似乎都使用了驼峰式,但指南并未提及私有(private) 字段。

指南也没有提及任何关于局部变量的内容,尽管所有示例似乎都使用了驼峰式大小写

关于vb.net - 局部变量 : Pascal or Camel Casing?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5118087/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com