Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

casting a string to an int

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    casting a string to an int

    Hi

    I have a string that I want to conver to an int :

    string endtime = EndTime.ToString();
    int convert = Integer.parseInt(endtime);


    This doesn't work !

    Do I have to import a library. The message I get is : the name Interger does not exist in the current context.


    Thanks

    #2
    Learn how to convert a string to a number in C# by calling the Parse, TryParse, or Convert class methods.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    601 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    347 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    103 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    559 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    558 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X