在 Linqpad c# 语句中如何比较字符串是否大于(版本 > 4.0.38000)

In Linqpad c# statement how to compare string with is greater than (Version > 4.0.38000)

在我的数据库中,我有数据名称版本,我想检查一下 或显示大于 4.0.38000

的版本

应该怎么做? 我的代码示例

string key = "4.0.";

innerjoin.Where(x=> x.Version.Contains(key)).Dump();

其中版本是字符串,但我的代码不正确

请帮忙谢谢

不完全清楚你在问什么,但我假设你想比较版本字符串。

使用VersionClass比较版本字符串

Version numbers consist of two to four components: major, minor, build, and revision. The major and minor components are required; the build and revision components are optional, but the build component is required if the revision component is defined. All defined components must be integers greater than or equal to 0. The format of the version number is as follows (optional components are shown in square brackets ([ and ]):

major.minor[.build[.revision]]