Saturday, February 14, 2009

.Net How to compare two versions of its size

.Net How to compare two versions of its size

Encountered this problem today, recording click.

Writing to his own is a relatively cumbersome,. Net system provides the Version category to address this issue. The use of the Model:

use System.Version:

string s1 = "001.001.002", s2 = "001.001.001";
Version v1 = new Version (s1), v2 = new Version (s2);
if (v1> v2)
MessageBox.Show ( "Yes");


Refer to MSDN:
http://msdn.microsoft.com/en-us/library/system.version.aspx


No comments:

Search This Blog

Followers