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
}
}