Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 4.0 aka C# 2010 > BOOK: Beginning Visual C# 2010
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Visual C# 2010
This is the forum to discuss the Wrox book Beginning Visual C# 2010 by Karli Watson, Christian Nagel, Jacob Hammer Pedersen, Jon D. Reid, Morgan Skinner, ; ISBN: 9780470502266
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual C# 2010 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 11th, 2011, 07:34 AM
Registered User
 
Join Date: Jun 2011
Location: Sacramento
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default Ch3 Ex2 Console.WriteLine question

Hello fellow programmers,
I have just decided to switch my major to computer science and am reading through this book in addition to starting this next semester. So I am a beginner and just started :D Love it so far. Anyways here is my question:

Is there a way to put in a return command within the parenthesis of the first part of Console.WriteLine?

Here's the original code:

Code:
Console.WriteLine("Now give me another number:");
Here is what I want to know is possible or not and how if I can do it....

Code:
Console.WriteLine("Now give me 
          another number:");
Does that part of code have to be on one line??


The reason I am wanting to know this is to make the code work with a revamp. I was revamping the project just to see if I could (hands on learning/tinkering)
  #2 (permalink)  
Old June 11th, 2011, 08:07 AM
Wrox Author
Points: 1,163, Level: 13
Points: 1,163, Level: 13 Points: 1,163, Level: 13 Points: 1,163, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2010
Location: Austria
Posts: 175
Thanks: 3
Thanked 53 Times in 53 Posts
Default

You can do this:
Code:
Console.WriteLine(
         "Now give me another number:");
or this:
Code:
Console.WriteLine("Now give me " + 
         "another number:");
__________________
Christian
CN innovation
Visit my blog at: csharp.christiannagel.com
Follow me on twitter: @christiannagel
The Following User Says Thank You to ChristianNagel For This Useful Post:
thelafe (June 11th, 2011)
  #3 (permalink)  
Old June 11th, 2011, 08:40 AM
Registered User
 
Join Date: Jun 2011
Location: Sacramento
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by ChristianNagel View Post
You can do this:
Code:
Console.WriteLine(
         "Now give me another number:");
or this:
Code:
Console.WriteLine("Now give me " + 
         "another number:");
Thank you so much Christian. I was consolidating a bunch of Console.WriteLines to accomplish the same outcome within that program just to see if it was possible. I will write this down in my notes. More questions will come in the following months! :D

Last edited by thelafe; June 11th, 2011 at 01:32 PM.. Reason: typo
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
writeline to an application Vinny_68 Pro Visual Basic 2005 0 April 16th, 2007 09:40 AM
Problem with First.cs output via Console.WriteLine patrick764 C# 1 November 7th, 2005 03:17 PM
Console.WriteLine ritag ADO.NET 2 February 9th, 2005 11:09 AM
WriteLine Method with no New Line(?) busher Classic ASP Basics 1 January 13th, 2005 12:53 AM
chapter 2 EX2-2 buddytruck BOOK: Beginning Visual C++ 6 0 August 10th, 2004 09:56 AM



All times are GMT -4. The time now is 12:27 AM.


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