{"id":362,"date":"2020-11-21T18:35:09","date_gmt":"2020-11-21T10:35:09","guid":{"rendered":"http:\/\/admin.lastdream.net\/?p=362"},"modified":"2020-11-21T18:35:09","modified_gmt":"2020-11-21T10:35:09","slug":"2020-11-21-cjichubiji","status":"publish","type":"post","link":"https:\/\/admin.vsingers.com\/index.php\/2020\/11\/21\/2020-11-21-cjichubiji\/","title":{"rendered":"2020.11.21 C#\u57fa\u7840\u7b14\u8bb0"},"content":{"rendered":"<p>https:\/\/www.bilibili.com\/video\/BV1w4411D78z?p=15<\/p>\n<p>&nbsp;<\/p>\n<h3>\u5b9a\u4e49\u53d8\u91cf\uff1a<\/h3>\n<p>{<\/p>\n<p>int hp;<\/p>\n<p>}<\/p>\n<p>int \u6570\u636e\u683c\u5f0f\/\u6570\u636e\u7c7b\u578b\u3002<\/p>\n<p>hp \u53d8\u91cf\u540d\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3>float \u6d6e\u70b9\u578b\/\u5c0f\u6570\uff1a<\/h3>\n<p>{<\/p>\n<p>float pi;<\/p>\n<p>pi = 3.14f;\/\/\u52a0f\u6807\u8bc6\u6d6e\u70b9\u6570\u5e38\u91cf\uff0c\u5c0f\u6570\u52a0f\uff0c\u65e0\u5c0f\u6570\u53ef\u4e0d\u52a0\uff0c\u5426\u5219\u7a0b\u5e8f\u53ef\u80fd\u8bc6\u522b\u4e3adouble\u7c7b\u578b<\/p>\n<p>}<\/p>\n<p>&nbsp;<\/p>\n<h3>\u8fde\u7eed\u5b9a\u4e49\u591a\u4e2a\u53d8\u91cf\uff1a<\/h3>\n<p>{<\/p>\n<p>string oldName,newName;\/\/\u8fde\u7eed\u8d4b\u503c\u53d8\u91cf\u3001\u9a7c\u5cf0\u547d\u540d\u65b9\u5f0f<\/p>\n<p>}<\/p>\n<p>&nbsp;<\/p>\n<h3>\u968f\u673a\u6570\uff1a<\/h3>\n<p>{<\/p>\n<p>Random rnd = new Random();<\/p>\n<p>rnd.Next(3);\/\/\u4ea7\u751f\u5c0f\u4e8e3\u7684\u968f\u673a\u6570<\/p>\n<p>}<\/p>\n<p>&nbsp;<\/p>\n<h3>\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u5230int\u578b\uff1a<\/h3>\n<p>{<\/p>\n<p>string shp;<\/p>\n<p>\/\/&lt;&lt;= int.parse(shp);<\/p>\n<p>}<\/p>\n<p>shp\u4e3a\u6709\u6548\u7c7b\u578b\uff0c\u5982\u6574\u6570\u5b57\u7b26\u4e32\uff0c\u5c06\u5b57\u7b26\u53d8\u91cfshp\u8f6c\u6362\u5230\u6574\u6570\u578b<\/p>\n<p>&nbsp;<\/p>\n<h3>for\u5faa\u73af\u89e3\u6790\uff1a<\/h3>\n<p>for(int i = 1;i &lt;= 10;i++)<\/p>\n<p>{<\/p>\n<p>}<\/p>\n<p>int i = 1 \u5b9a\u4e49\u53ca\u521d\u59cb\u503c\uff0c\u521d\u59cb\u5faa\u73af\u6267\u884c\u4e00\u6b21<\/p>\n<p>i &lt;= 10 \u5faa\u73af\u6761\u4ef6\uff0c\u6267\u884c11\u6b21\uff0c\u7b2c11\u6b21\u4e0d\u6ee1\u8db3\u8be5\u6761\u4ef6\u8df3\u51fa<\/p>\n<p>i++ \u5faa\u73af\u540e\u505a\u7684\u4e8b\u60c5\uff0c\u6267\u884c10\u6b21<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-369\" src=\"http:\/\/admin.lastdream.net\/wp-content\/uploads\/2020\/11\/QQ\u622a\u56fe20201121185150.png\" alt=\"\" width=\"1274\" height=\"524\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>C#\u7279\u6027\uff1a\u82b1\u62ec\u53f7\u5185\u5916\u4e0d\u80fd\u7528\u540c\u540d\u53d8\u91cf<\/h3>\n<p>\u5982\uff1a<\/p>\n<p>{<\/p>\n<p>int i;<\/p>\n<p>for(int i;i&lt;=10;i++) { }\/\/\u6b64\u65f6i\u4f1a\u63d0\u793a\u5b58\u5728\u540c\u540d<\/p>\n<p>}<\/p>\n<p>&nbsp;<\/p>\n<h3>\u53ef\u76f4\u63a5\u4f7f\u7528\u82b1\u62ec\u53f7\u9694\u79bb\uff0c\u65e0\u9700\u4efb\u4f55\u5b9a\u4e49\uff1a<\/h3>\n<p>{<\/p>\n<p>int i;<\/p>\n<p>{\/\/\u5355\u72ec\u62ec\u53f7<\/p>\n<p>for(int i;i&lt;=10;i++) { }\/\/\u6b64\u65f6i\u4f1a\u63d0\u793a\u5b58\u5728\u540c\u540d<\/p>\n<p>}\/\/\u5355\u72ec\u62ec\u53f7<\/p>\n<p>}<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-364\" src=\"http:\/\/admin.lastdream.net\/wp-content\/uploads\/2020\/11\/QQ\u622a\u56fe20201121183601.png\" alt=\"\" width=\"563\" height=\"391\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/www.bilibili.com\/video\/BV1w4411D78z?p=15 &nbsp; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":364,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,5],"tags":[],"class_list":["post-362","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c_net","category-ri_ji"],"_links":{"self":[{"href":"https:\/\/admin.vsingers.com\/index.php\/wp-json\/wp\/v2\/posts\/362","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/admin.vsingers.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/admin.vsingers.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/admin.vsingers.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/admin.vsingers.com\/index.php\/wp-json\/wp\/v2\/comments?post=362"}],"version-history":[{"count":0,"href":"https:\/\/admin.vsingers.com\/index.php\/wp-json\/wp\/v2\/posts\/362\/revisions"}],"wp:attachment":[{"href":"https:\/\/admin.vsingers.com\/index.php\/wp-json\/wp\/v2\/media?parent=362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/admin.vsingers.com\/index.php\/wp-json\/wp\/v2\/categories?post=362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/admin.vsingers.com\/index.php\/wp-json\/wp\/v2\/tags?post=362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}