I am checking one line of code from my project
if ( (test == 0) &&
lenght.Matches(new Version(Convert.ToInt64(version))) )
Whenever i debugged i am getting currentVersion as a constant value of 18 digit number,but the result i wanted is last exisitng datas version
i am getting 'length' as using the following code
length.Version = (long)data.Version.Rows[0]["Version"];
So i suspect it is always taking Rows arrays first value, how can i change this code so that it will give the last value of arrays
Using LINQ-expression
currentVersion.Version = (long)m_spodata.DataVersion.Rows.Last()["Version"];
Using Rows.Count property
currentVersion.Version =
(long) m_spodata.DataVersion.Rows[m_spodata.DataVersion.Rows.Count - 1]["Version"];
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