I have a simple class:
namespace Test
{
public class Person
{
public string Name { get; set; }
public string Age { get; set; }
public void PrintName()
{
Console.WriteLine("Name:{0} Age:{1}", Name, Age); //<= I can print Name & Age
}
public static (double A, double B) DoSomething(string someString)
{
double distance = AnotherClass.AnotherMethod(Name, Age); //<= VS will not allow me to pass Name & Age.
}
}
}
How do I pass the values of Name & Age to a method in another class?