Getting Grasshopper Library name and version from IGH_DocumentObject

Hi there! I’m trying to figure out the best way to determine which GH library a component dropped on the canvas belongs to, including what version of the library is installed on the user’s machine. I am currently doing this via reflection:

Assembly info = Assembly.GetAssembly(component.GetType());
AssemblyName an = info.GetName();
string name = an.Name;
string version = an.Version.ToString();

However, I’m not sure whether the dll version always matches the Grasshopper library version. Is there a better way to do this? Some native method in Grasshopper API?

Thanks in advance!