Look you stupid frog...shhhhhh.
If I don't add this imports line then:
Then FileVersionInfo is unknown and thus .NET whinges about it.VB Code:
Public Function GetFileVersion(ByVal pstrEXE As String) As String Dim myFileVersionInfo As [B]FileVersionInfo[/B] = FileVersionInfo.GetVersionInfo(pstrEXE) GetFileVersion = myFileVersionInfo.FileVersion End Function
I suppose I could do:
This is in an ASP.NET web form, and not a VB.NET application. Maybe the imports for this type of .NET project are different.VB Code:
Public Function GetFileVersion(ByVal pstrEXE As String) As String Dim myFileVersionInfo As System.Diagnostics.FileVersionInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(pstrEXE) GetFileVersion = myFileVersionInfo.FileVersion End Function
*GROWL*
*EATS FROG*
*SLAP*
Woof




Reply With Quote