{"id":783,"date":"2012-12-08T21:33:20","date_gmt":"2012-12-08T13:33:20","guid":{"rendered":"http:\/\/www.vcoo.cc\/blog\/?p=783"},"modified":"2012-12-08T21:33:20","modified_gmt":"2012-12-08T13:33:20","slug":"csharp-naming","status":"publish","type":"post","link":"https:\/\/vcoo.cc\/blog\/783\/","title":{"rendered":"C#\u8bed\u8a00\u547d\u540d\u76849\u79cd\u89c4\u8303"},"content":{"rendered":"<p>\u672c\u6587\u4ece\u7c7b\u3001\u7c7b\u5b57\u6bb5\u3001\u65b9\u6cd5\u5c5e\u6027\u3001\u53c2\u6570\u5e38\u91cf\u3001\u63a5\u53e3\u3001\u4e8b\u4ef6\u3001\u547d\u540d\u7a7a\u95f4\u7b499\u4e2a\u65b9\u9762\u603b\u7ed3\u4e86C#\u8bed\u8a00\u547d\u540d\u7684\u89c4\u5219\u3002<\/p>\n<p><strong>a)\u7c7b<\/strong><\/p>\n<p>\u3010\u89c4\u52191-1\u3011\u4f7f\u7528Pascal\u89c4\u5219\u547d\u540d\u7c7b\u540d\uff0c\u5373\u9996\u5b57\u6bcd\u8981\u5927\u5199\u3002<\/p>\n<p>\u3010\u89c4\u52191-2\u3011\u4f7f\u7528\u80fd\u591f\u53cd\u6620\u7c7b\u529f\u80fd\u7684\u540d\u8bcd\u6216\u540d\u8bcd\u77ed\u8bed\u547d\u540d\u7c7b\u3002<\/p>\n<p>\u3010\u89c4\u52191-3\u3011\u4e0d\u8981\u4f7f\u7528\u201cI\u201d\u3001\u201cC\u201d\u3001\u201c_\u201d\u7b49\u7279\u5b9a\u542b\u4e49\u524d\u7f00\u3002<\/p>\n<p>\u3010\u89c4\u52191-4\u3011\u81ea\u5b9a\u4e49\u5f02\u5e38\u7c7b\u5e94\u4ee5Exception\u7ed3\u5c3e\u3002<\/p>\n<p>\u3010\u89c4\u52191-5\u3011\u6587\u4ef6\u540d\u8981\u80fd\u53cd\u6620\u7c7b\u7684\u5185\u5bb9\uff0c\u6700\u597d\u662f\u548c\u7c7b\u540c\u540d\u3002<\/p>\n<p><strong>b) \u7c7b\u5b57\u6bb5<\/strong><\/p>\n<p>\u3010\u89c4\u52192-1\u3011\u7528camel\u89c4\u5219\u6765\u547d\u540d\u7c7b\u6210\u5458\u53d8\u91cf\u540d\u79f0\uff0c\u5373\u9996\u5355\u8bcd\uff08\u6216\u5355\u8bcd\u7f29\u5199\uff09\u5c0f\u5199\u3002<\/p>\n<p>\u3010\u89c4\u52192-2\u3011\u7c7b\u5b57\u6bb5\u53d8\u91cf\u540d\u524d\u53ef\u52a0\u201c_\u201d\u524d\u7f00\u3002<\/p>\n<p>\u3010\u89c4\u52192-3\u3011\u575a\u51b3\u7981\u6b62\u5728\u666e\u901a\u53d8\u91cf\u524d\u52a0\u201cm_\u201d\uff08\u8fd9\u662fVC\u8001\u547d\u540d\u89c4\u5219\uff09\u3002<\/p>\n<p><strong>c\uff09\u65b9\u6cd5<\/strong><\/p>\n<p>\u3010\u89c4\u52193-1\u3011\u65b9\u6cd5\u540d\u91c7\u7528Pascal\u89c4\u5219\uff0c\u7b2c\u4e00\u4e2a\u5b57\u7b26\u8981\u5927\u5199\u3002<\/p>\n<p>\u3010\u89c4\u52193-2\u3011\u65b9\u6cd5\u540d\u5e94\u4f7f\u7528\u52a8\u8bcd\u6216\u52a8\u8bcd\u77ed\u8bed\u3002<\/p>\n<p>\u3010\u89c4\u52193-3\u3011\u7c7b\u4e2d\u8bbf\u95ee\u4fee\u9970\u7b26\u6216\u529f\u80fd\u76f8\u540c\u7684\u65b9\u6cd5\u5e94\u8be5\u653e\u5728\u4e00\u8d77\uff0c \u4e14\u516c\u5171\u6216\u5b9e\u73b0\u63a5\u53e3\u7684\u65b9\u6cd5\u5728\u524d\u3002<\/p>\n<p><strong>d\uff09\u5c5e\u6027<\/strong><\/p>\n<p>\u3010\u89c4\u52194-1\u3011\u4f7f\u7528\u540d\u8bcd\u5b9a\u4e49\u5c5e\u6027\uff0c\u5c5e\u6027\u4f7f\u7528Pascal\u89c4\u5219\uff0c\u9996\u5b57\u7b26\u5927\u5199\u3002<\/p>\n<p>\u3010\u89c4\u52194-2\u3011\u5c5e\u6027\u548c\u76f8\u5e94\u5b57\u6bb5\u540d\u79f0\u8981\u5173\u8054\uff0c\u53ef\u4ee5\u4f7f\u7528\u201c\u91cd\u6784\u201d\u83dc\u5355\u6765\u751f\u6210\u5c5e\u6027\u3002<\/p>\n<p><strong>e\uff09\u53c2\u6570<\/strong><\/p>\n<p>\u3010\u89c4\u52195-1\u3011\u53c2\u6570\u91c7\u7528camel\u89c4\u5219\u547d\u540d\uff0c\u4e14\u9996\u5b57\u7b26\u5c0f\u5199\u3002<\/p>\n<p>\u3010\u89c4\u52195-2\u3011\u4f7f\u7528\u63cf\u8ff0\u6027\u53c2\u6570\u540d\u79f0\uff0c\u53c2\u6570\u540d\u79f0\u5e94\u5f53\u5177\u6709\u6700\u591f\u7684\u8bf4\u660e\u6027\u3002<\/p>\n<p>\u3010\u89c4\u52195-3\u3011\u4e0d\u8981\u7ed9\u53c2\u6570\u52a0\u5308\u7259\u5229\u8bed\u7c7b\u578b\u8868\u793a\u6cd5\u7684\u524d\u7f00\u3002<\/p>\n<p>\u3010\u89c4\u52195-4\u3011\u68c0\u67e5\u65b9\u6cd5\u6240\u6709\u8f93\u5165\u53c2\u6570\u7684\u6709\u6548\u6027\u3002<\/p>\n<p><strong>f\uff09\u5e38\u91cf<\/strong><\/p>\n<p>\u3010\u89c4\u52196-1\u3011\u53ea\u8bfb\u5e38\u91cf\u4f7f\u7528Pascal\u547d\u540d\u89c4\u5219\uff0c\u5373\u9996\u5b57\u6bcd\u5927\u5199\u3002<\/p>\n<p>\u3010\u89c4\u52196-2\u3011\u679a\u4e3e\u540d\u4f7f\u7528Pascal\u89c4\u5219\u547d\u540d\uff0c\u679a\u4e3e\u6210\u5458\u672c\u8d28\u5c5e\u4e8e\u5e38\u91cf\uff0c\u547d\u540d\u89c4\u5219\u540c\u4e0a\u3002<\/p>\n<p>\u3010\u89c4\u52196-3\u3011\u679a\u4e3e\u503c\u4ece\u5c0f\u5230\u5927\u987a\u5e8f\u5b9a\u4e49\u3002<\/p>\n<p>\u3010\u89c4\u52196-4\u3011\u9759\u6001\u5b57\u6bb5\u6216\u5c5e\u6027\u91c7\u7528Pascal\u89c4\u5219\uff0c\u5373\u9996\u5b57\u7b26\u5927\u5199\u3002<\/p>\n<p><strong>g\uff09\u63a5\u53e3<\/strong><\/p>\n<p>\u3010\u89c4\u52197-1\u3011\u63a5\u53e3\u5b9a\u4e49\u4f7f\u7528Pascal\u89c4\u5219\uff0c\u4e14\u5fc5\u987b\u4ee5\u5927\u5199\u201cI\u201d\u5f00\u5934\u3002<\/p>\n<p>\u3010\u89c4\u52197-2\u3011\u63a5\u53e3\u540d\u79f0\u8981\u6709\u610f\u4e49\uff0c\u4e2d\u95f4\u4e0d\u8981\u6709\u4e0b\u5212\u7ebf\u201c_\u201d\u7b49\u5b57\u7b26\u3002<\/p>\n<p>\u3010\u89c4\u52197-3\u3011\u5982\u679c\u7c7b\u5b9e\u73b0\u4e86\u63a5\u53e3\uff0c\u540d\u79f0\u5c3d\u91cf\u548c\u63a5\u53e3\u76f8\u540c\uff0c\u53ea\u662f\u7701\u6389\u201cI\u201d\u5b57\u7b26\u3002<\/p>\n<p><strong>h\uff09\u4e8b\u4ef6<\/strong><\/p>\n<p>\u3010\u89c4\u52198-1\u3011\u59d4\u6258\u540d\u79f0\u91c7\u7528Pascal\u89c4\u5219\uff0c\u5373\u9996\u5b57\u7b26\u5927\u5199\u3002<\/p>\n<p>\u3010\u89c4\u52198-2\u3011\u5b9a\u4e49\u4e8b\u4ef6\u7684\u59d4\u6258\u8981\u4f7f\u7528EventHandler\u540e\u7f00\uff0c\u4e14\u5305\u62ecsender\u548ce\u4e24\u4e2a\u53c2\u6570\u3002<\/p>\n<p>\u3010\u89c4\u52198-3\u3011\u4e8b\u4ef6\u7528\u5230\u7684\u53c2\u6570\u7c7b\uff0c\u540d\u79f0\u8981\u5e26EventArgs\u540e\u7f00\u3002<\/p>\n<p><strong>i) C#\u8bed\u8a00\u547d\u540d\u7a7a\u95f4<\/strong><\/p>\n<p>\u3010\u89c4\u52199-1\u3011\u547d\u540d\u7a7a\u95f4\u540d\u79f0\u91c7\u7528Pascal\u89c4\u5219\uff0c\u4e14\u9996\u5b57\u7b26\u5927\u5199\u3002<\/p>\n<p>\u3010\u89c4\u52199-2\u3011\u547d\u540d\u7a7a\u95f4\u540d\u79f0\u5c3d\u91cf\u53cd\u6620\u5176\u5185\u5bb9\u6240\u63d0\u4f9b\u7684\u6574\u4f53\u529f\u80fd\u3002<\/p>\n<p>C#\u8bed\u8a00\u547d\u540d\u89c4\u8303\u5148\u8bb2\u5230\u8fd9\u91cc\uff0c\u4eca\u540e\u8fd8\u4f1a\u8bb2\u5230\u5176\u4ed6\u7684\u89c4\u8303\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u4ece\u7c7b\u3001\u7c7b\u5b57\u6bb5\u3001\u65b9\u6cd5\u5c5e\u6027\u3001\u53c2\u6570\u5e38\u91cf\u3001\u63a5\u53e3\u3001\u4e8b\u4ef6\u3001\u547d\u540d\u7a7a\u95f4\u7b499\u4e2a\u65b9\u9762\u603b\u7ed3\u4e86C#\u8bed\u8a00\u547d\u540d\u7684\u89c4\u5219\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[195,201,51,233],"class_list":["post-783","post","type-post","status-publish","format-standard","hentry","category-csharp","tag-csharp-2","tag-dotnet","tag-51","tag-233","cat-13-id"],"_links":{"self":[{"href":"https:\/\/vcoo.cc\/blog\/wp-json\/wp\/v2\/posts\/783","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vcoo.cc\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vcoo.cc\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vcoo.cc\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vcoo.cc\/blog\/wp-json\/wp\/v2\/comments?post=783"}],"version-history":[{"count":0,"href":"https:\/\/vcoo.cc\/blog\/wp-json\/wp\/v2\/posts\/783\/revisions"}],"wp:attachment":[{"href":"https:\/\/vcoo.cc\/blog\/wp-json\/wp\/v2\/media?parent=783"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vcoo.cc\/blog\/wp-json\/wp\/v2\/categories?post=783"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vcoo.cc\/blog\/wp-json\/wp\/v2\/tags?post=783"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}