473,403 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Comparing two values - vs2005

I have a string value 5.2.1 and I need to know how to compare if this value
is greater than or equlas to 5.1.4
Nov 21 '08 #1
5 1282
Rick pretended :
I have a string value 5.2.1 and I need to know how to compare if this value
is greater than or equlas to 5.1.4
Load them in a Version class, then you can compare them.

This works only if
a) the parts are separated by a '.'
b) the parts are integers (no "1.2a")
c) there are not more than 4 parts (less is fine)

Hans Kesting
Nov 21 '08 #2
Couls you please provide me with more information?
How do I load them in a version class?

"Hans Kesting" wrote:
Rick pretended :
I have a string value 5.2.1 and I need to know how to compare if this value
is greater than or equlas to 5.1.4

Load them in a Version class, then you can compare them.

This works only if
a) the parts are separated by a '.'
b) the parts are integers (no "1.2a")
c) there are not more than 4 parts (less is fine)

Hans Kesting
Nov 21 '08 #3
Actually, I need it for VS2003 not VS2005.

"Rick" wrote:
Couls you please provide me with more information?
How do I load them in a version class?

"Hans Kesting" wrote:
Rick pretended :
I have a string value 5.2.1 and I need to know how to compare if this value
is greater than or equlas to 5.1.4
Load them in a Version class, then you can compare them.

This works only if
a) the parts are separated by a '.'
b) the parts are integers (no "1.2a")
c) there are not more than 4 parts (less is fine)

Hans Kesting

Nov 21 '08 #4
On Fri, 21 Nov 2008 07:55:01 -0800, Rick <Ri**@discussions.microsoft.com>
wrote:
I have a string value 5.2.1 and I need to know how to compare if this
value
is greater than or equlas to 5.1.4
If you could explain what about the String.Compare() method doesn't
accomplish your goal, that would help us provide a better answer.

Nov 21 '08 #5
On Nov 21, 1:27 pm, Rick <R...@discussions.microsoft.comwrote:
Actually, I need it for VS2003 not VS2005.

"Rick" wrote:
Couls you please provide me with more information?
How do I load them in a version class?
"Hans Kesting" wrote:
Rick pretended :
I have a string value 5.2.1 and I need to know how to compare if this value
is greater than or equlas to 5.1.4
Load them in a Version class, then you can compare them.
This works only if
a) the parts are separated by a '.'
b) the parts are integers (no "1.2a")
c) there are not more than 4 parts (less is fine)
Hans Kesting
The version class is there since 1.0:

Version v = new Version( "5.2.1");
Nov 21 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Elijah Bailey | last post by:
I have two char arrays of size k. I want to know which one is bigger (exactly like for instance I compare two ints/longs/etc.). What is the fastest way to do this? k <= 10 usually for my...
5
by: Bob Gregory | last post by:
Hi all, I'm utter C# newbie, do be gentle. VS2005 Express refuses point blank to install on my box, so I'm stuck with C# 1.0 unless someone can point me to a C#2.0 compiler elsewhere. I have...
2
by: Manny Chohan | last post by:
Hi, i have two datetime values in format 11/22/04 9:00 AM and 11/22/04 9:30 AM. How can i compare dates .net c# or if there is any other way such as Javascript. Thanks Manny
19
by: Dennis | last post by:
I have a public variable in a class of type color declared as follows: public mycolor as color = color.Empty I want to check to see if the user has specified a color like; if mycolor =...
1
by: Will Chamberlain | last post by:
I just created an application that displays data from 2 sources in a datagrid. There are 2 repeaters nested in the datagrid (probably not the best idea). The whole purpose of this application is to...
6
by: abbylee26 | last post by:
Im comparing values in a field while doing a loop if sAct<>myData(5,i) then At the end of the loop I make the value of sAct equal the current myData This will work when comparing other fields...
5
by: Kermit Piper | last post by:
Hello, I am comparing two date values, one from a database and one that has been converted from a hard-coded string into an actual Date type. So far so good. The problem I'm having is that one...
2
by: Pugi! | last post by:
hi, I am using this code for checking wether a value (form input) is an integer and wether it is smaller than a given maximum and greater then a given minimum value: function...
2
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hi mister, I have an object with two properties, of type DateTime? (Nullable). Which is the best way for comparing ? The value of datetime can be null, and another value cannot be null, or two...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.