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
Ingrid
NA
3
0
Very easy - but stumped! convert to currency
Jun 28 2007 10:25 AM
Hi,
OK. This is a very easy problem - that I can't find an answer for. I'm sure I'll fell dumb when I (you) figure it out.
I'm converting a string to currency. Nothing happens. It returns the same string - but not in catch - it is
NOT
going into catch.. Here's my function:
samples:
input:16406, 136.54
output: 16406, 136.54
public
string
currencyConvert(
string
money)
{
string
curr =
""
;
try
{
curr =
string
.Format(
"{0:C}"
, money);
}
catch
{
curr = money
;
}
return
curr;
}
Reply
Answers (
5
)
Array.Copy Question
Throughput/Design problem