473,408 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Missing conversion functionality

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
Nov 15 '05 #1
2 1056
You can convert an int to a string with this:
int myint = int.Parse("12345");

- Pete
"stpatrickjr" <an*******@discussions.microsoft.com> wrote in message
news:4C**********************************@microsof t.com...
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?

Nov 15 '05 #2
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" <an*******@discussions.microsoft.com> wrote in message
news:4C**********************************@microsof t.com...
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?

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Chris Brown | last post by:
Hello, I work for a company that sells a product with a VFP frontend/MSSQL backend, and we have become aware for many reasons the we need to switch over to ..net. The problem is that our...
22
by: kalio80 | last post by:
Hi everyone I am trying to create a file that converts text files from unix to windows and windows to unix I understand the general concept of it as unix uses line feed LF Windows uses CRLF...
16
by: forester | last post by:
lets say its common situation when object have subobjects in container and receives callbacks from contained items. and object want to move objects in containers on signal(callback). iterator is...
1
by: Jimmy Seow | last post by:
Dear All, Hope somebody can help me with this. I have created a class and have got it to serialize and deserialize using XmlSerialization without any problems. I've also read the documentation...
2
by: Viet | last post by:
I have an architectural issue that I have been working on for quite awhile now and I would like another person's point of view. This issue involves the conversion of a VB6 app to VB.NET. In this...
10
by: Michael D. Ober | last post by:
I have a class: Private Class ClientList Inherits StringCollection Public InternalUser As Boolean = False Public Shadows Function Contains(ByVal ClientNumber As String) As Boolean
12
by: The Frog | last post by:
Hi all, Does anyone have a way to print forms at design time directly from the IDE? I am not a great fan of the print screen to paint to print method. I would really like to know if anyone has a...
4
by: subramanian100in | last post by:
In the book, C++ Coding Standards book by Hereb Sutter and Andrei Alexandrescu, in Item 40 on pages 86-87 viz, "Avoid providing implicit conversions", the authors have advised the use of named...
0
by: maheshmohta | last post by:
Background Often while remodeling legacy application, one of the important tasks for the architects is to have an optimum usage of storage capabilities of database. Most of the legacy applications...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.