[Vala] namespace access-modifier
- From: Florian <florian32 gmx de>
- To: vala-list gnome org
- Subject: [Vala] namespace access-modifier
- Date: Mon, 11 Mar 2013 23:00:41 +0100
Hi! :)
According to this Document one can declare namspace members public or
private:
http://www.vala-project.org/doc/vala-draft/namespaces.html
"Namespace members can be declared either private or public.
Public data can be accessed from any code, while private data
can only be accessed from inside the namespace."
for example:
namespace Test {
private int i = 5;
}
int main (string[] args) {
Test.i = Test.i+2;
return 0;
}
Why can I access "i" here?
Thank you very much,
Florian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]