p = mono_string_to_utf8 (strval);
printf ("Value of str is: %s\n", p);
/* we need to free the result from mono_string_to_utf8 () */
p = mono_string_to_utf8 (strval);
printf ("Value of str is: %s\n", p);
/* we need to free the result from mono_string_to_utf8 () */
/* string are immutable, so we need to create a different string */
strval = mono_string_new (domain, "hello from the embedding API");
/* string are immutable, so we need to create a different string */
strval = mono_string_new (domain, "hello from the embedding API");
p = mono_string_to_utf8 (str);
printf ("Value of str from property is: %s\n", p);
/* we need to free the result from mono_string_to_utf8 () */
p = mono_string_to_utf8 (str);
printf ("Value of str from property is: %s\n", p);
/* we need to free the result from mono_string_to_utf8 () */
/* Now we'll show two things:
* 1) static methods are invoked with mono_runtime_invoke () as well,
/* Now we'll show two things:
* 1) static methods are invoked with mono_runtime_invoke () as well,
p = mono_string_to_utf8 (str);
printf ("Values of str/val from Values () are: %s/%d\n", p, val);
/* we need to free the result from mono_string_to_utf8 () */
p = mono_string_to_utf8 (str);
printf ("Values of str/val from Values () are: %s/%d\n", p, val);
/* we need to free the result from mono_string_to_utf8 () */
p = mono_string_to_utf8 (str);
printf ("25.ToString (): %s\n", p);
/* we need to free the result from mono_string_to_utf8 () */
p = mono_string_to_utf8 (str);
printf ("25.ToString (): %s\n", p);
/* we need to free the result from mono_string_to_utf8 () */
/* Now: see how the result is different if we search for the ToString ()
* method in System.Object: mono_runtime_invoke () doesn't do any sort of
/* Now: see how the result is different if we search for the ToString ()
* method in System.Object: mono_runtime_invoke () doesn't do any sort of
p = mono_string_to_utf8 (str);
printf ("25.ToString (), from System.Object: %s\n", p);
/* we need to free the result from mono_string_to_utf8 () */
p = mono_string_to_utf8 (str);
printf ("25.ToString (), from System.Object: %s\n", p);
/* we need to free the result from mono_string_to_utf8 () */
/* Now get the method that overrides ToString () in obj */
vtmethod = mono_object_get_virtual_method (obj, method);
/* Now get the method that overrides ToString () in obj */
vtmethod = mono_object_get_virtual_method (obj, method);