C
C#10mo 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
jsOP10mo ago
im getting these errors but i dont understand them
Angius
Angius10mo ago
You can't call a method inside of a class
Want results from more Discord servers?
Add your server