Bernie
Bernie

Reputation: 286

How do I retrieve the version of an Assembly in C#?

I have a reference to a type, for which I would like to retrieve the version number of the Assembly in which it is located.

What is the best way to do this?

Upvotes: 8

Views: 516

Answers (1)

ckarras
ckarras

Reputation: 5016

you can use,

x.GetType().Assembly.GetName().Version

Upvotes: 12

Related Questions