עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

C# מערך של רשימות

Featured Replies

פורסם

אפשר לעשות דבר כזה?

להצהיר על מערך בגודל קבוע ואז- בלולאה: איך לכל איבר array אני יוצרת רשימה חדשה?

פורסם

אפשר לעשות מערך של כל דבר. לדוגמה:

List<int>[] arr = new List<int>[20];

זה מערך בגודל 20, של רשימות של int.

כמו כל מערך, הוא מאותחל ב-nullים, ולכן תצטרכי לאתחל כל איבר במערך לרשימה חדשה (באמצעות לולאה).

פורסם
  • מחבר

עוד שאלה על רשימות:

איך ממיינים רשימה מסוג student לפי שדה גיל?

ושאלה אחרת:


TextReader currentFile = new StreamReader(path ")
nextLine = currentFile.ReadLine();

while (nextLine != null) //null indicates end of file.
{
word = nextLine.Split(' ');
...
{

חלקתי את השורה שקראתי מהקובץ טקסט למילים , הבעיה היא שחלק מהמילים הן ''' ואז התכנית בורחת -

<באמצעות הדיבגר - כשסמנתי [word[moneWord][0] הוא כתב לי:

+ word[moneWord][0] ' threw an exception of type 'System.IndexOutOfRangeException' char {System.IndexOutOfRangeException}

מה הבעיה?

פורסם
  • מחבר

בקובץ המצורף נראה המערך בעת ההרצה- התכנית בורחת במילה הראשונה (איך יש חריגה מגבולות?)

[attachment deleted by admin]

פורסם
  • מחבר

ואיך אפשר לעקוף את המחרוזת הזו?

ניסיתי:



if (word[moneWord] == null)
{
break;
}

ולא עבד.

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.