[Gdal-dev] C# Bindings

Simon Perkins sy at perkins.net
Sun Nov 5 14:45:38 EST 2006


Tamas Szekeres wrote:
>> >
>> > We can see it exactly. But for a conventional C# user it would be more
>> > affordable
>> > to select a proper function overload instead of taking care of the
>> > expected default values.
>>
>> I'm afraid I don't understand what you are telling me.  I am
>> suggesting that you should pass zeros into the C++ RasterIO()
>> method when the no particulars are provided by the caller.  And
>> then the C++ computes appropriate values.
>>
>
> It's just an aesthetic issue not a technical. For C# we cannot use the
> conventional notation when declaring with default values as:
>
> public int MyFunction(int value1, int value2, int value3 = 23);
>
> Instead we have to use overloads like:
>
> public int MyFunction(int value1, int value2, int value3);
> public int MyFunction(int value1, int value2);

Agreed, but Frank was just pointing out that in the overload where the 
pixelSpace and lineSpace args are not specified, it's better to pass 
those parameters on to the underlying GDAL function as zeros, rather 
than the values I suggested in my e-mail. The zeros tell GDAL to assume 
default values for those parameters - which are the same as the ones I 
explcitly suggested.

Sy




More information about the Gdal-dev mailing list