RosettaCodeData/Task/Reflection-List-properties/Nanoquery/reflection-list-properties....

13 lines
286 B
Plaintext

// declare a class that has fields to be listed
class Fields
declare static field1 = "this is a static field. it will not be listed"
declare field2
declare field3
declare field4
end
// list all the fields in the class
for fieldname in Fields.getFieldNames()
println fieldname
end