الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

التحويل من نص الى عدد

مغلق
بدأه mimi في 30 يونيو 2002 · 7 رد · 757 مشاهدة · في Microsoft Visual C#.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

كيف احول القيمه الموجوده في متغير نصي الى قيمه عددية

مثلا القيمة الموجوده في مربع نص كيف اعمل عليها عمليات حسابية

ومشكورين مسبقا ياشباب

#2

Hello Mimi,

If you have a text box textBox1 and wants to do some calculation on it,you just need to convert its Text property to integer using the Convert class :

Example:

int m = Convert.ToInt32(textBox1.Text)  
;

the ToInt32 method converts the text to an integer.You can also convert to long using the ToInt64 or to short using ToInt16.

Convert.ToInt16(textBox1.Text) ;

Convert.ToInt64(textBox1.Text) ;

Or to a double

Convert.ToDouble(textBox1.Text) ;

Check the MSDN documentation for a list of all the supported conversion methods.

Tahiyati

Madani

#3

شكرا لك اخ مدني

#4

أخي لماذا تكتب بلاجليزي ... أنا ما اعرف ايش تقول :D

وشكراً

If you think yourself that you are nobody, you should go somewhere to find yourself

#5

I will be writing in Arabic soon.

;) ;)

Is this Arabic ? :

اقتباس
والى الفتفسار اكثر راسنا

;);)

#6

You are veray good into the english(f)

أنا قلت الي اعرفه بلe

شكراً لك

If you think yourself that you are nobody, you should go somewhere to find yourself

#7

1ستعمل دالة كونفرت مثلا :

int n;
n=Convert.ToInt16("123")

وبدلك يخصص للان قيمة 123 ونوعها int (عدد)

منارة التقنية

http://itechflare.com

 

برنامج إستخراج سندات القبض المجاني

للمزيد

#8
int myNumber=int.Parse("1234");

Sr. Software Development Engineer
Hulu, LLC
My Blogs

هذا الموضوع مغلق.

مواضيع مشابهة