I want to compare the software version created in 3.5 with the older one. If I try to compare version in 4.0 then it's easy by using Version.Parse
but in earlier version this facility is not there. I tried to compare it by using string comparison but still not able get the desired output because string comparison doesn't allow to me compare with minor version or major version. Thanks in advance.
Deserialization is the process of parsing a string into an object of a specific type. The JsonSerializer. Deserialize() method converts a JSON string into an object of the type specified by a generic type parameter.
NET. As of July 2022, the most recent stable version of the language is C# 10.0, which was released in 2021 in .
Forgive me if im missing something but can't you use the version object constructor passing your version string:
http://msdn.microsoft.com/en-us/library/y0hf9t2e%28v=vs.90%29.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1
string str = "0.1.2.3";
Version v = new Version(str);
This is present in the following .NET Frameworks:
4.8, 4.7.2, 4.7.1, 4.7, 4.6.2, 4.6.1, 4.6, 4.5.2, 4.5.1, 4.5, 4.0, 3.5, 3.0, 2.0, 1.1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With