Connecting Tech Pros Worldwide Forums | Help | Site Map

Comparing two values - vs2005

=?Utf-8?B?Umljaw==?=
Guest
 
Posts: n/a
#1: Nov 21 '08
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

Hans Kesting
Guest
 
Posts: n/a
#2: Nov 21 '08

re: Comparing two values - vs2005


Rick pretended :
Quote:
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


=?Utf-8?B?Umljaw==?=
Guest
 
Posts: n/a
#3: Nov 21 '08

re: Comparing two values - vs2005


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

"Hans Kesting" wrote:
Quote:
Rick pretended :
Quote:
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
>
>
>
=?Utf-8?B?Umljaw==?=
Guest
 
Posts: n/a
#4: Nov 21 '08

re: Comparing two values - vs2005


Actually, I need it for VS2003 not VS2005.

"Rick" wrote:
Quote:
Couls you please provide me with more information?
How do I load them in a version class?
>
"Hans Kesting" wrote:
>
Quote:
Rick pretended :
Quote:
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

Peter Duniho
Guest
 
Posts: n/a
#5: Nov 21 '08

re: Comparing two values - vs2005


On Fri, 21 Nov 2008 07:55:01 -0800, Rick <Rick@discussions.microsoft.com>
wrote:
Quote:
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.

Ignacio Machin ( .NET/ C# MVP )
Guest
 
Posts: n/a
#6: Nov 21 '08

re: Comparing two values - vs2005


On Nov 21, 1:27 pm, Rick <R...@discussions.microsoft.comwrote:
Quote:
Actually, I need it for VS2003 not VS2005.
>
"Rick" wrote:
Quote:
Couls you please provide me with more information?
How do I load them in a version class?
>
Quote:
"Hans Kesting" wrote:
>
Quote:
Quote:
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
>
Quote:
Quote:
Load them in a Version class, then you can compare them.
>
Quote:
Quote:
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)
>
Quote:
Quote:
Hans Kesting
The version class is there since 1.0:

Version v = new Version( "5.2.1");
Closed Thread