O'Reilly logo

Microsoft® Manual of Style, Fourth Edition by Microsoft Corporation

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Code examples

Code examples illustrate how to use a programming element to implement specific functionality. They may include simple, one-line examples interspersed with text; short, self-contained examples that demonstrate specific points; and lengthy samples that illustrate multiple features, complex scenarios, or best practices.

Code examples are used by developers in all aspects of their work: during planning (to assess a technology through its API), when learning or exploring a language or technology, and when writing and debugging code. Developers often copy the examples that they find in the documentation to their own code, or adapt them to their own needs.

To create useful code examples, first identify the tasks and scenarios that are meaningful ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required