Example converting a string "123456789987654321" to integer value as 123456789987654321.
Also note that all primitive types have Parse(). E.g. int.Parse("123").
Answer by Molix
Apr 23, 2010 at 03:40 PM
For a long, I think you'll want Convert.ToInt64( "1234567890987654321" );
Answer by Ray Pendergraph
Apr 23, 2010 at 02:46 PM
Use the Convert class: http://msdn.microsoft.com/en-us/library/dsfy6sz9%28v=VS.100%29.aspx
This doesn't seem to work in UnityScript though. Any ideas?
are you definitely using System ?
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
3 People are following this question.
How To Switch A XmlNodeList To A String
How to convert a float to a string and then have it appear in a gui rect
Fastest C# Byte to String conversion?
Using strings to refrence gameobjects in C#