{"id":2522,"date":"2018-10-26T23:06:16","date_gmt":"2018-10-26T14:06:16","guid":{"rendered":"http:\/\/okamurax.com\/?p=2522"},"modified":"2018-10-26T23:06:16","modified_gmt":"2018-10-26T14:06:16","slug":"c-observablecollection","status":"publish","type":"post","link":"https:\/\/appbay.org\/?p=2522","title":{"rendered":"C# ObservableCollection"},"content":{"rendered":"<p>\u3061\u3087\u3044\u30e1\u30e2<\/p>\n<pre class=\"lang:c# decode:true \">    class Person\r\n    {\r\n        public string Name;\r\n        public int Age;\r\n    }\r\n\r\n    public partial class Form1 : Form\r\n    {\r\n        public Form1()\r\n        {\r\n            InitializeComponent();\r\n\r\n            ObservableCollection&lt;Person&gt; peoples = new ObservableCollection&lt;Person&gt;();\r\n            peoples.Add(new Person { Name = \"taro\", Age = 1 });\r\n            peoples.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Notify);\r\n\r\n            \/\/\u5024\u306e\u5909\u66f4\u3067\u306f\u53cd\u5fdc\u3057\u306a\u3044\u3002\r\n            peoples[0].Name = \"taro3\";\r\n\r\n            \/\/\u3053\u3053\u3067\u53cd\u5fdc\r\n            peoples.Add(new Person { Name = \"jiro\", Age = 2 });\r\n        }\r\n        private void Notify(object sender, EventArgs e)\r\n        {\r\n            MessageBox.Show(\"\");\r\n        }\r\n        \r\n    }<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3061\u3087\u3044\u30e1\u30e2 class Person { public string Name; public int Age; } public partial class Form1 : Form { public Form1()  &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/appbay.org\/?p=2522\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;C# ObservableCollection&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[9],"class_list":["post-2522","post","type-post","status-publish","format-standard","hentry","category-1","tag-c-net"],"_links":{"self":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/2522","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2522"}],"version-history":[{"count":1,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/2522\/revisions"}],"predecessor-version":[{"id":2523,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/2522\/revisions\/2523"}],"wp:attachment":[{"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}