Click here to Skip to main content
15,908,842 members
Home / Discussions / C#
   

C#

 
QuestionOleDbException:"no value given for one or more required parameters" Pin
MohammadAmiry2-Apr-06 10:07
MohammadAmiry2-Apr-06 10:07 
GeneralRe: OleDbException:"no value given for one or more required parameters" Pin
Guffa2-Apr-06 12:26
Guffa2-Apr-06 12:26 
Questionhow to start a messenger project ?? Pin
abdelhameed812-Apr-06 9:59
abdelhameed812-Apr-06 9:59 
AnswerRe: how to start a messenger project ?? Pin
CWIZO2-Apr-06 20:45
CWIZO2-Apr-06 20:45 
Questionmore precision in division by C# is possible? Pin
luca_la2-Apr-06 9:37
luca_la2-Apr-06 9:37 
AnswerRe: more precision in division by C# is possible? Pin
Guffa2-Apr-06 12:22
Guffa2-Apr-06 12:22 
GeneralRe: more precision in division by C# is possible? Pin
luca_la2-Apr-06 14:40
luca_la2-Apr-06 14:40 
AnswerRe: more precision in division by C# is possible? Pin
Guffa2-Apr-06 19:56
Guffa2-Apr-06 19:56 
Your problem is not the precision of the calculations, but the casting of the values.

As you see, the error of the final result is 0.00000001300782 when using the hand calculated value, but only 0.00000000000114 with the value calculated with C#, so the result is at least 10000 times better with the later one.

When you just cast the value to int, you will be rounding it down instead of rounding to the nearest value. Use Math.Round() before casting the value to an int, and you will get the correct value.

---
b { font-weight: normal; }

GeneralRe: more precision in division by C# is possible? Pin
luca_la2-Apr-06 23:21
luca_la2-Apr-06 23:21 
AnswerRe: more precision in division by C# is possible? Pin
Guffa4-Apr-06 2:37
Guffa4-Apr-06 2:37 
GeneralRe: more precision in division by C# is possible? Pin
luca_la7-Apr-06 3:22
luca_la7-Apr-06 3:22 
QuestionGetting an object's bytes Pin
martin_hughes2-Apr-06 4:30
martin_hughes2-Apr-06 4:30 
AnswerRe: Getting an object's bytes Pin
User 66582-Apr-06 4:42
User 66582-Apr-06 4:42 
AnswerRe: Getting an object's bytes Pin
Luis Alonso Ramos2-Apr-06 8:52
Luis Alonso Ramos2-Apr-06 8:52 
QuestionBrowsing to a file in forms Pin
naglbitur2-Apr-06 3:53
naglbitur2-Apr-06 3:53 
AnswerRe: Browsing to a file in forms Pin
User 66582-Apr-06 4:14
User 66582-Apr-06 4:14 
GeneralRe: Browsing to a file in forms Pin
naglbitur2-Apr-06 5:58
naglbitur2-Apr-06 5:58 
QuestionMSVS Designer Error Pin
Kordzik2-Apr-06 1:07
Kordzik2-Apr-06 1:07 
QuestionMS ObjectSpaces Pin
Varun Jain 7862-Apr-06 0:21
Varun Jain 7862-Apr-06 0:21 
QuestionSend more than 1024bytes with sockets? Pin
Erikerikerikerikerassa2-Apr-06 0:16
Erikerikerikerikerassa2-Apr-06 0:16 
AnswerRe: Send more than 1024bytes with sockets? Pin
leppie2-Apr-06 8:08
leppie2-Apr-06 8:08 
GeneralRe: Send more than 1024bytes with sockets? Pin
Erikerikerikerikerassa3-Apr-06 2:14
Erikerikerikerikerassa3-Apr-06 2:14 
QuestionDateTime parse help Pin
eggie51-Apr-06 23:00
eggie51-Apr-06 23:00 
AnswerRe: DateTime parse help Pin
mav.northwind2-Apr-06 0:11
mav.northwind2-Apr-06 0:11 
QuestionProblems updating records with Access DB Pin
James M 19821-Apr-06 22:32
James M 19821-Apr-06 22:32 

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.