Cover by Christian Nagel, Daniel Kemper, Morgan Skinner, Jon Reid, Jacob Vibe Hammer, Karli Watson

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Chapter 2

Writing a C# Program

WHAT YOU WILL LEARN IN THIS CHAPTER

  • A basic working knowledge of Visual Studio 2012
  • How to write a simple console application
  • How to write a simple desktop application

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

The wrox.com code downloads for this chapter are found at www.wrox.com/remtitle.cgi?isbn=9781118314418 on the Download Code tab. The code is in the Chapter 2 download and individually named according to the names throughout the chapter.

Now that you’ve spent some time learning what C# is and how it fits into the .NET Framework, it’s time to get your hands dirty and write some code. You use Visual Studio 2012 (VS) throughout this book, so the first thing to do is have a look at some of the basics of this development environment.

VS is an enormous and complicated product, and it can be daunting to first-time users, but using it to create basic applications can be surprisingly simple. As you start to use VS in this chapter, you will see that you don’t need to know a huge amount about it to begin playing with C# code. Later in the book you’ll see some of the more complicated operations that VS can perform, but for now a basic working knowledge is all that is required.

After you’ve looked at the IDE, you put together two simple applications. You don’t need to worry too much about the code in these for now; you just want to prove that things work. By working through the application-creation procedures in these early examples, they will become second ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required