Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iterator的int是否應該為string? #3

Open
zamhsu opened this issue Apr 24, 2022 · 0 comments
Open

Iterator的int是否應該為string? #3

zamhsu opened this issue Apr 24, 2022 · 0 comments

Comments

@zamhsu
Copy link

zamhsu commented Apr 24, 2022

此處的型別應該是string
經測試,使用int會出例外狀況

int i = (int)iterator.GetCurrent();

因為ConcreteList內部的_collection是string陣列

_collection = new string[] { "A", "B", "C", "D" };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant