8,734
社区成员
发帖
与我相关
我的任务
分享
private static Version ParseVersionNumber(Assembly assembly)
{
AssemblyName assemblyName = new AssemblyName(assembly.FullName);
return assemblyName.Version;
}
Assembly assembly = Assembly.GetExecutingAssembly();
String version = assembly.FullName.Split(',')[1];
String fullversion = version.Split('=')[1];
Assembly SampleAssembly;
// Instantiate a target object.
Int32 Integer1 = new Int32();
Type Type1;
// Set the Type instance to the target class type.
Type1 = Integer1.GetType();
// Instantiate an Assembly class to the assembly housing the Integer type.
SampleAssembly = Assembly.GetAssembly(Integer1.GetType());
// Display the name of the assembly currently executing
Console.WriteLine("GetExecutingAssembly=" + Assembly.GetExecutingAssembly().FullName);