Program set feature accessors are generally used in a form.
Partial class formabout: FORM {public formabout () {initializecomponent (); this. TEXT = string. format ("about {0}", assemblytitle); this. labelproductname. TEXT = assemblyproduct; this. labelversion. TEXT = string. format ("version {0}", assemblyversion); this. labelcopyright. TEXT = assemblycopyright; this. labelcompanyname. TEXT = assemblycompany; this. textboxdescription. TEXT = assemblydescription;} # region Assembly features Accessors Public String assemblytitle {get {object [] attributes = assembly. getexecutingassembly (). getcustomattributes (typeof (assemblytitleattribute), false); If (attributes. length> 0) {assemblytitleattribute titleattribute = (assemblytitleattribute) attributes [0]; If (titleattribute. title! = "") {Return titleattribute. title ;}} return system. io. path. getfilenamewithoutextension (assembly. getexecutingassembly (). codebase) ;}} Public String assemblyversion {get {return assembly. getexecutingassembly (). getname (). version. tostring () ;}} Public String assemblydescription {get {object [] attributes = assembly. getexecutingassembly (). getcustomattributes (typeof (assemblydescriptionattribute), false); If (attributes. length = 0) {return "";} return (assemblydescriptionattribute) attributes [0]). description ;}} Public String assemblyproduct {get {object [] attributes = assembly. getexecutingassembly (). getcustomattributes (typeof (assemblyproductattribute), false); If (attributes. length = 0) {return "";} return (assemblyproductattribute) attributes [0]). product ;}} Public String assemblycopyright {get {object [] attributes = assembly. getexecutingassembly (). getcustomattributes (typeof (assemblycopyrightattribute), false); If (attributes. length = 0) {return "";} return (assemblycopyrightattribute) attributes [0]). copyright ;}} Public String assemblycompany {get {object [] attributes = assembly. getexecutingassembly (). getcustomattributes (typeof (assemblycompanyattribute), false); If (attributes. length = 0) {return "";} return (assemblycompanyattribute) attributes [0]). company ;}# endregion private void okbutton_click (Object sender, eventargs e) {This. close ();}}