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

531 views Asked by At

in my data bases i have data name Version and i want to check or show the version that greater than 4.0.38000

how should do this ? example of my code

string key = "4.0.";

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

Where version is the string, but my code is not the correct one

pls help thankyou

1

There are 1 answers

1
Mitch Wheat On BEST ANSWER

It's not entirely clear what you are asking, but I'm assuming you want to compare Version strings.

Use the VersionClass to compare version strings

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]]