Monthly Archives: September 2013

Use XML “literals” in C#

Visual Basic has XML literals so you can include them directly in your code as in the following example. Dim employees As XElement = <employees> <employee firstname=”Terry” lastname=”Pratchett”/> <employee firstname=”Glen” lastname=”Cook”/> <employee firstname=”Tom” lastname=”Holt”/> <employee> <firstname>Rod</firstname> <lastname>Stephens</lastname> </employee> </employees> C# … Continue reading

Posted in strings, XML | Leave a comment

Use VBA macros to add and remove hyperlinks to external PowerPoint and Word files in C#

My book Essential Algorithms: A Practical Approach to Computer Algorithms has associated instructor materials that include lesson plans and PowerPoint presentations. There’s also a summary Excel workbook. In the workbook, column C contains links to lesson plans (Word documents) and … Continue reading

Posted in Excel, Office, PowerPoint, Word | Leave a comment

Make a ListView control display icons next to sub-items in C#

This example makes a ListView control display icons next to the sub-items in its Detail View. This requires two steps beyond what is required to make a ListView display item icons: (1) assigning image indices to the sub-items and (2) … Continue reading

Posted in controls | 3 Comments