ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.Data Namespace / DatabaseConnectionFile Class / DatabaseConnectionFile Constructor
A valid path to a database connection file that ends with the .sde extension.
Example

DatabaseConnectionFile Constructor
Initializes a new instance of the DatabaseConnectionFile class.
Syntax
public DatabaseConnectionFile( 
   Uri path
)

Parameters

path
A valid path to a database connection file that ends with the .sde extension.
Exceptions
ExceptionDescription
path is null.
The path in path does not end with the .sde extension.
Example
Opening an Enterprise Geodatabase using sde file path
public async Task OpenEnterpriseGeodatabaseUsingSDEFilePath()
{
  await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
  {
    using (Geodatabase geodatabase = new Geodatabase(new DatabaseConnectionFile(new Uri("path\\to\\sde\\file\\sdefile.sde"))))
    {
      // Use the geodatabase.
    }
  });
}
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

ArcGIS Pro version: 2.0 or higher.
See Also