{"id":536,"date":"2005-05-10T00:35:18","date_gmt":"2005-05-09T22:35:18","guid":{"rendered":"http:\/\/10.0.0.2\/wordpress\/?p=536"},"modified":"2005-05-10T00:35:18","modified_gmt":"2005-05-09T22:35:18","slug":"learning_c_followup","status":"publish","type":"post","link":"https:\/\/www.switchbl8.nl\/blog\/2005\/05\/learning_c_followup\/","title":{"rendered":"Learning C# &#8211; followup"},"content":{"rendered":"<p>When you define a form, it&#8217;s class is an inherited class (from the one Microsoft defined in their .NET framework). When reading\/setting values from components from the form-class you defined, things work like you would expect. But&#8230;when you create another class and try to access the components, you will get the error described in <a href=\"http:\/\/www.rare-it.com\/b2e\/blogs\/switchbl8\/blog.php\/2005\/05\/09\/learning_c_aargh\">the previous post<\/a>. Why? It does not matter if you define the components on the form as public: you can not access members (variables, subclasses, etc) of inherited classes from another class. That&#8217;s by C# design. Oh well, I learned it the hard way.<\/p>\n<p>Please comment if you know a way around it. For now I just pass the values I need to read, but how about writing?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you define a form, it&#8217;s class is an inherited class (from the one Microsoft defined in their .NET framework). When reading\/setting values from components from the form-class you defined, things work like you would expect. But&#8230;when you create another class and try to access the components, you will get the error described in the <a href='https:\/\/www.switchbl8.nl\/blog\/2005\/05\/learning_c_followup\/' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34,39,8],"tags":[],"class_list":["post-536","post","type-post","status-publish","format-standard","hentry","category-net","category-c","category-development","category-34-id","category-39-id","category-8-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/posts\/536","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/comments?post=536"}],"version-history":[{"count":0,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/posts\/536\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/media?parent=536"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/categories?post=536"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/tags?post=536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}