Click here to Skip to main content
15,888,000 members
Home / Discussions / C#
   

C#

 
QuestionCSV File Splitter Help... Pin
Alistair Jarrett2-Apr-09 5:36
Alistair Jarrett2-Apr-09 5:36 
AnswerRe: CSV File Splitter Help... Pin
Judah Gabriel Himango2-Apr-09 5:52
sponsorJudah Gabriel Himango2-Apr-09 5:52 
AnswerRe: CSV File Splitter Help... Pin
Le centriste2-Apr-09 5:52
Le centriste2-Apr-09 5:52 
AnswerRe: CSV File Splitter Help... Pin
DaveyM692-Apr-09 6:02
professionalDaveyM692-Apr-09 6:02 
AnswerRe: CSV File Splitter Help... Pin
riced2-Apr-09 7:05
riced2-Apr-09 7:05 
GeneralRe: CSV File Splitter Help... Pin
Alistair Jarrett2-Apr-09 22:46
Alistair Jarrett2-Apr-09 22:46 
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 
Hello,

I've got an easy on for you all.

Since I chose to have input of QueryTime possibly be a decimal (ex ".5"), I have kept it a decimal.

However, Timer.Interval is an int and I need to convert a decimal to an int.


 public void StartTimer(decimal QueryTime) // decimal QueryTime = 0.5<br />
        {<br />
            int shizz = Decimal.ToInt32(QueryTime); // int shizz = 0<br />
            int wtf = (Decimal.ToInt32(QueryTime) * 60) * 1000; // int wtf = 0<br />
<br />
            QueryTimer.Interval = ((int)QueryTime * 60)* 1000;<br />
            QueryTimer.Enabled = true;<br />
<br />
        }


Event when QueryTime = 0.5, both shizz and wtf are 0.


Does anyone know how to properly convert a decimal to an integer?


Thanks,

Matt
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 
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 

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.