0
What is the error
help me please https://code.sololearn.com/cM4j9ioZuIdg/?ref=app
4 odpowiedzi
+ 1
WriteLine, not Writeline. Also ReadKey, not Readkey. Also you should to get access members of struct car via object name not via class name.
Corrected code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SoloLearn
{
class Program
{
//you should access modifier public
//to get access members of car
struct car
{
public String name;
public String company;
public int dollar;
}
static void Main(string[] args)
{
car ray;
Console.WriteLine("the car is");
ray.name = Console.ReadLine();
Console.WriteLine("the company is");
ray.company = Console.ReadLine();
Console.WriteLine("the coust is");
ray.dollar = Convert.ToInt32(Console.ReadLine());
//Console.ReadKey(); not working in SoloLearn
}
}
}
0
it isn't work too
0
what do you mean? you are not able to compile ?
0
l copy your code
it's work