Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Answers
removing a decimal point "." from a string.
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Baruch F
16y
14.1k
1
Reply
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;
}
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
RichText Colored Links
Dragable rectangles