vb.net - Nested class & readonly properties -
outside class i'd able access cctv.camera.brightness property readonly, methods within cctv class should able modify brightness property. please can advise on how achieve this? i think need add interface exposes properties , hides others, i'm not sure of implementation. [note constructor , main sub contrived example , testing]. public class cctv public class camera public property name string public property brightness integer end class dim cameras new dictionary(of string, camera) public sub new() dim cam new camera cam.name = "driveway" cam.brightness = 5 cameras.add(cam.name, cam) end sub public sub changebrightness(value integer) cameras("driveway").brightness = value end sub end class sub main() dim mycctv = new cctv mycctv.changebrightness(10) if mycctv("driveway").brightness = 10 console.write("brightness 10") end sub get getter , setter ...