I think you want something like:

result0 = int(inputNum1.Text) + int(inputNum2.Text)


From: [email protected] 
[mailto:[email protected]] On Behalf Of Andrew Evans
Sent: Thursday, May 14, 2009 3:19 PM
To: Discussion of IronPython
Subject: [IronPython] Doing Simple Math In Silverlight

Hello

I am trying to perform some math operations in Silverlight

inputNum1 and inputNum2 are of TextBox

inputNum1 = TextBox()
inputNum2 = TextBox()

    result0 = int(inputNum1) + int(inputNum2)
    res0.Text = str(result0)

I get the following error

TypeError: expected int, got TextBox

Any ideas
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to