Re: [Vala] access static method
- From: Miguel Miranda <phastmike gmail com>
- To: Wolfgang Mauer <wolfgang mauer kabelmail de>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] access static method
- Date: Tue, 26 Mar 2019 16:55:13 +0000
I bit busy atm. Result without static keyword in the namespace is the same.
gl
On Tue, Mar 26, 2019, 16:49 Wolfgang Mauer <wolfgang mauer kabelmail de>
wrote:
I can not explain why that does not work for me, I have renamed the static method nowNevertheless 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]