public struct AAA
{
public string BBB;
public string BBB2;
public string BBB3;
public string BBB4;
}
public struct CCC
{
public AAA C1;
public AAA C2;
public AAA C3;
public AAA C4;
public AAA C5;
}
public static void func(ref CCC data,int a)
{
AAA[] loc_data=new AAA[]
{
data.C1,data.C2,data.C3,data.C4,data.C5
};
if(a<5 && a>=0)
{
loc_data[a].BBB="test1";
}
}
===============================================
請問一下C#有沒有法子做到類似指標的動作,
目前想不到在函數內將資料設定進去的方法