Example: Create a new byte Variant

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.Variant.byte.vala

See:




2022 vala-language.org