gpt4 book ai didi

java - VB.NET 中的 vector 与列表

转载 作者:行者123 更新时间:2023-11-30 07:20:57 25 4
gpt4 key购买 nike

我正在为我的公司做一个项目,最近我们翻译了一个大的项目为 。因此,Vector 被翻译为list。然而我看到VB.NET also has a Vector type 。我的问题是,在 VB 中保留 Java vector 的最合适方法是什么,作为 List 或作为 Vector >?

最佳答案

来自Class Vector

The Vector class implements a growable array of objects. Like an array, it contains components that can be accessed using an integer index. However, the size of a Vector can grow or shrink as needed to accommodate adding and removing items after the Vector has been created.

听起来像 .NET List(Of T)。来自MSDN

Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists.

.NET Vector 类型是具有不同用途的不同类型。来自MSDN

Represents a displacement in 2-D space.

关于java - VB.NET 中的 vector 与列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37585507/

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