我应该使用用户当前的文化来比较计算机名称吗?

时间:2021-05-24 07:12:04

I've got a list view and a button. The list view has columns "Server Name", "Operating System" and "Description". The button populates the list view with computer records from Active Directory.

我有一个列表视图和一个按钮。列表视图包含“服务器名称”,“操作系统”和“描述”列。该按钮使用Active Directory中的计算机记录填充列表视图。

The columns are clickable, and sort the list view as relevant.

列可以单击,并将列表视图排序为相关。

When doing the comparisons, should I be using the user's current culture settings, or should I use the invariant culture?

在进行比较时,我应该使用用户当前的文化设置,还是应该使用不变文化?

1 个解决方案

#1


I would use invariant, since neither "Servername", "Operating system" or "Description" changes if you change language.

我会使用不变量,因为如果你改变语言,“Servername”,“操作系统”或“描述”都不会改变。

Only place, where culture concideration are important are when you are dealing with numbers and dates.

在处理数字和日期时,只有文化融合很重要的地方。

Hope it helps

希望能帮助到你

#1


I would use invariant, since neither "Servername", "Operating system" or "Description" changes if you change language.

我会使用不变量,因为如果你改变语言,“Servername”,“操作系统”或“描述”都不会改变。

Only place, where culture concideration are important are when you are dealing with numbers and dates.

在处理数字和日期时,只有文化融合很重要的地方。

Hope it helps

希望能帮助到你