class A
{
public bool ReturnBool(int value)
{
if (value > 0)
{
return true;
}
else
{
return false;
}
}
}
class B
{
public SomeMethod()
{
int number = get();
A a = new A();
if a.ReturnBool(number)
{
}
}
}
The code running in class
B
creates an
A
object and calls the
ReturnBool
method to check the validity of some data.