I'm trying to write a program that have two classes, and call 2 variables from one to another but i got two errors that saying " 'Area.Circle' does not contain a definition for 'result1' " and " 'Area.Circle' does not contain a definition for 'result2' ". how can i solve this problem?
using System;
namespace Area
{
class Circle
{
public static void Area()
{
Console.WriteLine("Enter the radius of the first circle: ");
int r1 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter the radius of the second circle: ");
int r2 = Convert.ToInt32(Console.ReadLine());
double pi = Math.PI;
double result1 = pi * r1 * r1;
double result2 = pi * r2 * r2;
Console.WriteLine("The area of the first circle is {0}\nThe area of the second circle is {1}\n", result1, result2);
}
}
class Minimum
{
static void Main(string[] args)
{
Circle.Area();
Circle one = new Circle();
double min = Math.Min(Circle.result1, Circle.result2);
Console.WriteLine("min");
}
}
}