Thank you for visiting us. We are currently updating our shopping cart and regret to advise that it will be unavailable until September 1, 2014. We apologise for any inconvenience and look forward to serving you again.

Wiley
Wiley.com
Print this page Share

Beginning Visual C# 2010

ISBN: 978-0-470-50226-6
1080 pages
April 2010
Beginning Visual C# 2010 (0470502266) cover image
Update to Wrox's leading C# book for beginners

Get ready for the next release of Microsoft's C# programming language with this essential Wrox beginner's guide. Beginning Microsoft Visual C# 2010 starts with the basics and brings you thoroughly up to speed. You'll first cover the fundamentals such as variables, flow control, and object-oriented programming and gradually build your skills for Web and Windows programming, Windows forms, and data access.

Step-by-step directions walk you through processes and invite you to "Try it Out," at every stage. By the end, you'll be able to write useful programming code following the steps you've learned in this thorough, practical book.

  • The C# 4 programming language version will be synonymous with writing code with in C# 2010 in Visual Studio 2010, and you can use it to write Windows applications, Web apps with ASP.NET, and Windows Mobile and Embedded CE apps
  • Provides step-by-step instructions for mastering topics such as variables, flow controls, and object-oriented programming before moving to Web and Windows programming and data access
  • Addresses expressions, functions, debugging, error handling, classes, collections, comparisons, conversions, and more

If you've always wanted to master Visual C# programming, this book is the perfect one-stop resource.

Note: CD-ROM/DVD and other supplementary materials are not included as part of eBook file.

See More
INTRODUCTION.

PART I THE C# LANGUAGE.

CHAPTER 1 Introducing C#.

CHAPTER 2 Writing a C# Program.

CHAPTER 3 Variables and Expressions.

CHAPTER 4 Flow Control.

CHAPTER 5 More About Variables.

CHAPTER 6 Functions.

CHAPTER 7 Debugging and Error Handling.

CHAPTER 8 Introduction toObject-Oriented Programming.

CHAPTER 9 Defining Classes.

CHAPTER 10 Defining ClassMembers.

CHAPTER 11 Collections, Comparisons, and Conversions.

CHAPTER 12 Generics.

CHAPTER 13 Additional OOP Techniques.

CHAPTER 14 C# Language Enhancements.

PART II WINDOWS PROGRAMMING.

CHAPTER 15 BasicWindows Programming.

CHAPTER 16 AdvancedWindows Forms Features.

CHAPTER 17 Deploying Windows Applications.

PART III WEB PROGRAMMING

CHAPTER 18 ASP.NET Web Programming.

CHAPTER 19 Web Services.

CHAPTER 20 Deploying Web Applications.

PART IV DATA ACCESS.

CHAPTER 21 File SystemData.

CHAPTER 22 XML.

CHAPTER 23 Introduction to LINQ.

CHAPTER 24 Applying LINQ.

PART V ADDITIONAL TECHNIQUES.

CHAPTER 25 Windows Presentation Foundation.

CHAPTER 26 Windows Communication Foundation.

CHAPTER 27 WindowsWorkflow Foundation.

APPENDIX A Exercise Solutions.

INDEX.

See More
KARLI WATSON is consultant at Infusion Development (www.infusion.com), a technology architect at Boost.net (www.boost.net), and a freelance IT specialist, author, and developer. For the most part, he immerses himself in .NET (in particular C# and lately WPF) and has written numerous books in the field for several publishers. He specializes in communicating complex ideas in a way that is accessible to anyone with a passion to learn, and spends much of his time playing with new technology to find new things to teach people about. During those (seemingly few) times where he isn’t doing the above, Karli will probably be wishing he was hurtling down a mountain on a snowboard. Or possibly trying to get his novel published. Either way, you’ll know him by his brightly colored clothes. You can also find him tweeting online at www.twitter.com/karlequin, and maybe one day he’ll get around to making himself a website. Karli authored chapters 1 through 14, 21, 25 and 26.

CHRISTIAN NAGEL is a Microsoft Regional Director and Microsoft MVP, an associate of Thinktecture, and owner of CN Innovation. He is a software architect and developer who offers training and consulting on how to developMicrosoft .NET solutions. He looks back on more than 25 years of software development experience. Christian started his computing career with PDP 11 and VAX/VMS systems, covering a variety of languages and platforms. Since 2000, when .NET was just a technology preview, he has been working with various .NET technologies to build numerous .NET solutions. With his profound knowledge of Microsoft technologies, he has written numerous .NET books, and is certified as a Microsoft Certified Trainer and Professional Developer. Christian speaks at international conferences such as TechEd and Tech Days, and started INETA Europe to support .NET user groups. You can contact Christian via his web sites, www.cninnovation.com and www.thinktecture.com and follow his tweets on www.twitter.com/christiannagel. Christian wrote chapters 17 through 20.

JACOB HAMMER PEDERSEN is a Senior Application Developer at Elbek& Vejrup. He just about started programming when he was able to spell the word ‘BASIC’, which, incidentally is the first programming language he ever used. He started programming the PC in the early ’90s, using Pascal but soon changed his focus to C++, which still holds his interest. In the mid ’90s his focus changed again, this time to Visual Basic. In the summer of 2000 he discovered C# and has been happily exploring it ever since. Primarily working on the Microsoft platforms, his other expertise includes MS Office development, SQL Server, COM and Visual Basic.Net.
A Danish citizen, Jacob works and lives in Aarhus, Denmark. He authored chapters 15, 16, and 22.

JON D. REID is a software engineering manager atMetrix LLC, an ISV of field service management software for the Microsoft environment. He has co-authored a variety .NET books, including Beginning Visual C# 2008, Beginning C# Databases: From Novice to Professional, Pro Visual Studio .NET, and many others. Jon wrote chapters 23 and 24.

MORGAN SKINNER began his computing career at a young age on the Sinclair ZX80 at school, where he was underwhelmed by some code a teacher had written and so began programming in assembly language. Since then he’s used all sorts of languages and platforms, including VAX Macro Assembler, Pascal, Modula2, Smalltalk, X86 assembly language, PowerBuilder, C/C++, VB, and currently C# (of course). He’s been programming in .NET since the PDC release in 2000, and liked it so much he joined Microsoft in 2001. He now works in premier support for developers and spends most of his time assisting customers with C#. Morgan wrapped up the book by authoring chapter 27. You can reach Morgan at www.morganskinner.com.

See More
Download TitleSizeDownload
ReadMe File 1.63 KB Click to Download
Chapter 2 Code Download 14.09 KB Click to Download
Chapter 3 Code Download 6.26 KB Click to Download
Chapter 4 Code Download 19.23 KB Click to Download
Chapter 5 Code Download 19.01 KB Click to Download
Chapter 6 Code Download 20.46 KB Click to Download
Chapter 7 Code Download 17.82 KB Click to Download
Chapter 8 Code Download 10.24 KB Click to Download
Chapter 9 Code Download 13.81 KB Click to Download
Chapter 10 Code Download 12.52 KB Click to Download
Chapter 11 Code Download 39.13 KB Click to Download
Chapter 12 Code Download 36.45 KB Click to Download
Chapter 13 Code Download 25.42 KB Click to Download
Chapter 14 Code Download 50.96 KB Click to Download
Chapter 15 Code Download 93.71 KB Click to Download
Chapter 16 Code Download 228.47 KB Click to Download
Chapter 17 Code Download 418.13 KB Click to Download
Chapter 18 Code Download 251.74 KB Click to Download
Chapter 19 Code Download 172.14 KB Click to Download
Chapter 20 Code Download 969.48 KB Click to Download
Chapter 21 Code Download 60.61 KB Click to Download
Chapter 22 Code Download 61.54 KB Click to Download
Chapter 23 Code Download 133.95 KB Click to Download
Chapter 24 Code Download 131.55 KB Click to Download
Chapter 25 Code Download 134.12 KB Click to Download
Chapter 26 Code Download 48.69 KB Click to Download
Chapter 27 Code Download 47.36 KB Click to Download
Code Download :: All Chapters 2.97 MB Click to Download
Chapter 1 Art 655.43 KB Click to Download
Chapter 2 Art 993.94 KB Click to Download
Chapter 3 Art 88.49 KB Click to Download
Chapter 4 Art 248.66 KB Click to Download
Chapter 5 Art 471.68 KB Click to Download
Chapter 6 Art 202.53 KB Click to Download
Chapter 7 Art 464.50 KB Click to Download
Chapter 8 Art 2.08 MB Click to Download
Chapter 9 Art 1.11 MB Click to Download
Chapter 10 Art 747.48 KB Click to Download
Chapter 11 Art 188.34 KB Click to Download
Chapter 12 Art 251.29 KB Click to Download
Chapter 13 Art 641.34 KB Click to Download
Chapter 14 Art 247.46 KB Click to Download
Chapter 15 Art 507.98 KB Click to Download
Chapter 16 Art 177.90 KB Click to Download
Chapter 17 Art 876.48 KB Click to Download
Chapter 18 Art 1.12 MB Click to Download
Chapter 19 Art 739.89 KB Click to Download
Chapter 20 Art 446.38 KB Click to Download
Chapter 21 Art 458.97 KB Click to Download
Chapter 22 Art 134.01 KB Click to Download
Chapter 24 Art 47.02 KB Click to Download
Chapter 25 Art 1.34 MB Click to Download
Chapter 26 Art 536.76 KB Click to Download
Chapter 27 Art 314.19 KB Click to Download
See More

Do you think you've discovered an error in this book? Please check the list of errata below to see if we've already addressed the error. If not, please submit the error via our Errata Form. We will attempt to verify your error; if you're right, we will post a correction below.

ChapterPageDetailsDatePrint Run
xxxvi Error in Text
Line 6:
"Once you've leaned how OOP works in C#, ........"

Should say learned instead of leaned.
06/02/2010
51 Error in Text
After the following statement:

Similarly, you can gain control over operator precedence by using parentheses, as shown in this example

This example should be included:

var1 = (var2 + var3) * var4;
Here, the content of the parentheses is evaluated first, meaning that the + operator acts before the * operator.
5/5/10
54 Error in Text
Last paragraph, last sentence reads:
"The other two namespaces..."

should read:
"The other three namespaces..."
3/14/11
5 122, 962 Error in Exercise
Exercise 4:

Currently reads:
Will the following code compile? Why or why not?
string[5] blab = new string[5]
string[5] = 5th string.


For the answers [Page 962] the code needs to be changed to:
Will the following code compile? Why or why not?
string[5] blab = new string[5]
blab[5] = 5th string.
3/14/11
138 Error in Figure
output shown should not include the line "Text output from function"
3/14/11
242 Error in Text
CURRENTLY READS:
"The last two of these can be combined, so protected internal members are also possible. These are only accessible from code-derived classes within the project (more accurately, the assembly)."

SHOULD READ:
"The last two of these can be combined, so protected internal members are also possible. These are accessible from code-derived classes and from code within the project (more accurately, the assembly)."
02/20/2013
282 Error in Text
Middle of page.
"You'll learn cover" - Should say ?You?ll lean?
4/11/2011
295 Error in Code
?if (min < 2)?
should be 
?if (minimum < 2)?
4/11/2011
301, 321 Errata
Pages 301 and 321 reference the ?as? operator which is not covered until page 326. Please refer to page 326 for this coverage.
4/11/2011
314 Error in Code
In GetHashCode().
Formula should be 13*(int)suit + (int)rank?
4/11/2011
336 Error in Text
"tertiary" should be "ternary"
12/7/2010
354 Error in Code
Code sample near the bottom of the page:

class My GenericClass where T: constraint

should be:

class MyGenericClass where T: constraint
10/5/2010
380 Error in Text
In paragraph 7, in reference to the command from the previous Try it Out:

Currently reads:
Console.ReadLine()

Should read:
Console.ReadKey()
12/27/2012
394 Improvement on Code
Last line of the Progam.cs code should be:
Console.ReadKey();
This should occur after the Console.WriteLine command indicating that the player "has won the game" or this message will display too quickly to the user and not be readable.
3/14/11
462 Error in Text
Last full sentence at bottom of the page:
"If the length of the text in the text box is zero, then set the background color to red and the Tag to false."

should be:
"If the length of the text in the text box is zero, then set the background color to red."

No Tag property is used in the coding example.
3/14/11
467 Error in Text
Step # 3 of the Try It Out:
"The Text property of the RadioButton and CheckBox controls should be the same as the names of the controls without the first three letters..."

should be:
"The Text property of the RadioButton and CheckBox controls should be the same as the names of the controls without the first two words..."
3/14/11
502 Error in Text
Third sentence, just before the Try It Out:
"In the code download, this project is named 'Extended Manual Menus'."

should be:
"In the code download, this project is named 'Manual Menus 2'."
3/14/11
506 Error in Table
In the second table, the first value is:
MS Sans Serif Times New Roman

Those two font names should be listed (and entered) on separate lines:
MS Sans Serif
Times New Roman
12/27/2012
514 Error in Code
Step 5 code:
"frmChild child = newfrmChild(this);"

should be changed to:
"frmChild child = new frmChild(this);"
3/14/11
515 Error in Code
code in middle of page:
"frmChild child = newfrmChild(this);"

should be changed to:
"frmChild child = new frmChild(this);"
3/14/11
516 Extraneous Sentence
second sentence of step 5: "Change the AllowMerge property of the toolbar to False." Setting the value of AllowMerge to either true or false in this example has no effect. Ignore the sentence.
9/9/11
521 Error in Code
Step 4 code:
"private void ToolStripMenuItemTile_Click(object sender, EventArgs e)"
and
"private void ToolStripMenuItemCascade_Click(object sender, EventArgs e)" 


should be:
"private void tileToolStripMenuItem_Click(object sender, EventArgs e)"
and
"private void cascadeToolStripMenuItem_Click(object sender, EventArgs e)"

respectively, to be consistent with the naming convention for these menu items as found in Step 2.
3/14
554 Error in Text
second sentence:
"When you click the Settings button near the Prerequisites URL text box..."

should be:
"When you click the Prerequisites button near the Installation URL text box..."
3/14/11
585 Error in Text
4th sentence:
"This base code is in the code-behind file Registration.aspx.cs, as defined with the CodeFile property."

should be:
"This base code is in the code-behind file Registration.aspx.cs, as defined with the CodeBehind property."
3/14/11
591 Error in Text
Step 6 of Try It Out exercise:

"6. Start the Default.aspx page, fill in some data..."

should be changed to

"6. Start the Registration.aspx page, fill in some data..."
4/11/2011
593 Error in Text
Currently says:
2. Add a new AJAX Web Form named UpdatePanelDemo.aspx to the existing website.
3. From the AJAX Extensions category in the Toolbox, add an UpdatePanel to the page.

This should be:
2. Add a new WebForm named UpdatePanelDemo.aspx to the existing website.
3. From the AJAX Extensions category in the Toolbox, add ScriptManger and UpdatePanel controls to the page.
11/30/2010
594 Error in Text
Current:
With an ASP.NET AJAX page, a ScriptManager object is required. This object is added by using the AJAX Web Form template.

Should be:
For using Ajax functionality, a ScriptManager object is required.
11/30/2010
595 Error in Text
Currently says:
2. Add a new AJAX Web Form named UpdatePanelWithTrigger.aspx to the existing website.
3. Add two UpdatePanel controls.

Should be:
2. Add a new Web Form named UpdatePanelWithTrigger.aspx to the existing website.
3. Add one ScriptManager and  two UpdatePanel controls
11/30/2010
595 Error in Text
Step 9 of Try It Out, second sentence:

"Add an AsynchronousPostback trigger, set the..."

should be changed to

"Add an AsyncPostBack trigger, set the..."
4/11/2011
Chapter 3 Exercise 4 Error in Code
The *, %, and / operators have equal highest precedence here, followed by + and finally +=. The precedence in the exercise can be illustrated using parentheses as follows:

resultVar += (var1 * var2) + (var3 % (var4 / var5));

Or:

resultVar += (var1 * var2) + ((var3 % var4) / var5));

The result is the same in both cases.
05/20/2010
626 Error in Text
In the Try It Out, under point 2:
open the window be selecting view->Other Windows->Server Explorer

should be:
open the window by selecting view->Server Explorer
10/18/11
642 Error in Text
Last sentence in NOTE:

"Chapter 27 covers WCF."

should be changed to

"Chapter 26 covers WCF."
4/11/2011
656 Error in Code
Code should be

//?
if (e.Error == null)
{
   //?

Instead of

//?
if (e.Error != null)
{
   //?
01/30/2011
659 Error in Text
The properties City and TemperatureType in class GetWeatherRequest, and the properties Condition and Temperature in class GetWeatherResponse should not be terminated with a semicolon. A "Semicolon after method or accessor block is not valid" error will result.
4/11/2011
672 Error in Text
Try It Out Step 2, first sentence: "Open the Package/Publish project settings..." should be changed to "Open the Package/Publish Web project settings..."

Step 2, last sentence: "Click the link...the setting 'Include all Databases configured in Deploy SQL Tab'" should be changed to "Click the link...the setting 'Include all databases configured in Package/Publish SQL tab'"

Step 3, first sentence: "The Deploy SQL settings..." should be changed to "The Package/Publish SQL settings..."

Step 4, third sentence: "Check the settings of the publish method MSDeploy.Publish" should be changed to "Check the settings of the publish method Web Deploy"

Step 4, fifth sentence: "Click the link Click Here to..." should be changed to "Click the link 'Find Web hosting provider that supports one-click publish' to..."
4/11/2011
673-674 Error in Figures
Figures 20-8, 20-9, 20-10, and 20-11 do not display the correct wording and need to updated with the latest screens from the latest Visual Studio 2010 RC.
4/11/2011
701 Error in Code
in How It Works code snippet, inside while loop:
strLine = sr.ReadLine();

should be:
line = sr.ReadLine();
10/18/11
739 Error in Code
P. 739, first line:

"...parameter that is passed into the RecurseXmlDocument method..."

should be changed to

"...parameter that is passed into the FormatText method..."
4/11/2011
741 Error in Text
Table 22-4, CreateElement description:

"...creates only nodes of the XmlDocument variety."

should be changed to

"...creates only nodes of the XmlElement variety."
4/11/2011
745 Error in Text
Last sentence before Table 22-6:

"...you can assume the current node is the node in the XML document."

should be changed to

"...you can assume the current node is the node in the XML document."
4/11/2011
769 Error in Text
Last sentence before How It Works:

"Looks like the Rand() function generates..."

should be changed to

"Looks like the Random() function generates..."
4/11/2011
857 Error in Text
The following statement should be removed from the third paragraph from the bottom:

?Window_MouseUp() event handler was called?
11/13/2011
See More
Answers to the Exercises appendix can be found at the end of the book.
See More
Instructors Resources
Wiley Instructor Companion Site
See More
See Less

Related Titles

Back to Top