{"id":3417,"date":"2023-05-29T08:08:26","date_gmt":"2023-05-29T00:08:26","guid":{"rendered":"https:\/\/lonelinerd.com\/?p=3417"},"modified":"2023-06-15T20:18:09","modified_gmt":"2023-06-15T12:18:09","slug":"property","status":"publish","type":"post","link":"https:\/\/lonelinerd.com\/index.php\/2023\/05\/29\/property\/","title":{"rendered":"C#\u7b46\u8a18 \u2013 \u5c6c\u6027"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"3417\" class=\"elementor elementor-3417\">\n\t\t\t\t\t\t<div class=\"elementor-inner\">\n\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-db6136c elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"db6136c\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-10ad93b\" data-id=\"10ad93b\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7d85ca1 elementor-widget elementor-widget-text-editor\" data-id=\"7d85ca1\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-plain\">\u7528\u65bc\u4ee5\u5b57\u6bb5\u98a8\u683c\u7684\u8a9e\u6cd5\u8a2d\u7f6e\/\u67e5\u8a62\u5c0d\u8c61\u7684\u908f\u8f2f\u72c0\u614b\uff0c\u540c\u6642\u4fdd\u8b49\u72c0\u614b\u4e0d\u88ab\u7834\u58de<\/span><\/p><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-plain\">\u975c\u614b\u5c6c\u6027\u4f5c\u7528\u65bc\u985e\u578b\uff1b<\/span><span class=\"md-plain\">\u5be6\u4f8b\u5c6c\u6027\u4f5c\u7528\u65bc\u5c0d\u8c61<\/span><\/p><\/li><\/ul>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-70cec6b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"70cec6b\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-c76c393\" data-id=\"c76c393\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-ff98890 elementor-widget elementor-widget-text-editor\" data-id=\"ff98890\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<h5 class=\"md-end-block md-heading md-focus\"><strong><span class=\"md-plain md-expand\">\u7121\u53c3\u5c6c\u6027<\/span><\/strong><\/h5><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item\"><pre class=\"md-fences md-end-block ty-contain-cm modeLoaded\" lang=\"C#\" spellcheck=\"false\"><span role=\"presentation\"><span class=\"cm-keyword\">private<\/span> <span class=\"cm-keyword\">sealed<\/span> <span class=\"cm-keyword\">class<\/span> <span class=\"cm-def\">PropertiesClass<\/span><\/span><br \/><span role=\"presentation\">{<\/span><br \/><span role=\"presentation\"> \u00a0 \u00a0<span class=\"cm-variable-3\">int<\/span> <span class=\"cm-variable\">score<\/span>;<\/span><br \/><span role=\"presentation\"> \u00a0 \u00a0<span class=\"cm-variable-3\">bool<\/span> <span class=\"cm-variable\">isFullCombo<\/span>;<\/span><br \/><span role=\"presentation\">\u200b<\/span><br \/><span role=\"presentation\"> \u00a0 \u00a0<span class=\"cm-keyword\">public<\/span> <span class=\"cm-variable-3\">int<\/span> <span class=\"cm-variable\">Score<\/span> { <span class=\"cm-keyword\">set<\/span> { <span class=\"cm-variable\">score<\/span> <span class=\"cm-operator\">=<\/span> <span class=\"cm-keyword\">value<\/span>; } }<\/span><br \/><span role=\"presentation\">\u200b<\/span><br \/><span role=\"presentation\"> \u00a0 \u00a0<span class=\"cm-keyword\">public<\/span> <span class=\"cm-variable-3\">bool<\/span> <span class=\"cm-variable\">IsFullCombo<\/span> { <span class=\"cm-keyword\">get<\/span> { <span class=\"cm-keyword\">return<\/span> <span class=\"cm-variable\">isFullCombo<\/span>; } }<\/span><br \/><span role=\"presentation\">\u200b<\/span><br \/><span role=\"presentation\"> \u00a0 \u00a0<span class=\"cm-keyword\">public<\/span> <span class=\"cm-variable-3\">float<\/span> <span class=\"cm-variable\">FinalResult<\/span> <\/span><br \/><span role=\"presentation\"> \u00a0  {<\/span><br \/><span role=\"presentation\"> \u00a0 \u00a0 \u00a0 \u00a0<span class=\"cm-keyword\">get<\/span> { <span class=\"cm-keyword\">return<\/span> <span class=\"cm-variable\">isFullCombo<\/span> <span class=\"cm-operator\">?<\/span> <span class=\"cm-variable\">score<\/span> <span class=\"cm-operator\">*<\/span> <span class=\"cm-number\">1.5f<\/span> : <span class=\"cm-variable\">score<\/span>; }<\/span><br \/><span role=\"presentation\"> \u00a0 \u00a0 \u00a0 \u00a0<span class=\"cm-keyword\">set<\/span> { <span class=\"cm-keyword\">return<\/span>; }<\/span><br \/><span role=\"presentation\"> \u00a0  } \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <\/span><br \/><span role=\"presentation\">}<\/span><\/pre><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">CLR\u652f\u6301\u975c\u614b\u3001\u5be6\u4f8b\u3001\u62bd\u8c61\u3001\u865b\u5c6c\u6027<\/span><\/span><\/span><\/p><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u53ef\u7528\u4efb\u4f55\u8a2a\u554f\u4fee\u98fe\u7b26\u6a19\u8a18<\/span><\/span><\/span><\/p><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u53ef\u4ee5\u5728\u63a5\u53e3\u5b9a\u7fa9<\/span><\/span><\/span><\/p><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u5c6c\u6027\u90fd\u6709\u540d\u7a31\u548c\u5b9a\u7fa9\uff0c\u4f46\u4e0d\u80fd\u91cd\u8f09\uff08\u4e0d\u80fd\u5b9a\u7fa9\u540c\u540d\uff0c\u4e0d\u540c\u985e\u578b\u7684\u5169\u500b\u5c6c\u6027\uff09<\/span><\/span><\/span><\/p><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-plain\">\u5c6c\u6027\u5305\u62ec\u4e86\u4e00\u5230\u5169\u500b<\/span><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u65b9\u6cd5<\/span><\/span><\/span><\/p><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-plain\">\u53ea\u6709get\uff1a\u552f\u8b80<\/span><\/p><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-plain\">\u53ea\u6709set\uff1a\u53ea\u5beb<\/span><\/p><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-plain\">get+set\uff1a\u8b80\u5beb<\/span><\/p><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u5c6c\u6027\u64cd\u7e31\u7684\u5b57\u6bb5\u7a31\u70ba\u300c\u652f\u6301\u5b57\u6bb5\u300d<\/span><\/span><\/span><\/p><\/li><\/ul><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-plain\">\u53d6\u6c7a\u65bc\u5c6c\u6027\u7684\u5b9a\u7fa9\uff0c\u7de8\u8b6f\u5668\u6703\u5728\u7a0b\u5e8f\u96c6\u751f\u6210<\/span><\/p><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">get || set\u7684\u8a2a\u554f\u5668\uff08\u6839\u64da\u8072\u660e\u8207\u5426\u6c7a\u5b9a\uff09<\/span><\/span><\/span><\/p><\/li><\/ul><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u5c6c\u6027\u5b9a\u7fa9\uff08\u5fc5\u7136\u751f\u6210\uff09<\/span><\/span><\/span><\/p><\/li><\/ul>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-d7482ba elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"d7482ba\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-8e91734\" data-id=\"8e91734\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-15fb625 elementor-widget elementor-widget-image\" data-id=\"15fb625\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-image\">\n\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"369\" height=\"196\" src=\"https:\/\/lonelinerd.com\/wp-content\/uploads\/2022\/03\/CLR_10_1.png\" class=\"attachment-large size-large wp-image-2190\" alt=\"\" srcset=\"https:\/\/lonelinerd.com\/wp-content\/uploads\/2022\/03\/CLR_10_1.png 369w, https:\/\/lonelinerd.com\/wp-content\/uploads\/2022\/03\/CLR_10_1-300x159.png 300w\" sizes=\"auto, (max-width: 369px) 100vw, 369px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-3f67a5c elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"3f67a5c\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-daf7a5e\" data-id=\"daf7a5e\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-205bc6d elementor-widget elementor-widget-image\" data-id=\"205bc6d\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-image\">\n\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"617\" height=\"259\" src=\"https:\/\/lonelinerd.com\/wp-content\/uploads\/2022\/03\/CLR_10_2.png\" class=\"attachment-large size-large wp-image-2191\" alt=\"\" srcset=\"https:\/\/lonelinerd.com\/wp-content\/uploads\/2022\/03\/CLR_10_2.png 617w, https:\/\/lonelinerd.com\/wp-content\/uploads\/2022\/03\/CLR_10_2-300x126.png 300w\" sizes=\"auto, (max-width: 617px) 100vw, 617px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-7c2f7a6 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7c2f7a6\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-ffde014\" data-id=\"ffde014\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6e07e25 elementor-widget elementor-widget-text-editor\" data-id=\"6e07e25\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<ul><li style=\"list-style-type: none;\"><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-plain\">\u7de8\u8b6f\u5668\u5728\u5c6c\u6027\u540d\u4e4b\u524d\u81ea\u52d5\u9644\u52a0<\/span><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">get_ \u6216 set_ \u524d\u7db4<\/span><\/span><\/span><span class=\"md-plain\">\u751f\u6210\u65b9\u6cd5\u540d<\/span><\/p><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-plain\">\u7576\u7de8\u8b6f\u5668\u767c\u73fe\u4ee3\u78bc\u5617\u8a66\u7372\u53d6\/\u8a2d\u7f6e\u5c6c\u6027\u6642\uff0c\u6703\u81ea\u52d5\u751f\u6210\u5c0d\u4e0a\u8ff0\u65b9\u6cd5\u7684\u8abf\u7528<\/span><\/p><\/li><\/ul><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u5c6c\u6027\u5b9a\u7fa9\u9805<\/span><\/span><\/span><span class=\"md-plain\">\u5247\u4e3b\u8981\u662f\u5f15\u7528\u4e86get\/set\u65b9\u6cd5\uff0c\u4e26\u53ef\u88ab<\/span><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u53cd\u5c04\uff08PropertyInfo\uff09\u53d6\u5f97<\/span><\/span><\/span><\/p><\/li><\/ul><\/li><\/ul><h5 class=\"md-end-block md-heading\"><strong><span class=\"md-plain\">AIP\uff08\u81ea\u52d5\u5be6\u73fe\u5c6c\u6027\uff09<\/span><\/strong><\/h5><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">AIP\uff1aAutomatically Implemented Property<\/span><\/span><\/span><\/p><\/li><li class=\"md-list-item\"><pre class=\"md-fences md-end-block ty-contain-cm modeLoaded\" lang=\"C#\" spellcheck=\"false\"><span role=\"presentation\"><span class=\"cm-keyword\">public<\/span> <span class=\"cm-variable-3\">string<\/span> <span class=\"cm-variable\">AIP<\/span> { <span class=\"cm-keyword\">get<\/span>; <span class=\"cm-keyword\">set<\/span>; }<\/span><\/pre><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item md-focus-container\"><p class=\"md-end-block md-p md-focus\"><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u8072\u660e\u4e86\u5c6c\u6027\uff0c\u4f46\u6c92\u6709get\/set\u7684\u5be6\u73fe\uff0cC#\u6703\u81ea\u52d5\u8072\u660e\u4e00\u500b\u79c1\u6709\u5b57\u6bb5\uff0c\u4e26\u81ea\u52d5\u5be6\u73feget_AIP\u548cset_AIP\u65b9\u6cd5<\/span><\/span><\/span><\/p><\/li><\/ul><\/li><\/ul>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-f334a33 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f334a33\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-edf6eee\" data-id=\"edf6eee\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-9160572 elementor-widget elementor-widget-image\" data-id=\"9160572\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-image\">\n\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"254\" src=\"https:\/\/lonelinerd.com\/wp-content\/uploads\/2022\/03\/CLR_10_3.png\" class=\"attachment-large size-large wp-image-2192\" alt=\"\" srcset=\"https:\/\/lonelinerd.com\/wp-content\/uploads\/2022\/03\/CLR_10_3.png 602w, https:\/\/lonelinerd.com\/wp-content\/uploads\/2022\/03\/CLR_10_3-300x127.png 300w\" sizes=\"auto, (max-width: 602px) 100vw, 602px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-995a476 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"995a476\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3510ba7\" data-id=\"3510ba7\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-43cb120 elementor-widget elementor-widget-text-editor\" data-id=\"43cb120\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item md-focus-container\"><p class=\"md-end-block md-p md-focus\"><span class=\"md-plain\">AIP\u7684\u597d\u8655\u4e3b\u8981\u662f\u70ba\u5f8c\u671f\u7684\u6539\u52d5<\/span><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u7bc0\u7701\u4e00\u4e9b\u7de8\u8b6f\u6210\u672c<\/span><\/span><\/span><\/p><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-plain\">\u4f7f\u7528AIP\u5c31\u7b49\u65bc\u5275\u5efa\u4e86\u4e00\u500b\u5c6c\u6027\uff0c\u4ee5\u5f8c\u518d\u5be6\u73feget\/set\u65b9\u6cd5\u4e5f\u4e0d\u9700\u8981\u91cd\u65b0\u7de8\u8b6f<\/span><\/p><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-plain\">\u5982\u679c\u4f7f\u7528\u5b57\u6bb5\uff0c\u5f8c\u671f\u6539\u505a\u5c6c\u6027\uff0c\u5c31\u9700\u8981\u91cd\u65b0\u7de8\u8b6f<\/span><\/p><\/li><\/ul><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-plain\">AIP\u7684\u58de\u8655<\/span><\/p><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">AIP\u9700\u5728\u69cb\u9020\u5668\u4e2d\u986f\u5f0f\u521d\u59cb\u5316<\/span><\/span><\/span><\/p><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u6709AIP\u7684\u985e\u578b\u7121\u6cd5\u5c0d\u5176\u5be6\u4f8b\u53cd\u5e8f\u5217\u5316<\/span><\/span><\/span><\/p><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u624b\u52d5\u5be6\u73fe\u7684\u5c6c\u6027\u53ef\u4ee5\u6253\u65b7\u9ede\uff0cAIP\u4e0d\u884c<\/span><\/span><\/span><\/p><\/li><\/ul><\/li><\/ul>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-0365009 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"0365009\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-5859932\" data-id=\"5859932\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-28d09aa elementor-widget elementor-widget-text-editor\" data-id=\"28d09aa\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<h5 class=\"md-end-block md-heading\"><strong><span class=\"md-plain\">\u6709\u53c3\u5c6c\u6027<\/span><\/strong><\/h5><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-html-inline md-expand\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u5c6c\u6027\u7684get\u8a2a\u554f\u5668\u63a5\u53d7\u4e00\u500b\/\u591a\u500b\u53c3\u6578\uff1bset\u8a2a\u554f\u5668\u63a5\u53d7\u5169\u500b\/\u591a\u500b\u53c3\u6578<\/span><\/span><\/span><\/p><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-plain\">C#\u5c0d\u6709\u53c3\u5c6c\u6027\u7a31\u4f5c<\/span><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u300c\u7d22\u5f15\u5668\u300d<\/span><\/span><\/span><\/p><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-plain\">\u53ef\u4ee5\u770b\u6210\u662f<\/span><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">[]\u64cd\u4f5c\u7b26\u7684\u91cd\u8f09<\/span><\/span><\/span><\/p><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">set\u8a2a\u554f\u5668\u672c\u4f86\u5c31\u6709\u4e00\u500b\u96b1\u85cf\u53c3\u6578\uff08value\uff09<\/span><\/span><\/span><\/p><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u985e\u578b\u53ef\u4ee5\u63d0\u4f9b\u591a\u500b\u91cd\u8f09\u7684\u7d22\u5f15\u5668\uff08\u9700\u8981\u7c3d\u540d\u4e0d\u540c\uff09<\/span><\/span><\/span><\/p><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">C#\u4e0d\u652f\u6301\u975c\u614b\u7d22\u5f15\u5668<\/span><\/span><\/span><\/p><\/li><\/ul><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-plain\">\u5c0d\u65bc<\/span><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">CLR<\/span><\/span><\/span><span class=\"md-plain\">\u800c\u8a00\uff0c<\/span><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u5c6c\u6027\u6709\u53c3\u6c92\u53c3\u4e26\u6c92\u6709\u5340\u5225<\/span><\/span><\/span><span class=\"md-plain\">\uff0c\u6bcf\u500b\u5c6c\u6027\u90fd\u53ea\u662f\u985e\u578b\u4e2d\u5b9a\u7fa9\u7684\u4e00\u5c0d\u65b9\u6cd5\u548c\u5143\u6578\u64da<\/span><\/p><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item\"><pre class=\"md-fences md-end-block ty-contain-cm modeLoaded\" lang=\"C#\" spellcheck=\"false\"><span role=\"presentation\"><span class=\"cm-keyword\">public<\/span> <span class=\"cm-variable-3\">string<\/span> <span class=\"cm-keyword\">this<\/span>[<span class=\"cm-variable-3\">int<\/span> <span class=\"cm-variable\">idx<\/span>]<\/span><br \/><span role=\"presentation\">{<\/span><br \/><span role=\"presentation\"> \u00a0 \u00a0<span class=\"cm-keyword\">get<\/span> { <span class=\"cm-keyword\">return<\/span> <span class=\"cm-string\">\"Hello World\"<\/span>; }<\/span><br \/><span role=\"presentation\">} \u00a0 \u00a0<\/span><\/pre><\/li><\/ul><\/li><\/ul>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-1610318 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"1610318\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-f780e8a\" data-id=\"f780e8a\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-428eb7b elementor-widget elementor-widget-image\" data-id=\"428eb7b\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-image\">\n\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"480\" height=\"302\" src=\"https:\/\/lonelinerd.com\/wp-content\/uploads\/2022\/03\/CLR_10_5.png\" class=\"attachment-large size-large wp-image-2194\" alt=\"\" srcset=\"https:\/\/lonelinerd.com\/wp-content\/uploads\/2022\/03\/CLR_10_5.png 480w, https:\/\/lonelinerd.com\/wp-content\/uploads\/2022\/03\/CLR_10_5-300x189.png 300w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-7d12354 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7d12354\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-6346d4b\" data-id=\"6346d4b\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b328d66 elementor-widget elementor-widget-text-editor\" data-id=\"b328d66\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<ul><li style=\"list-style-type: none;\"><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item md-focus-container\"><p class=\"md-end-block md-p md-focus\"><span class=\"md-plain md-expand\">\u7531\u65bc\u7d22\u5f15\u5668\u7121\u6cd5\u6307\u5b9a\u540d\u7a31\uff0c\u56e0\u6b64\u5728C#\u4e2d\uff0c\u9ed8\u8a8d\u70baItem<\/span><\/p><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-plain\">\u9019\u500b\u9ed8\u8a8d\u540d\u7a31\u53ef\u4ee5\u901a\u904eIndexerNameAttribute\u7279\u6027\u4f86\u91cd\u547d\u540d<\/span><\/p><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item md-focus-container\"><p class=\"md-end-block md-p md-focus\"><span class=\"md-plain md-expand\">\u8a72\u7279\u6027\u4e0d\u6703\u9032\u5165\u5143\u6578\u64da\uff0c\u5b83\u53ea\u544a\u8a34\u7de8\u8b6f\u5668\u8981\u600e\u9ebc\u5c0d\u65b9\u6cd5\u548c\u5c6c\u6027\u7684\u5143\u6578\u64da\u547d\u540d<\/span><\/p><\/li><li><span class=\"md-plain md-expand\">\u96d6\u7136\u53ef\u4ee5\u901a\u904e\u9019\u7a2e\u65b9\u6cd5\u4f86\u91cd\u547d\u540d\u7d22\u5f15\u5668\uff0c\u4f46\u4e26\u4e0d\u80fd\u7528\u4f86\u505a\u91cd\u8f09<\/span><\/li><\/ul><\/li><\/ul><\/li><\/ul>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-7b54151 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7b54151\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7718f17\" data-id=\"7718f17\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b0fe96f elementor-widget elementor-widget-image\" data-id=\"b0fe96f\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-image\">\n\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"567\" height=\"302\" src=\"https:\/\/lonelinerd.com\/wp-content\/uploads\/2022\/03\/CLR_10_6.png\" class=\"attachment-large size-large wp-image-2195\" alt=\"\" srcset=\"https:\/\/lonelinerd.com\/wp-content\/uploads\/2022\/03\/CLR_10_6.png 567w, https:\/\/lonelinerd.com\/wp-content\/uploads\/2022\/03\/CLR_10_6-300x160.png 300w\" sizes=\"auto, (max-width: 567px) 100vw, 567px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-f83ee06 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f83ee06\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-84ac2c7\" data-id=\"84ac2c7\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-cd2b7dd elementor-widget elementor-widget-text-editor\" data-id=\"cd2b7dd\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<h5 class=\"md-end-block md-heading md-focus\"><strong><span class=\"md-plain\">\u521d\u59cb\u5316\u5668\u521d\u59cb\u5316<\/span><\/strong><strong><span class=\"md-plain\">\u516c\u5171\u5c6c\u6027<\/span><\/strong><\/h5><ul><li>\u7121\u53c3<a href=\"https:\/\/lonelinerd.com\/index.php\/2023\/05\/28\/class-member-4\/\">\u69cb\u9020\u5668<\/a>\u7684\u5c0d\u8c61\uff0c\u53ef\u4ee5\u5728\u5be6\u4f8b\u5316\u6642\uff0c\u76f4\u63a5\u70ba\u5176\u516c\u5171\u5c6c\u6027\u8ce6\u503c<\/li><\/ul><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item\"><pre class=\"md-fences md-end-block ty-contain-cm modeLoaded\" lang=\"C#\" spellcheck=\"false\"><span role=\"presentation\"><span class=\"cm-variable\">Employee<\/span> <span class=\"cm-variable\">e1<\/span> <span class=\"cm-operator\">=<\/span> <span class=\"cm-keyword\">new<\/span> <span class=\"cm-variable\">Employee<\/span>() { <span class=\"cm-variable\">Name<\/span> <span class=\"cm-operator\">=<\/span> <span class=\"cm-string\">\"Kelvin\"<\/span>, <span class=\"cm-variable\">Age<\/span> <span class=\"cm-operator\">=<\/span> <span class=\"cm-number\">24<\/span> };<\/span><br \/><span role=\"presentation\"><span class=\"cm-comment\">\/\/\u6216<\/span><\/span><br \/><span role=\"presentation\"><span class=\"cm-variable\">Employee<\/span> <span class=\"cm-variable\">e2<\/span> <span class=\"cm-operator\">=<\/span> <span class=\"cm-keyword\">new<\/span> <span class=\"cm-variable\">Employee<\/span>();<\/span><br \/><span role=\"presentation\"><span class=\"cm-variable\">e2<\/span>.<span class=\"cm-variable\">Name<\/span> <span class=\"cm-operator\">=<\/span> <span class=\"cm-string\">\"Catherine\"<\/span>;<\/span><br \/><span role=\"presentation\"><span class=\"cm-variable\">e2<\/span>.<span class=\"cm-variable\">Age<\/span> <span class=\"cm-operator\">=<\/span> <span class=\"cm-number\">24<\/span>;<\/span><br \/><span role=\"presentation\">\u200b<\/span><br \/><span role=\"presentation\"><span class=\"cm-comment\">\/\/\u7121\u53c3\u69cb\u9020\u5668\u9650\u5b9a<\/span><\/span><br \/><span role=\"presentation\"><span class=\"cm-variable\">Employee<\/span> <span class=\"cm-variable\">e3<\/span> <span class=\"cm-operator\">=<\/span> <span class=\"cm-keyword\">new<\/span> <span class=\"cm-variable\">Employee<\/span> { <span class=\"cm-variable\">Name<\/span> <span class=\"cm-operator\">=<\/span> <span class=\"cm-string\">\"Aden\"<\/span>, <span class=\"cm-variable\">Age<\/span> <span class=\"cm-operator\">=<\/span> <span class=\"cm-number\">1000<\/span> };<\/span><\/pre><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-plain\">\u69cb\u9020\u5c0d\u8c61 =&gt; \u5c0d\u516c\u5171\u5c6c\u6027\u8ce6\u503c<\/span><\/p><\/li><li class=\"md-list-item\"><pre class=\"md-fences md-end-block ty-contain-cm modeLoaded\" lang=\"IL\" spellcheck=\"false\"><span role=\"presentation\">IL_0000:  nop<\/span><br \/><span role=\"presentation\">IL_0001:  newobj \u00a0 \u00a0 instance void CLR_Ch10.Program\/Employee::.ctor()<\/span><br \/><span role=\"presentation\">IL_0006:  dup<\/span><br \/><span role=\"presentation\">IL_0007:  ldstr \u00a0 \u00a0  \"Kelvin\"<\/span><br \/><span role=\"presentation\">IL_000c:  stfld \u00a0 \u00a0  string CLR_Ch10.Program\/Employee::Name<\/span><br \/><span role=\"presentation\">IL_0011:  dup<\/span><br \/><span role=\"presentation\">IL_0012:  ldc.i4.s \u00a0 24<\/span><br \/><span role=\"presentation\">IL_0014:  stfld \u00a0 \u00a0  int32 CLR_Ch10.Program\/Employee::Age<\/span><br \/><span role=\"presentation\">IL_0019:  stloc.0<\/span><br \/><span role=\"presentation\">IL_001a:  newobj \u00a0 \u00a0 instance void CLR_Ch10.Program\/Employee::.ctor()<\/span><br \/><span role=\"presentation\">IL_001f:  stloc.1<\/span><br \/><span role=\"presentation\">IL_0020:  ldloc.1<\/span><br \/><span role=\"presentation\">IL_0021:  ldstr \u00a0 \u00a0  \"Catherine\"<\/span><br \/><span role=\"presentation\">IL_0026:  stfld \u00a0 \u00a0  string CLR_Ch10.Program\/Employee::Name<\/span><br \/><span role=\"presentation\">IL_002b:  ldloc.1<\/span><br \/><span role=\"presentation\">IL_002c:  ldc.i4.s \u00a0 24<\/span><br \/><span role=\"presentation\">IL_002e:  stfld \u00a0 \u00a0  int32 CLR_Ch10.Program\/Employee::Age<\/span><\/pre><\/li><\/ul><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u5982\u679c\u5c6c\u6027\u5be6\u73fe\u4e86IEnumerable\/IEnumerable<\/span><\/span><\/span><span class=\"md-tag md-raw-inline\" spellcheck=\"false\">&lt;T&gt;<\/span><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u63a5\u53e3\uff0c\u5c31\u6703\u88ab\u8a8d\u70ba\u662f\u96c6\u5408\uff0c\u5982\u679c\u9084\u91cd\u5beb\u4e86Add\u65b9\u6cd5\uff0c\u5c31\u53ef\u4ee5\u76f4\u63a5\u7528\u9019\u7a2e\u65b9\u5f0f\u4f86\u521d\u59cb\u5316<\/span><\/span><\/span><\/p><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item\"><pre class=\"md-fences md-end-block ty-contain-cm modeLoaded\" lang=\"C#\" spellcheck=\"false\"><span role=\"presentation\"><span class=\"cm-variable\">Dictionary<\/span><span class=\"cm-operator\">&lt;<\/span><span class=\"cm-variable-3\">string<\/span>, <span class=\"cm-variable-3\">int<\/span><span class=\"cm-operator\">&gt;<\/span> <span class=\"cm-variable\">table<\/span> <span class=\"cm-operator\">=<\/span> <span class=\"cm-keyword\">new<\/span> <span class=\"cm-variable\">Dictionary<\/span><span class=\"cm-operator\">&lt;<\/span><span class=\"cm-variable-3\">string<\/span>, <span class=\"cm-variable-3\">int<\/span><span class=\"cm-operator\">&gt;<\/span><\/span><br \/><span role=\"presentation\">{<\/span><br \/><span role=\"presentation\"> \u00a0  { <span class=\"cm-string\">\"Kelvin\"<\/span>, <span class=\"cm-number\">24<\/span> },<\/span><br \/><span role=\"presentation\"> \u00a0  { <span class=\"cm-string\">\"Catherine\"<\/span>, <span class=\"cm-number\">24<\/span> },<\/span><br \/><span role=\"presentation\"> \u00a0  { <span class=\"cm-string\">\"Aden\"<\/span>, <span class=\"cm-number\">1000<\/span> },<\/span><br \/><span role=\"presentation\">};<\/span><\/pre><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-plain\">\u5be6\u969b\u4e0a\u5c31\u662f<\/span><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u7531\u7de8\u8b6f\u5668\u4f86\u8abf\u7528Add\u65b9\u6cd5<\/span><\/span><\/span><span class=\"md-plain\">\uff08\u6240\u4ee5\u5982\u679c\u6c92\u5be6\u73feAdd\u65b9\u6cd5\uff0c\u5c31\u4e0d\u53ef\u4ee5\u9019\u6a23\u521d\u59cb\u5316\uff09<\/span><\/p><\/li><li class=\"md-list-item\"><pre class=\"md-fences md-end-block ty-contain-cm modeLoaded\" lang=\"IL\" spellcheck=\"false\"><span role=\"presentation\">IL_004f:  newobj \u00a0 \u00a0 instance void class [System.Collections]System.Collections.Generic.Dictionary`2&lt;string,int32&gt;::.ctor()<\/span><br \/><span role=\"presentation\">IL_0054:  dup<\/span><br \/><span role=\"presentation\">IL_0055:  ldstr \u00a0 \u00a0  \"Kelvin\"<\/span><br \/><span role=\"presentation\">IL_005a:  ldc.i4.s \u00a0 24<\/span><br \/><span role=\"presentation\">IL_005c:  callvirt \u00a0 instance void class [System.Collections]System.Collections.Generic.Dictionary`2&lt;string,int32&gt;::Add(!0,<\/span><br \/><span role=\"presentation\">!1)<\/span><br \/><span role=\"presentation\">IL_0061:  nop<\/span><br \/><span role=\"presentation\">IL_0062:  dup<\/span><br \/><span role=\"presentation\">IL_0063:  ldstr \u00a0 \u00a0  \"Catherine\"<\/span><br \/><span role=\"presentation\">IL_0068:  ldc.i4.s \u00a0 24<\/span><br \/><span role=\"presentation\">IL_006a:  callvirt \u00a0 instance void class [System.Collections]System.Collections.Generic.Dictionary`2&lt;string,int32&gt;::Add(!0,<\/span><br \/><span role=\"presentation\">!1)<\/span><br \/><span role=\"presentation\">IL_006f:  nop<\/span><br \/><span role=\"presentation\">IL_0070:  dup<\/span><br \/><span role=\"presentation\">IL_0071:  ldstr \u00a0 \u00a0  \"Aden\"<\/span><br \/><span role=\"presentation\">IL_0076:  ldc.i4 \u00a0 \u00a0 0x3e8<\/span><br \/><span role=\"presentation\">IL_007b:  callvirt \u00a0 instance void class [System.Collections]System.Collections.Generic.Dictionary`2&lt;string,int32&gt;::Add(!0,<\/span><br \/><span role=\"presentation\">!1)<\/span><\/pre><\/li><\/ul><\/li><\/ul><div class=\"md-hr md-end-block\" tabindex=\"-1\"><hr \/><\/div>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-b4277fb elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b4277fb\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-b89d837\" data-id=\"b89d837\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5aac97b elementor-widget elementor-widget-text-editor\" data-id=\"5aac97b\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<p><strong style=\"font-size: 1.2em;\"><span class=\"md-plain\">\u6027\u80fd\u554f\u984c<\/span><\/strong><\/p><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u5c0d\u65bc\u7c21\u55ae\u7684get\/set\uff0cJIT\u6703\u5c07\u4ee3\u78bc\u5167\u806f\uff0c\u907f\u514d\u4e86\u6027\u80fd\u4e0a\u7684\u640d\u5931<\/span><\/span><\/span><\/p><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u5167\u806f\uff1a\u5c07\u65b9\u6cd5\uff08get\/set\uff09\u76f4\u63a5\u7de8\u8b6f\u5230\u8abf\u7528\u5b83\u7684\u65b9\u6cd5\u4e2d\uff0c\u907f\u514d\u5728\u904b\u884c\u6642\u767c\u751f\u8abf\u7528\u6240\u7522\u751f\u7684\u958b\u92b7<\/span><\/span><\/span><\/p><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-plain\">\u6703\u4f7f\u7de8\u8b6f\u597d\u7684\u65b9\u6cd5\u8b8a\u5927\uff0c\u4f46\u4e00\u822c\u8a2a\u554f\u5668\u65b9\u6cd5\u4ee3\u78bc\u4e0d\u591a<\/span><\/p><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-plain\">\u53ef\u4f7f\u672c\u6a5f\u4ee3\u78bc\u8b8a\u5f97\u8f15\u91cf\uff0c\u57f7\u884c\u66f4\u5feb<\/span><\/p><\/li><\/ul><\/li><\/ul><\/li><\/ul><h5 class=\"md-end-block md-p\"><strong><span class=\"md-plain\">\u53ef\u8a2a\u554f\u6027<\/span><\/strong><\/h5><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item md-focus-container\"><p class=\"md-end-block md-p md-focus\"><span class=\"md-html-inline md-expand\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u5c6c\u6027\u672c\u8eab\u7684\u53ef\u8a2a\u554f\u6027\u9650\u5236\u5fc5\u9808\u5c0f\u65bc\/\u7b49\u65bc\u5176\u8a2a\u554f\u5668\u65b9\u6cd5\uff08get\/set\uff09\u7684\u53ef\u8a2a\u554f\u6027\u9650\u5236<\/span><\/span><\/span><\/p><\/li><li class=\"md-list-item\" style=\"font-size: 15px;\"><p class=\"md-end-block md-p\" style=\"font-size: 15px;\"><span class=\"md-plain\">\u4e00\u822c\u4f86\u8aaa\uff0c\u5176\u4ed6\u8b8a\u91cf\u5982\u679c\u4e0d\u660e\u78ba\u6307\u51fa\u8a2a\u554f\u6b0a\u9650\uff0c\u5c31\u662f\u9ed8\u8a8d\u79c1\u6709\u7684\u3002\u4f46\u5c0d\u65bc\u5c6c\u6027\u800c\u8a00\uff0c<\/span><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\">\u5b83\u7684\u53d6\u503c\/\u8ce6\u503c\u65b9\u6cd5\u5c31\u8981\u6c42\u660e\u78ba\u6307\u5b9a\u8a2a\u554f\u6b0a\u9650\uff0c\u5426\u5247\u5c31\u9ed8\u8a8d\u8207\u5c6c\u6027\u672c\u8eab\u6574\u9ad4\u4fdd\u6301\u4e00\u81f4\u7684\u8a2a\u554f\u4fee\u98fe\u7b26<\/span><\/span><\/p><\/li><\/ul>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-beb10d9 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"beb10d9\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-89abc7c\" data-id=\"89abc7c\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1444bfc elementor-widget elementor-widget-text-editor\" data-id=\"1444bfc\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<h5 class=\"md-end-block md-heading\"><strong><span class=\"md-plain\">\u5c6c\u6027\u8207\u5b57\u6bb5<\/span><\/strong><\/h5><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item md-focus-container\"><p class=\"md-end-block md-p md-focus\"><span class=\"md-html-inline md-expand\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u5c6c\u6027\u4e0d\u80fd\u4f5c\u70baout\/ref\u53c3\u6578<\/span><\/span><\/span><span class=\"md-plain\">\u50b3\u7d66\u65b9\u6cd5\uff1b\u5b57\u6bb5\u53ef\u4ee5<\/span><\/p><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p\"><span class=\"md-plain\">\u5c6c\u6027<\/span><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u8a2a\u554f\u6548\u7387\u4f4e\u65bc\u4e00\u822c\u65b9\u6cd5<\/span><\/span><\/span><span class=\"md-plain\">\uff1b\u6700\u597d\u662f\u901a\u904e\u5b9a\u7fa9\u81ea\u5df1\u7684\u8a2a\u554f\u5668\u65b9\u6cd5\u4f86\u8a2a\u554f\u5b57\u6bb5<\/span><\/p><\/li><li class=\"md-list-item\"><p class=\"md-end-block md-p md-focus\"><span class=\"md-html-inline\" spellcheck=\"false\"><span style=\"color: red;\"><span class=\"md-plain\">\u5c6c\u6027\u8fd4\u56de\u5f15\u7528\u53ef\u80fd\u4e26\u975e\u6307\u5411\u5c0d\u8c61\u72c0\u614b\u4e00\u90e8\u5206\/\u4fee\u6539\u4f5c\u7528\u4e0d\u5230\u539f\u59cb\u5c0d\u8c61<\/span><\/span><\/span><span class=\"md-plain\">\uff1b\u5b57\u6bb5\u7e3d\u662f\u5728\u64cd\u63a7\u8457\u539f\u59cb\u5c0d\u8c61<\/span><\/p><\/li><\/ul>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-4d5a5a7 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"4d5a5a7\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a3f0fd4\" data-id=\"a3f0fd4\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-35000bb elementor-widget-divider--view-line elementor-widget elementor-widget-divider\" data-id=\"35000bb\" data-element_type=\"widget\" data-widget_type=\"divider.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-divider\">\n\t\t\t<span class=\"elementor-divider-separator\">\n\t\t\t\t\t\t<\/span>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-8639a20 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"8639a20\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-6c2d7fb\" data-id=\"6c2d7fb\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b71b85f elementor-widget elementor-widget-text-editor\" data-id=\"b71b85f\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<h4 class=\"md-end-block md-heading\"><span style=\"text-decoration: underline;\"><strong><span class=\"md-plain md-expand\">\u53c3\u8003\u66f8\u76ee<\/span><\/strong><\/span><\/h4><ul class=\"ul-list\" data-mark=\"-\"><li class=\"md-list-item md-focus-container\">\u300aCLR via C#\u300b\uff08\u7b2c4\u7248\uff09 Jeffrey Richter<\/li><\/ul>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\u5c6c\u6027\u7528\u65bc\u4ee5\u5b57\u6bb5\u98a8\u683c\u7684\u8a9e\u6cd5\u8a2d\u7f6e\/\u67e5\u8a62\u5c0d\u8c61\u7684\u908f\u8f2f\u72c0\u614b\uff0c\u540c\u6642\u4fdd\u8b49\u72c0\u614b\u4e0d\u88ab\u7834\u58de\u3002\u975c\u614b\u5c6c\u6027\u4f5c\u7528\u65bc\u985e\u578b\uff1b\u5be6\u4f8b\u5c6c\u6027\u4f5c\u7528\u65bc\u5c0d\u8c61<\/p>\n","protected":false},"author":1,"featured_media":947,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,27,18],"tags":[],"class_list":["post-3417","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-reading-notes","category-c-sharp","category-developing"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/lonelinerd.com\/wp-content\/uploads\/2021\/03\/FeatureCover_ReadingNotes.png","_links":{"self":[{"href":"https:\/\/lonelinerd.com\/index.php\/wp-json\/wp\/v2\/posts\/3417","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lonelinerd.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lonelinerd.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lonelinerd.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lonelinerd.com\/index.php\/wp-json\/wp\/v2\/comments?post=3417"}],"version-history":[{"count":33,"href":"https:\/\/lonelinerd.com\/index.php\/wp-json\/wp\/v2\/posts\/3417\/revisions"}],"predecessor-version":[{"id":3957,"href":"https:\/\/lonelinerd.com\/index.php\/wp-json\/wp\/v2\/posts\/3417\/revisions\/3957"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lonelinerd.com\/index.php\/wp-json\/wp\/v2\/media\/947"}],"wp:attachment":[{"href":"https:\/\/lonelinerd.com\/index.php\/wp-json\/wp\/v2\/media?parent=3417"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lonelinerd.com\/index.php\/wp-json\/wp\/v2\/categories?post=3417"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lonelinerd.com\/index.php\/wp-json\/wp\/v2\/tags?post=3417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}