C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






How to get the Assembly Version of an executable file for Emulators in PocketPC Device Emulators


Posted Date: 03 Jun 2008    Resource Type: Code Snippets    Category: Collections
Author: komaladeviMember Level: Gold    
Rating: Points: 10



Hi Friends,


In this iam going to give you all the code to get the AssemblyVersion(The Version which will execute latestly) or the CAB executables versions which we will use for our device applications .


First we need to get the filename (in which we want to know the version of the assembly in that file)
then we can get the assembly version like this
Here is the code



Private Sub GetAssemblyVersion(ByVal filename)
Dim exename As String = filename
'Dim assembly As System.Reflection.Assembly = System.Reflection.Assembly.Load(exename)
'verInfo = assembly.GetName().Version.ToString()
Dim myAsm As Assembly = Reflection.Assembly.Load(exename)
Dim aName As AssemblyName = myAsm.GetName()
' Store the version number in a Version object.
Dim ver As Version = aName.Version
' Display the version number of MyAssembly.
verInfo = verInfo & filename & " " & ver.ToString() & vbCrLf
End Sub 'GetAssemblyVersion




Thanks & Regards
komala


please feel free to ask me if anyone have any doubts who have gone through this code snippets @---- komalinaughty@gmail.com




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Add/remove items from one listbox to other (in C#)
Previous Resource: Max/Min values
Return to Discussion Resource Index
Post New Resource
Category: Collections


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use