如何在C++/CLI接口中聲明默認索引屬性? (請原諒與命名空間,因爲我剛開始學習C++/CLI,並希望確保C++和C#之間的語言基本沒有acciential的mixup發生重複,完全合格的符號) 代碼是 public interface class ITestWithIndexer
{
property System::String^default[System::Int32];
下面是與通用索引 public class IndexThis<T>
{
T[] MainArr = new T[100];
public IndexThis(params T[] Arrz)
{
for (int i = 0; i < Arrz.Length; i++)
{
MainArr[i] = Arrz[i];