**** Merged from MCS ****
[mono-project.git] / mcs / tools / cilc / demo.c
blob1b62b9e82d81c663808e5e668bcfb2a51796a018
1 #include "demo.h"
3 int main () {
4 DemoTest *my_test;
6 //run a static method
7 demo_test_static_method ();
9 //create an object instance
10 my_test = demo_test_new ();
12 //run an instance method
13 demo_test_increment (my_test);
15 //run an instance method with arguments
16 demo_test_add_number (my_test, 2);
18 //run an instance method with arguments
19 demo_test_echo (my_test, "hello from c");
21 //run a property set accessor
22 demo_test_set_title (my_test, "set property from c");
24 //TODO: return value
25 //g_printf ("returned string: %s\n", demo_test_get_title (my_test));
27 //TODO: gobject-style DEMO_IS_TEST etc. macros
29 return 1;