0
Console and Writeline code missing
Code playground at my phone and pc have no Console or Writeline (maybe im wrong too) please explain why ..\Playground\(14,12): error CS0117: 'Console' does not contain a definition for 'writeline' ..\Playground\(15,15): error CS0117: 'Console' does not contain a definition for 'writeline' ..\Playground\(17,18): error CS0103: The name 'convert' does not exist in the current context ..\Playground\(17,34): error CS0103: The name 'console' does not exist in the current context ..\Playground\(18,7): error CS0103: The name 'console' does not exist in the current context
9 Antworten
+ 1
I see whats wrong.
C# is case sensitive, so "console.writeline" is not the same as "Console.WriteLine".
You have to write it exactly like I mentioned in my first solution (with capital letters), otherwise the Compiler don't know what you are doing.
Simply copy and paste the following and try it again:
Console.Writeline("test");
+ 1
Don't worry, this can happen. :P
As a little help to quickly see if it's written in a correct way, try to write the wrong code line below the correct one.
Console.WriteLine();
console.writeline();
You can see the difference with the colored text.
Blue: Function-, Method- and Classnames (as well as data types)
Purple: keywords
White: variable- and property namens
Red: variable values
So if you are calling a method (like Console.WriteLine) and it is NOT blue, you can assume it's wrong.
0
I tried and it's there.
Try it like that: "Console.WriteLine("test");"
(Of course without the "")
0
doesnt work
0
Can you post your whole code?(or a short test code)
Maybe something is missing.
0
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SoloLearn
{
class Program
{
static void Main(string[] args)
{
console.writeline("test");
}
}
}
0
k wait
0
thanks man ...
omg i feel so dumb because i though that it would be no difference 😂
0
Okay, thanks for your time. :)