I am trying to call the following function:
public void seleccionarpanelsecundario([Optional, DefaultParameterValue(null)] ref TabPage a, [Optional, DefaultParameterValue(false)] bool regresaralpaneldeterminado) // cambia el panel secundario a travez de tabitem
{
And what I want to do is call it only the second parameter. In the following way:
seleccionarpanelsecundario(, true);
and it tells me that an argument is missing, but it's optional.
In another case I try to call a function where it also sent a parameter, of which it is optional as follows. I have the following function:
public string rellenarlistadetickets(string iniciofecha, string finfecha, [Optional, DefaultParameterValue(0)] ref decimal total, bool obtenerdecajaabierta = false)
{
And I call it in the following way and it also gives me an error:
console.writeline(ticketaanular.rellenarlistadetickets(desde.Text, desde.Text, obtenerdecajaabierta: true))
In the latter, the following poster tells me:
How can I achieve what I'm trying to do, call a function while avoiding an optional parameter?