gpt4 book ai didi

c# - 声明字符串变量时有括号是什么意思?

转载 作者:行者123 更新时间:2023-11-30 18:52:46 28 4
gpt4 key购买 nike

我正在将 VB6 转换为 C#。我没有使用 VB6 的经验。有什么区别:

sWords() As String

sWords As String

很容易看出我可以在 C# 中将第二个转换为 string sWords,但我不知道第一个是什么意思……数组?

最佳答案

第一个是字符串类型的数组,第二个只是一个字符串。

所以等价物是

string[] swords

string swords

关于c# - 声明字符串变量时有括号是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11888369/

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