Android Question Calculator

Discussion in 'Android Questions' started by Matteo Granatiero, Nov 26, 2018.

  1. Matteo Granatiero

    Matteo Granatiero Active Member Licensed User

    In practice I need to add (as a value not as text) a number (+1) to a number entered in an EditBox. I tried so "rough"
    Code:
    EditText1.Text = "1"
    Dim s As String = EditText1.Text
    Msgbox (s + 1"") [/ CODE]

    My problem 
    is this, which unfortunately leaves me, in the msgbox"2.0". ONLY I will use the "2" as a value, how can I do?
     
  2. DonManfred

    DonManfred Expert Licensed User

    Use numberformat to format a value.
     
    Matteo Granatiero likes this.
  3. Matteo Granatiero

    Matteo Granatiero Active Member Licensed User

    where?
     
  4. Matteo Granatiero

    Matteo Granatiero Active Member Licensed User

    I solved using
    Code:
    Dim p as Int = edittext1.text
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    Matteo Granatiero likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice