ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Data Namespace / Geodatabase Class / Geodatabase Constructor / Geodatabase Constructor(MemoryConnectionProperties)
The properties used to connect to a memory geodatabase.
Example

In This Topic
    Geodatabase Constructor(MemoryConnectionProperties)
    In This Topic
    Opens a memory geodatabase with the specified memoryConnectionProperties. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax

    Parameters

    memoryConnectionProperties
    The properties used to connect to a memory geodatabase.
    Exceptions
    ExceptionDescription
    The name of the geodatabase is invalid or the geodatabase cannot be opened.
    This object must be created within the lambda or delegate passed to QueuedTask.Run, or on a compatible STA thread.
    Example
    Opens a memory geodatabase
    public void OpenMemoryGeodatabase()
    {
      // Connects to the default memory geodatabase, if exists otherwise throws exception
      MemoryConnectionProperties memoryConnectionProperties = new MemoryConnectionProperties();
    
      // Alternatively, connects to memory geodatabase named as 'InterimMemoryGeodatabase'
      // MemoryConnectionProperties memoryConnectionProperties = new MemoryConnectionProperties("InterimMemoryGeodatabase");
    
      // Opens the memory geodatabase
      using (Geodatabase geodatabase = new Geodatabase(memoryConnectionProperties))
      {
        // Use memory geodatabase
      }
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also