This is a migrated thread and some comments may be shown as answers.

ApplicationUsageHelper.Init parameter type

2 Answers 13 Views
Diagnostics
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Martin
Top achievements
Rank 1
Martin asked on 15 Oct 2012, 11:59 AM
Why is the ApplicationUsageHelper.Init method not accepting the "Version" type, but rather only string?

2 Answers, 1 is accepted

Sort by
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.

All the best,
Todor
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Martin
Top achievements
Rank 1
answered on 16 Oct 2012, 07:25 AM

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.

Tags
Diagnostics
Asked by
Martin
Top achievements
Rank 1
Answers by
Todor
Telerik team
Martin
Top achievements
Rank 1
Share this question
or