get_boolean


Description:

public bool get_boolean ()

Returns the boolean value of this.

It is an error to call this function with a this of any type other than g_variant_type_boolean.

Example: Get a boolean:

public static int main (string[] args) {
Variant var1 = new Variant.boolean (true);
// Output: ``true``
print ("%s\n", var1.get_boolean ().to_string ());
// Output: ``true``
print ("%s\n", ((bool) var1).to_string ());
return 0;
}

valac --pkg glib-2.0 GLib.Variant.get_boolean.vala

Parameters:

this

a boolean Variant instance

Returns:

true or false