• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 794
  • Last Modified:

In C# how to print an integer to the screen using Console.WriteLine

In C# how do put output to the DOS console for an integer. Refer to the code below that won't work:
int theLength=50;
Console.WriteLine("The length of the string is" + theLength) // This code won't work;
1 Solution
One way would be...

Console.WriteLine("The length of the string is" + theLength.ToString())
brgdotnetcontractorAuthor Commented:
Thank you. Good job
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now