Click here to Skip to main content
15,900,258 members
Home / Discussions / C#
   

C#

 
GeneralRe: This is sad Pin
Martin Cook15-Apr-03 7:45
professionalMartin Cook15-Apr-03 7:45 
GeneralRe: This is sad Pin
RB@Emphasys15-Apr-03 7:50
RB@Emphasys15-Apr-03 7:50 
QuestionCType in C#? Pin
monrobot1315-Apr-03 7:25
monrobot1315-Apr-03 7:25 
AnswerRe: CType in C#? Pin
RB@Emphasys15-Apr-03 7:46
RB@Emphasys15-Apr-03 7:46 
AnswerRe: CType in C#? Pin
Martin Cook15-Apr-03 7:51
professionalMartin Cook15-Apr-03 7:51 
AnswerRe: CType in C#? Pin
Andres Manggini15-Apr-03 8:42
Andres Manggini15-Apr-03 8:42 
AnswerRe: CType in C#? Pin
Atul Kale16-Apr-03 1:11
Atul Kale16-Apr-03 1:11 
AnswerRe: CType in C#? Pin
monrobot1316-Apr-03 4:15
monrobot1316-Apr-03 4:15 
Thank you for all the replies, but unfortunately none are really what I can use. Here is basically what I'm trying to do. I take two variables and divide them, then I multiply by another variable. The division usually yeilds a number below zero so multiplying still gives me zero. Now with the CType function you can convert the expression to an int and it will round the number up to one instead of zero. Like this for example:
[Visual Basic]
// var1 = 7 [int]
// var2 = 10 [int]
var3 = CType ((var1/var2), Integer)
// var3 [int] will equal 1, instead of 0
The variables mentioned above are all ints and changing their type is not an option. I guess what I really need is something that will round an expression to the nearest whole number.

- monrobot13
GeneralRe: CType in C#? Pin
Atul Kale16-Apr-03 5:51
Atul Kale16-Apr-03 5:51 
GeneralToolbox like C# Pin
tuan_tomy15-Apr-03 6:40
tuan_tomy15-Apr-03 6:40 
GeneralRe: Toolbox like C# Pin
perlmunger16-Apr-03 6:24
perlmunger16-Apr-03 6:24 
GeneralRedefining an Array with a charecter Pin
Ioncycle15-Apr-03 6:36
Ioncycle15-Apr-03 6:36 
GeneralAccessing Web Service through HTTP Proxy Pin
Atul Kale15-Apr-03 6:21
Atul Kale15-Apr-03 6:21 
GeneralRe: Accessing Web Service through HTTP Proxy Pin
Natty Gur15-Apr-03 18:16
Natty Gur15-Apr-03 18:16 
GeneralRe: Accessing Web Service through HTTP Proxy Pin
Atul Kale15-Apr-03 23:00
Atul Kale15-Apr-03 23:00 
GeneralIDisposable Pin
S O S15-Apr-03 5:45
S O S15-Apr-03 5:45 
GeneralRe: IDisposable Pin
Chris Austin15-Apr-03 6:18
Chris Austin15-Apr-03 6:18 
GeneralRe: IDisposable Pin
Andres Manggini15-Apr-03 6:20
Andres Manggini15-Apr-03 6:20 
GeneralTime Zone Pin
Mazdak15-Apr-03 4:16
Mazdak15-Apr-03 4:16 
GeneralRe: Time Zone Pin
Not Active15-Apr-03 5:07
mentorNot Active15-Apr-03 5:07 
GeneralRe: Time Zone Pin
Chris Austin15-Apr-03 5:09
Chris Austin15-Apr-03 5:09 
QuestionCorrect way to abort a Suspended thread? Pin
Christian Merritt15-Apr-03 3:24
Christian Merritt15-Apr-03 3:24 
AnswerRe: Correct way to abort a Suspended thread? Pin
Daniel Turini15-Apr-03 3:47
Daniel Turini15-Apr-03 3:47 
GeneralRe: Correct way to abort a Suspended thread? Pin
Christian Merritt15-Apr-03 3:54
Christian Merritt15-Apr-03 3:54 
AnswerRe: Correct way to abort a Suspended thread? Pin
Martin Cook15-Apr-03 8:26
professionalMartin Cook15-Apr-03 8: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.