2012-08-24 62 views

回答

0

您應該導入System.Reflection來實現此目的。

C#

var entityAssembly = Assembly.LoadWithPartialName("System.Data.Entity"); 
var assemblyVersion = entityAssembly != null ? entityAssembly.ImageRuntimeVersion : ""; 

VB.NET

Dim u As Assembly = Assembly.LoadWithPartialName("System.Data.Entity") 
Dim assemblyVersion = IIf(entityAssembly Is Not Nothing, entityAssembly.ImageRuntimeVersion, "") 

免責聲明:請注意,Assembly.LoadWithPartialName是ASP.NET Framework 2.0的

相關問題