One of those things I always have to Google, even though I know it's in System.Reflection.
Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
foreach(Assembly a in assemblies)
{
String assemblyFileVersion = a.GetCustomAttributes(typeof(AssemblyFileVersionAttribute), false).Cast<AssemblyFileVersionAttribute>().Single().Version;
String assemblyVersion = a.GetCustomAttributes(typeof(AssemblyVersionAttribute), false).Cast<AssemblyVersionAttribute>().Single().Version;
}