O'Reilly logo

C# 5.0 Programmer's Reference by Rod Stephens

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

Chapter 3 Program and Code File Structure

What’s in This Chapter

  • Project files, including hidden files
  • Changing project properties, references, resources, and assembly information
  • Preprocessor directives
  • The using directive and namespace statements
  • End-of-line, multiline, and XML comments

Wrox.com Downloads for This Chapter

Please note that all the code examples for this chapter are available as a part of this chapter’s code download on the book’s website at www.wrox.com/go/csharp5programmersref on the Download Code tab.

A C# solution contains one or more related projects. A project includes all the files related to whatever output it produces. That output might be an executable program, a custom control, or a code library that other programs can use. The files relating to the output might include files full of C# code, documentation, data files, and any other files you want to include in the project.

This chapter describes the structure of a typical C# project and explains the purposes of some of the most common types of files you can find in a C# project. This chapter also describes the basic structure of C# source code files. It explains how you can use regions and namespaces to group related pieces of code. It also describes some typographic features such as comments, XML comments, and line labels that you can use to make C# code easier to understand.

Hidden Files

Figure 3-1 shows the Solution Explorer window for a solution named TurtleSolution that contains two projects ...

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