Click here to Skip to main content
15,887,746 members
Home / Discussions / C#
   

C#

 
GeneralRe: CSV File Splitter Help... Pin
riced3-Apr-09 3:59
riced3-Apr-09 3:59 
QuestionAn easy one... problems converting a decimal to an integer Pin
bbranded2-Apr-09 5:31
bbranded2-Apr-09 5:31 
AnswerRe: An easy one... problems converting a decimal to an integer Pin
DaveyM692-Apr-09 5:37
professionalDaveyM692-Apr-09 5:37 
GeneralRe: An easy one... problems converting a decimal to an integer Pin
bbranded2-Apr-09 5:44
bbranded2-Apr-09 5:44 
GeneralRe: An easy one... problems converting a decimal to an integer Pin
DaveyM692-Apr-09 5:50
professionalDaveyM692-Apr-09 5:50 
AnswerRe: An easy one... problems converting a decimal to an integer Pin
harold aptroot2-Apr-09 6:08
harold aptroot2-Apr-09 6:08 
GeneralRe: An easy one... problems converting a decimal to an integer Pin
bbranded2-Apr-09 7:06
bbranded2-Apr-09 7:06 
GeneralRe: An easy one... problems converting a decimal to an integer Pin
harold aptroot2-Apr-09 8:19
harold aptroot2-Apr-09 8:19 
Small tip, multiply by 60000 instead, bit faster.

Since you're turning it into an int anyway, and considering the range of expected values, you could use a float without trouble (several orders of magnitude faster than a decimal)

Something like:
int someFunctionName(string input)
{
    return (int)(float.Parse(input) * 60000);
}

warning: untested

In RealLife(tm) you might want to use float.TryParse and do something clever in case it returns false.
GeneralRe: An easy one... problems converting a decimal to an integer Pin
Luc Pattyn2-Apr-09 8:53
sitebuilderLuc Pattyn2-Apr-09 8:53 
GeneralRe: An easy one... problems converting a decimal to an integer Pin
harold aptroot2-Apr-09 9:11
harold aptroot2-Apr-09 9:11 
AnswerRe: An easy one... problems converting a decimal to an integer Pin
Luc Pattyn2-Apr-09 8:58
sitebuilderLuc Pattyn2-Apr-09 8:58 
Question1st Post and Code snip so far Pin
stonebergftw2-Apr-09 5:03
stonebergftw2-Apr-09 5:03 
AnswerRe: 1st Post and Code snip so far Pin
Judah Gabriel Himango2-Apr-09 5:45
sponsorJudah Gabriel Himango2-Apr-09 5:45 
GeneralRe: 1st Post and Code snip so far Pin
stonebergftw2-Apr-09 6:02
stonebergftw2-Apr-09 6:02 
GeneralRe: 1st Post and Code snip so far Pin
Judah Gabriel Himango2-Apr-09 6:04
sponsorJudah Gabriel Himango2-Apr-09 6:04 
AnswerRe: 1st Post and Code snip so far Pin
Simon P Stevens2-Apr-09 5:52
Simon P Stevens2-Apr-09 5:52 
GeneralRe: 1st Post and Code snip so far Pin
stonebergftw2-Apr-09 6:44
stonebergftw2-Apr-09 6:44 
GeneralRe: 1st Post and Code snip so far Pin
Simon P Stevens2-Apr-09 21:20
Simon P Stevens2-Apr-09 21:20 
GeneralRe: 1st Post and Code snip so far Pin
stonebergftw6-Apr-09 7:29
stonebergftw6-Apr-09 7:29 
QuestionVisualizing Windows Form interactively!!!! Pin
Rajdeep.NET is BACK2-Apr-09 4:57
Rajdeep.NET is BACK2-Apr-09 4:57 
QuestionRe: Visualizing Windows Form interactively!!!! Pin
led mike2-Apr-09 5:02
led mike2-Apr-09 5:02 
AnswerRe: Visualizing Windows Form interactively!!!! Pin
Rajdeep.NET is BACK2-Apr-09 5:13
Rajdeep.NET is BACK2-Apr-09 5:13 
GeneralRe: Visualizing Windows Form interactively!!!! Pin
led mike2-Apr-09 5:41
led mike2-Apr-09 5:41 
AnswerRe: Visualizing Windows Form interactively!!!! Pin
Alok Sharma ji2-Apr-09 12:38
Alok Sharma ji2-Apr-09 12:38 
AnswerRe: Visualizing Windows Form interactively!!!! Pin
DaveyM692-Apr-09 5:26
professionalDaveyM692-Apr-09 5:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.