C
C#12mo ago
js

struggling with objects and methods

class Circle
{
float radius;
int id;
int nextID;

static void initCircle()
{
Console.WriteLine("Enter the radius of your circle.");
radius = float.Parse(Console.ReadLine());
}
initCircle();

}
class Circle
{
float radius;
int id;
int nextID;

static void initCircle()
{
Console.WriteLine("Enter the radius of your circle.");
radius = float.Parse(Console.ReadLine());
}
initCircle();

}
No description
2 Replies
js
jsOP12mo ago
im getting these errors but i dont understand them
Angius
Angius12mo ago
You can't call a method inside of a class

Did you find this page helpful?