עבור לתוכן
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.

איך אני מבצע שמירה ב windows form ב C#

Featured Replies

פורסם

אני רוצה ליצור קובץ ב windows form עם מערך כלשהו אבל כשאני יכניס נתונים אני רוצה לבצע שמירה

וכשבפעם הבאה מישהו יעלה את הקובץ הנתונים שנשמרו לפני כן - יעלו

איך עושים זאת ? ואם אפשר דוגמא.

תודה מראש.

פורסם

אתה צריך לממש לבד את התהליך.

1) צור מתודה לשמירת ערכי המערך בקובץ.

2) בעליית האפליקציה חפש אם קיים קובץ, אם כן אז קרא את מה שכתבת לתוכו (לפי הפורמט שהחלטת) לתוך המערך.

פורסם

איך מבצעים את סעיף 1 ?

פורסם

תיצור פונקציה לשמירה ותכניס בתוכה את הקוד הבא


using(FileStream fs=new FileStream("C:\Users\yourUserName\Desktop", FileMode.OpenOrCreate))
{
using(StreamWriter write=new StreamWriter(fs))
{
write.WriteLine("bla bla");
}
}

זאת הדרך הקלה ביותר.

ע"מ לפתוח את הקובץ תבצע את אותו דבר עם stremReader

ארכיון

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

דיונים חדשים

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.