Missing conversion functionality

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

It seems that Microsoft always leaves out a peice of functionality that logically belongs somewhere. (I am new to this language.

In the integer object there are many methods that are always needed, such as hashing, typeing, and converting into a string

In the string object there are many methods that are always needed, such as hashing and typing. However, there is no function to convert the string into an integer object. To be orthogonal, shouldn't there be this conversion function since there is one in the integer object and it is one of the most often used functions on a string

How do you convert a string into an integer
 
You can convert an int to a string with this:
int myint = int.Parse("12345");

- Pete


stpatrickjr said:
It seems that Microsoft always leaves out a peice of functionality that
logically belongs somewhere. (I am new to this language.)
In the integer object there are many methods that are always needed, such
as hashing, typeing, and converting into a string.
In the string object there are many methods that are always needed, such
as hashing and typing. However, there is no function to convert the string
into an integer object. To be orthogonal, shouldn't there be this
conversion function since there is one in the integer object and it is one
of the most often used functions on a string?
 
Additionally, the Convert type has many static methods, which can be used
like:
int myint = Convert.ToInt32("1235");
string mystr = Convert.ToString(myint);

- Pete

stpatrickjr said:
It seems that Microsoft always leaves out a peice of functionality that
logically belongs somewhere. (I am new to this language.)
In the integer object there are many methods that are always needed, such
as hashing, typeing, and converting into a string.
In the string object there are many methods that are always needed, such
as hashing and typing. However, there is no function to convert the string
into an integer object. To be orthogonal, shouldn't there be this
conversion function since there is one in the integer object and it is one
of the most often used functions on a string?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top