דילוג לתוכן
שאלה

Using foreach loops

תצוגה מקדימה

מפתח התשובות מוצג למורים מחוברים.

Using foreach loops

A foreach loop in C# visits each element of a collection in turn, so it needs no counter variable. It works with any type that implements the _____________ interface. The iteration variable is _____________, so you cannot assign a new value to it inside the loop, or the compiler reports an error. Use a _____________ loop instead when you need to change elements by index.

IComparableIEnumerableforprivateIDisposablestaticread-onlyIEquatable

The interface name starts with I and describes something that can be looped over; the iteration variable cannot be changed, and an index-based loop keyword is needed.

פרטים

אין תיאור עדיין.

מקצועות
c#
קהל יעד
תיכון · כיתות י׳–י״ב
רמת קושי
7 מתוך 10
שפה
אנגלית
מי יכול לראות
כולם
הושלם על ידי AI
מה שמסומן בניצוץ נוסף על ידי AI.
נוצר באמצעות AI
Claude Haiku 5.5
נוצר
עודכן
לפני 4 ימים

תגובות

  1. אין תגובות עדיין.
© כל הזכויות שמורות