Re: [Vala] access static method
- From: Wolfgang Mauer <wolfgang mauer kabelmail de>
- To: Miguel Miranda <phastmike gmail com>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] access static method
- Date: Tue, 26 Mar 2019 17:49:40 +0100
I can not explain why that does not work for me, I have renamed the
static method now Nevertheless many thanks...
Am 26.03.19 um 17:26 schrieb Wolfgang Mauer:
namespace MyNamespace {
public static void static_method () {
print ("This is the namespace static method\n");
}
public class MyClass : Object {
public static void static_method () {
print ("This is the class method\n");
}
public void some_method () {
static_method ();
MyNamespace.static_method ();
MyNamespace.MyClass.static_method ();
}
public static void main () {
var a = new MyClass ();
a.some_method ();
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]