2
2fast
What I meant in my original post was the following. For example, with an
integer variable, I can make a property in the following way:
public class MyClass {
public int MyProperty {
get {...}
set {...}
}
}
If MyProperty is now an array, one valid syntax seems to be this:
public class My Class2 {
public int[] MyPropertyArray;
}
Is there any way to implement the above with the builtin get/set syntax? I
want the get to return one value for one position within the property array.
The compiler seems to think that the below should return an array of values.
Even if the below did compile, how would the get/set parts know the index
that is being referenced?
public class MyClass3 {
public int[] MyPropertyArray {
get {}
set {}
}
}
- 2fast
integer variable, I can make a property in the following way:
public class MyClass {
public int MyProperty {
get {...}
set {...}
}
}
If MyProperty is now an array, one valid syntax seems to be this:
public class My Class2 {
public int[] MyPropertyArray;
}
Is there any way to implement the above with the builtin get/set syntax? I
want the get to return one value for one position within the property array.
The compiler seems to think that the below should return an array of values.
Even if the below did compile, how would the get/set parts know the index
that is being referenced?
public class MyClass3 {
public int[] MyPropertyArray {
get {}
set {}
}
}
- 2fast