// ListableBase does not exist, of course
class MyArrayLikeClass extends ListableBase<int> {
// some code here
}
var myVar = new MyArrayLikeClass();
print(myVar[10]);
Is there any way to access an instance of a class as if it were a List. I know that when a class extends the IterableBase class, it can be accessed as if it were a collection of values. For example:
// ListableBase does not exist, of course
class MyArrayLikeClass extends ListableBase<int> {
// some code here
}
var myVar = new MyArrayLikeClass();
print(myVar[10]);
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.
Is there any way to access an instance of a class as if it were a List. I know that when a class extends the IterableBase class, it can be accessed as if it were a collection of values. For example:
// ListableBase does not exist, of course
class MyArrayLikeClass extends ListableBase<int> {
// some code here
}
var myVar = new MyArrayLikeClass();
print(myVar[10]);
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.