+ 3
Why
Why does it not show the points
7 Antwoorden
+ 8
Ikethedev ,
can you describe what `points` you are talking about? are you talking about `xp` ?
+ 4
Ikethedev need to add semicolons after
int points = 67 ; // semicolon
Console.WriteLine(points); // semicolon
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)
{
int points = 67; // semicolon
Console.WriteLine(points); // semicolon
}
}
}
it works
+ 2
The varible i made
+ 2
Called points
+ 2
Show us the code as this confusion code have easily found a solution had the code been present. Right now the confusion continues.
0
Ikethedev, I seem to understand your frustration, but I do not exactly understand your question. Could you kindly share your code or provide a bit more context?
That said, based on what you have written, I reckon you have a variable called points in your C# code, and it is not displaying as expected. Is that so?
I do not have concrete knowledge of C#, but from the basics of what I have explored, I suggest that you declare points at the class level so it is accessible in multiple methods. This is because in C#, if points is declared inside a method, it won’t be accessible outside that method. If you are expecting points to update, be sure to modifying the correct variable, which is the class-level variable.
Thank you, for reaching out. Again, it would be helpful if you kindly use the insert button (+) to share your code with us.
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)
{
int points=67
Console.WriteLine (points)
}
}
}