Wrox Programmer Forums
C# 2008 aka C# 3.0 Discuss the Visual C# 2008 (aka C# 3.0) language
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2008 aka C# 3.0 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:12 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 October 31st, 2009, 04:43 AM
Authorized User
Join Date: Oct 2004
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to C@uark

its the Bitwise complement operator, its essentially turning on the bold bit if it is off or it is turning off if it is on.

Last edited by C@uark; October 31st, 2009 at 04:50 AM..

Similar Threads
Thread Thread Starter Forum Replies Last Post
chapter 2 - page 41 problem creating the page.. jorjiana BOOK: Beginning Oracle Application Express ISBN: 9780470388372 2 August 22nd, 2009 04:25 AM
Page layout problem rajanikrishna CSS Cascading Style Sheets 1 February 12th, 2009 03:56 PM
page jump problem netmastan Ajax 0 April 11th, 2007 04:55 PM
problem with ASP page dhx10000 ASP.NET 1.0 and 1.1 Basics 4 June 12th, 2006 07:48 PM

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