Why is the ApplicationUsageHelper.Init method not accepting the "Version" type, but rather only string?
2 Answers, 1 is accepted
0
Todor
Telerik team
answered on 16 Oct 2012, 06:57 AM
Hello Martin,
Thank you for your question.
The Version type can be used for versions consisting of up to only four integer values. And as the ApplicationUsageHelper.Init accepts the string type, you don't have this limitation and you can set a version like 2012.Q3 for example. If you have a value of type Version, you can easily pass it to the method by getting the value's string representation with the ToString method.
On the other hand, maybe you can share with us why you would want to use the Version type and what benefits you would get.
I rather use the Version type in my apps to pass the version number around, storing it or retrieving it. It's safer and I don't need to tryparse it if I need to show only first two numbers or so.
I guess I can live with method accepting only string, ToString on Version object works just fine.