Wrox Programmer Forums
BOOK: Beginning Microsoft Visual C# 2008 ISBN: 978-0-470-19135-4
This is the forum to discuss the Wrox book Beginning Microsoft Visual C# 2008 by Karli Watson, Christian Nagel, Jacob Hammer Pedersen, Jon D. Reid, Morgan Skinner, Eric White; ISBN: 9780470191354
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Microsoft Visual C# 2008 ISBN: 978-0-470-19135-4 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 25th, 2009, 03:17 AM
Registered User
Join Date: May 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem on page 465


On page 465 and on other pages I keep seeing the ~ (tild) sign and never an explanation for why it is used!

on page 465 there is the following
newFont = new Font(oldFont, oldFont.Style & ~FontStyle.Bold);
This is repeated a number of times with absolutely no explanation as to why its there.

Is there somebody who could explain please.

Thanks in advance for any help that you can give to me.
Old January 17th, 2010, 08:46 PM
Authorized User
Join Date: Nov 2009
Posts: 22
Thanks: 1
Thanked 3 Times in 3 Posts
Send a message via Yahoo to msherburne84

The ~(tild) is what is used to define a Destructor. Destructors are handled by the .NET garbage collector and are normally left alone. What I gather from this is if you look at the if,else statement on this particular page, it is checking if the FontStyle is set to Bold and if it is set to Bold it will remove that property else add the bold property. If anyone else has a better explanation I would like to know, because that is what I'm getting from this particular piece of code.

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem on page 465 chiefarchon C# 2008 aka C# 3.0 1 October 31st, 2009 04:43 AM
chapter 2 - page 41 problem creating the page.. jorjiana BOOK: Beginning Oracle Application Express ISBN: 9780470388372 2 August 22nd, 2009 04:25 AM
problem in master page bond007 ASP.NET 2.0 Basics 1 April 23rd, 2009 12:32 PM
Problem with try it out on page 248 fh84 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 29 February 2nd, 2009 11:29 AM
Page Loading Problem devteam SQL Server 2000 1 January 9th, 2006 12:43 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.