I have a few classes that need to be kept at the same Salesforce API version since they interact with Salesforce metadata that may change between API versions. Because of this I would like to be able to create a unit test that ensures that these classes are using the same API version. This would prevent us from packaging when the class API versions are not the same.
Is there a way to dynamically get the Salesforce API version of a class using Apex?