Closed bardware closed 6 months ago
I copied your sample code into a new DotNET 8 C#12 project and got an error
var result = NativeMethods.Startup.DuckDBOpen(null, out var database);
This resulted in the error CS8625 - Cannot convert null literal to non-nullable reference type.
CS8625 - Cannot convert null literal to non-nullable reference type
I modified the call to use the overload with 4 arguments to look like and this works.
var result = NativeMethods.Startup.DuckDBOpen(null, out var database, oC, out var iErr);
Is there a reason the first argument is marked nullable in one of the two overloads?
@bardware It should be nullable in both cases.
Fixed in develop.
I copied your sample code into a new DotNET 8 C#12 project and got an error
This resulted in the error
CS8625 - Cannot convert null literal to non-nullable reference type
.I modified the call to use the overload with 4 arguments to look like and this works.
Is there a reason the first argument is marked nullable in one of the two overloads?