Читать книгу C# 24-Hour Trainer - Stephens Rod - Страница 14
Section I
The Visual Studio IDE and Controls
Lesson 1
Getting Started with the Visual Studio IDE
Installing C#
ОглавлениеBefore you can use C# to write the next blockbuster first-person Xbox game, you need to install it. So if you haven't done so already, install C#.
You can install one of the free Express Editions at www.microsoft.com/express/Windows. As I write this, that page lists versions of Visual Studio 2015, but when you visit that page it should let you install the latest version. (I'm using a preview build of Visual Studio 2015 to write the programs that go with this book.)
Several versions are available on that page, so be sure you pick the right one. Here's a quick summary of some of the versions that may be available:
● Community– This version lets you build web, Windows Store (including tablet and phone apps), Windows Desktop, Android, and iOS applications. This is probably the best version for you to download.
● Express for Web– This version focuses on building websites.
● Express for Windows– This version focuses on building Windows Phone and Windows Store apps.
● Express for Windows Desktop– This version focuses on desktop applications. You run these from the Windows desktop, not the start screen.
● Team Foundation Server Express– This edition is for people working in teams. This includes tools that you don't need right now and that can provide extra opportunities for confusion, so skip this version. (If you don't think things are confusing enough, e-mail me and I'll suggest some more confusing topics for you to study.)
The Community Edition includes tools to get started building any of these kinds of applications, so it's a good choice. You may never use it to build websites or iOS applications, but having those abilities installed won't hurt you.
The Express Editions are only intended to get you started, but they're seriously powerful so you probably won't need anything else for quite a while. I've been happily using Express Editions for about two decades.
If you think you need some other version of Visual Studio (for example, you're working on a big project and you need test management, source code control, and other team programming tools), go to msdn.microsoft.com/vcsharp and install the version that's right for you.
All of these are big installations (5 or 6 GB), so they could take a while. While a constant supply of cookies, caffeine, and conversation will help you pass the time more quickly, the other customers won't thank you if you hammer the Starbucks Wi-Fi for 12 straight hours. Be sure you have a reasonably fast connection before you start.
Talkin' 'Bout My Generation
Developers talk about different generations of programming languages ranging from the very primitive to the remarkably advanced. In a nutshell, the different generations of languages are:
● 1GL– Machine language. This is a series of 0s and 1s that the machine can understand directly. Here's a sample: 01001010 11010100 10101011 10001000. Pretty hard to read, isn't it?
● 2GL– Assembly language. This is a collection of mnemonic codes that represent machine language instructions. It is slightly more readable but provides no higher-level structure for performing complex tasks. Here's a sample: brfalse.s IL_0028 leave.s IL_007a ldloc.0 ldloc.1. This may be easier to read than binary, but it still looks like gibberish to me.
● 3GL– A higher-level language such as FORTRAN or BASIC. These provide additional structure (such as looping and subroutines) that makes building complex programs easier. Here's a sample: num_players = num_players + 1. Finally something I can read and almost understand!
● 4GL– An even higher-level language or a development environment that helps build programs, typically in a specific problem domain.
● 5GL– A language where you specify goals and constraints and the language figures out how to satisfy them. For example, the database Structured Query Language (SQL) allows you to use statements like SELECT FirstName FROM Employees. You don't need to tell the database how to get the names; it figures that out for you.
Visual Studio provides code snippets that let you copy standard chunks of code into your program, IntelliSense that helps you select and use functions and other pieces of code, refactoring tools that help you rearrange and restructure your code, and much more. That makes Visual C# a 4GL. (Or perhaps a 3.5GL depending on how high your standards are.)