View Single Post
ישן 11-04-10, 22:02   # 1
dabi
חבר וותיק
 
מיני פרופיל
תאריך הצטרפות: Dec 2007
הודעות: 1,767

dabi לא מחובר  

מה לא בסדר בשורה הזאת ב C שארפ?

הצהרתי על משתנה
PHP קוד:
int n2
ולתיבת TEXTBOX קוראים NUM2
אז אני עושה כאשר אני לוחץ על הכפתור שזה יקלוט את מה שיש שם
ככה

PHP קוד:
n2 int.Parse(num2.Text); 
וזה מראה שגיאה
על השורה של הקליטה
Input string was not in a correct format.
מה לעשות בבקשה
תודה

ואם תרצו את כל הקוד אז הנה


PHP קוד:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public 
partial class Form1 Form
    
{
        public 
Form1()
        {
            
InitializeComponent();
        }

        private 
void cu_Click(object senderEventArgs e)
        {
            
int n2;
            
            
n2 int.Parse(num2.Text);
            
        }
    }

  Reply With Quote