ApplicationUsageHelper.Init parameter type

3 posts, 0 answers
  1. Martin
    Martin avatar
    26 posts
    Member since:
    Jul 2012

    Posted 15 Oct 2012 Link to this post

    Why is the ApplicationUsageHelper.Init method not accepting the "Version" type, but rather only string?
  2. Todor
    Admin
    Todor avatar
    778 posts

    Posted 16 Oct 2012 Link to this post

    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.

  3. DevCraft banner
  4. Martin
    Martin avatar
    26 posts
    Member since:
    Jul 2012

    Posted 16 Oct 2012 Link to this post

    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.

Back to Top