资源描述:
《c# how to program43_2》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、csphtp1.bookPage1346Wednesday,November21,200112:48PM1346GeneratingDocumentationinVisualStudioAppendixE219220Entrypointofapplication.221222223Inthisapplicationallcommand-linearguments224areignored.2252262
2、27OptionalargumentstoMain.228229230231232Fig.E.8XMLdocumentationgeneratedbyVisualStudio.NET.(Part6of6.)NoticethatonlyclassmembersareincludedinthegeneratedXMLfile.EachclassmemberhasamemberelementwhichincludesallXMLcommentsforth
3、atmember.Forexample,lines50–69defineamemberelementthatcontainsinformationonthetwo-argu-mentPointconstructor.Thenameattributeofamembertagisastringthatcontainsinformationaboutthenameandtypeofthemember.Thetypeisspecifiedbyacapitalletter:Mstandsformethod,Pforprop
4、erty(orindexer),EforeventandTfortype(i.e,class).Foracompletelistingoftheseabbreviations,selectHelp>Index,thenlocatethetopicprocessingXMLfilesinC#.InFig.E.8,line51containsthevalueofthenameattributeandcontainsanMasthefirstletter,indicatingthatline51declaresamet
5、hod(recallthataconstructorisaspecializedmethod).Acolonfollows,afterwhichthefullnameofthemethodisshown.Forthisexample,itisCir-cleTest.Point.#ctor(System.Int32,System.Int32).Becausethisisaconstructor,thestring#ctorisusedinthefullyqualifiedname.Thisconstructorta
6、kestwointarguments—theparenthesesafterthenameofeachmemberspecifythatmember’stype.TERMINOLOGY///(documentationcomment)nameattributeofmemberelementBuildCommentWebPagesparaelementcelementparamelementclassdefinitionparametersconstructorpropertycreatingXMLdocument
7、ationreferencedirectoryremarkselementdocumentationreturnvalueDocumentationcolumnreturnselementHTMLseeelementinstancevariablesourcecodeinterfacedefinitionstylesheetmembersummaryelementmemberelementtagMemberscolumnvalueelementmethoddeclarationXMLdocumentationco
8、mmentcsphtp1.bookPage1347Wednesday,November21,200112:48PMAppendixEGeneratingDocumentationinVisualStudio1347SUMMARY•Programmersshoulddocumentspecificinformationonaclass,suchastheclass’srol