Summary


In this chapter, you covered a fair amount of ground on the way to creating usable (if basic) C# applications. You've looked at the basic C# syntax and analyzed the basic console application code that VS generates for you when you create a console application project.

The major part of this chapter concerned the use of variables. You have seen what variables are, how you create them, how you assign values in them, and how you manipulate them and the values that they contain. Along the way, you've also looked at some basic user interaction, by showing how you can output text to a console application and read user input back in. This involved some very basic type conversion, a complex subject that is covered in more depth in Chapter 5.

You have also seen how you can assemble operators and operands into expressions and looked at the way these are executed, and the order in which this takes place.

Finally, you looked at namespaces, which will become more and more important as the book progresses. By introducing this topic in a fairly abstract way here, the groundwork is completed for later discussions.

In this chapter, you learned:

  • How basic C# syntax works

  • What Visual Studio does when you create a console application project

  • How to understand and use variables

  • How to understand and use expressions

  • What a namespace is

So far, all of your programming has taken the form of line-by-line execution. In the next chapter, you see how to make your code more efficient by controlling the flow of execution using looping techniques and conditional branching.




Beginning Visual C# 2005
Beginning Visual C#supAND#174;/sup 2005
ISBN: B000N7ETVG
EAN: N/A
Year: 2005
Pages: 278

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net