Assign a boolean value to nullable bool

Hi,

How can i assign a boolean value to nullable bool.

How can i convert a boolean value to nullable bool?

Kindly answer my above queries.

Thanks,

Koundi

Hi Koundi,


I have observed the requirements shared by you. Kindly use the following sample code to serve your requirements. Please share, if I may help you further.

//Converting NullableBool to bool
bool val = Convert.ToBoolean(NullableBool.False);

//Converting bool to NullableBool
NullableBool boolval;
if (val)
boolval = NullableBool.True;
else
boolval = NullableBool.False;


Many Thanks,

This is fine for boolean values.

AddTable() in PresentationEx the parameters that we need to pass is of double[] type.

How can i convert an int to double[]?

Kindly let me know your comments.

Thanks,

Koundi

Hi Koundi,

I like to share that double[] array is used to set the columns widths and rows heights when generating the table. Also, the size of the double[] array is used to identify the number of rows or columns. If you want to add the int values to double array you can directly add them. Please visit this documentation link for your kind reference and I hope this will help you in understanding the requirements.

Many Thanks,