blob: 353071e9dbb55f2f4f1bade2ee94b5d81a1d6c07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
public class Foo : Object {
public string[]? strings {
get { return this._strings; }
set { this._strings = value; }
}
private string[]? _strings;
}
void main() {
string[]? strings;
var f = new Foo();
f.set("strings", new string[]{ "foo", "bar" });
f.get("strings", out strings);
assert (strings[0] == "foo");
assert (strings[1] == "bar");
f.set("strings", null);
f.get("strings", out strings);
assert(strings == null);
f.set("strings", new string[]{ "foo", "bar" });
f.get("strings", out strings);
assert (strings[0] == "foo");
assert (strings[1] == "bar");
}
|