Skip to main content

Microsoft Silverlight

is there a quick and easy to get the SL plugin's version number in C#?RSS Feed

(0)

nerdabilly
nerdabilly

Member

Member

6 points

10 Posts

is there a quick and easy to get the SL plugin's version number in C#?

I'm writing a Silverlight class library in C#. one of its features will be to make an http request, and one of the requirements is that it passes a version # in the HTTP request. I'd like to know if there's a built-in function or property that will get the client's Silverlight plugin version #. In Flash, there is a built-in function called "getVersion()" which will just return the client's Flash Player version # as a string . Is there a similar thing in Silverlight? Thanks! 

theomed
theomed

Member

Member

28 points

9 Posts

Re: is there a quick and easy to get the SL plugin's version number in C#?

Use this.

var plugin = navigator.plugins["Silverlight Plug-In"] ;

var versionNumber = plugin.description;

versionNumber should give you somoething like 1.0.30226.2  or  2.0.30226.2 depending on the version number you have. Let me know if this solves the problem for you.

Mark it as answered if it does.

 

Mark as answered if my solution solves your problem.

www.theomedeiros.com
Theo Medeiros

theomed
theomed

Member

Member

28 points

9 Posts

Re: Re: is there a quick and easy to get the SL plugin's version number in C#?

versionNumber should return a string for you.

Mark as answered if my solution solves your problem.

www.theomedeiros.com
Theo Medeiros

nerdabilly
nerdabilly

Member

Member

6 points

10 Posts

Re: Re: Re: is there a quick and easy to get the SL plugin's version number in C#?

 Then I must be doing something wrong.

 I'm using visual Web Developer with the SL tools trying to create a class library (DLL).

 when I use versionNumber I get an error:

Error    2    The name 'versionNumber' does not exist in the current context   

 theomed's solution won't work because it's JavaScript, I'm writing in C# to create a redistributable library.

 Thanks! 

 

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities