小弟新手>"<想問要怎樣才能把struct refence?在不用class的情況下,想做到的效果是不論我改那一個value(Main/Sup)對面都會作出同樣的改動.感謝大家!!
C#
public class Main
{
public float MainValue1;
public float MainValue2;
public float MainValue3;
Sub sub = new Sub();
}
public class Sub
{
public float SupValue1;
public float SupValue2;
public float SupValue3;
//想把SupValue refence到MainValue
}