TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Baruch F
NA
15
0
removing a decimal point "." from a string.
Jul 14 2008 8:53 AM
I have many strings in a database that are actually numbers. I need the string to remain a string exactly as it is but without the decimal point. I also have some that end in a 0 so converting it to decimal is a problem since the 0 has no value and therfore falls off.
the reason for this is that it references another database that has the same strings but without the decimal. I tried the following code but it won't let me do it because "." is not a char and it won't let me cast it either. Any suggestions?
IEnumerator thisIEnum = diagAStr.GetEnumerator();
while (thisIEnum.MoveNext())
{
if(thisIEnum.Current != ".")
temp = temp + thisIEnum.Current;
}
Reply
Answers (
2
)
RichText Colored Links
Dragable rectangles