1.
//a field of OtherClass
public class MainClass
{
private OtherClass other;
}
2.
//method argument
public class MainClass
{
public void Action(OtherClass other)
{ }
}
3.
//method return value
public class MainClass
{
public OtherClass Action()
{ }
}
4.
//used inside a method
public class MainClass
{
private Something something;
public void Action()
{
OtherClass other = something.GetOtherClass();
}
}