Parameters
- name
- The name of the Version to return.
Exception | Description |
---|---|
ArcGIS.Core.Data.Exceptions.GeodatabaseException | A geodatabase-related exception has occurred. |
ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run |
public Geodatabase ConnectToVersion(Geodatabase geodatabase, string versionName) { Geodatabase connectedVersion = null; if (geodatabase.IsVersioningSupported()) { using (VersionManager versionManager = geodatabase.GetVersionManager()) using (Version version = versionManager.GetVersion(versionName)) { connectedVersion = version.Connect(); } } return connectedVersion; }
Target Platforms: Windows 11, Windows 10, Windows 8.1