+ 2
I don't really understand differences between Console.Write and Console.WriteLine
Printing to the screen
5 odpowiedzi
+ 5
Both of them displays output, but one write the output on a new line.
Try this:
Console.Write("this is text 1");
Console.Write("This is text2");
Console.WriteLine("This is text3");
+ 1
jump a line or go to the next line ?
+ 1
next Line sorry :)
0
Console.write write your texte, but writeLine write your texte and jump a Line.
0
Consider this:
//Output = 45
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace YourName
{
class Program
{
static void Main(string[] args)
{
int x = 4;
int y = 5;
Console.Write(x);
Console.Write(y);
}
}
}
While this output:
4
5
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace YourName
{
class Program
{
static void Main(string[] args)
{
int x = 4;
int y = 5;
Console.WriteLine(x);
Console.WriteLine(y);
}
}
}