This sample demonstrates creating XML comments, viewing them in the editor, and accessing them programmatically.
TheAutomobileclass defines the following type elements, each of which demonstrates a different aspect of XML comments:
- TypesAutomobileandEngineOption
- PropertiesModel
- MethodsConstructors,Upgrade,CalculateMaxTowing,WillItTow
- EventsNeedsTuneUp
- DelegatesRotateTires,ReplaceSparkPlugs
- Fieldscar,modelValue
TheClickevent handler for theCreate Carbutton calls several of theAutomobilemembers. When using IntelliSense in theCode Editor, the XML comments are displayed as ToolTips.
TheClickevent handler for theList Summariesbutton uses theXmlDocumentclass to query the XML file that contains the XML comments. When the project is compiled, this XML file is created and stored with the project assembly. TheCompiletab of theProject Designerenables you to specify the location and name of this file.