Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning C# 6.0 Programming with Visual Studio 2015
This is the forum to discuss the Wrox book Beginning C# 6.0 Programming with Visual Studio 2015 by Benjamin Perkins, Jacob Vibe Hammer, Jon D. Reid; ISBN: 978-1-119-09668-9
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning C# 6.0 Programming with Visual Studio 2015 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
  #1 (permalink)  
Old October 20th, 2017, 11:10 PM
Registered User
Points: 10, Level: 1
Points: 10, Level: 1 Points: 10, Level: 1 Points: 10, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2017
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 4 exercise 1

Here is how I got it to run, because it won't run the way that it is in the book:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Console;

namespace Ch04Ex1
{
    class Program
    {
        static void Main(string[] args)
        {
            WriteLine("Enter an integer:  ");
            int myInt = Convert.ToInt32(ReadLine());
            bool isLessThan10 = myInt < 10;
            bool isBetween0and5 = (0 <= myInt) && (myInt <= 5);
            WriteLine($" Integer less than 10? {isLessThan10}");
            WriteLine($"Integer between 0 and 5? {isBetween0and5}");
            WriteLine ($"Exactly one of the above is true? { isLessThan10 ^ isBetween0and5}");
            ReadKey();

        }

        private static int ToInt32(string v)
        {
            throw new NotImplementedException();
        }
    }
}


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 9 Exercise #3 smhicks95 BOOK: Beginning XML, 5th edition 0 June 8th, 2017 09:43 AM
Chapter 3, Exercise 4 rhieger BOOK: Beginning JavaScript 4th Edition 2 September 15th, 2016 11:39 AM
Chapter 3 Exercise 2 rouzbeh_ziafati BOOK: Beginning Microsoft Visual Basic 2010 3 March 14th, 2011 07:21 AM
Chapter 7 - Exercise rickymartini76@yahoo.it BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 2 March 16th, 2010 07:32 PM
Chapter 3 - Exercise 3 AndyN BOOK: Beginning Cryptography with Java 3 August 16th, 2006 03:09 PM





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