get_byte


Description:

public uint8 get_byte ()

Returns the byte value of this.

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

Example: Get a byte:

public static int main (string[] args) {
Variant var1 = new Variant.byte ('c');
// Output: ``c``
print ("%c\n", var1.get_byte ());
// Output: ``c``
print ("%c\n", (uchar) var1);
return 0;
}

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

Parameters:

this

a byte Variant instance

Returns:

a uint8