Click here to Skip to main content
16,005,080 members
Home / Discussions / C#
   

C#

 
QuestionBest way to validate dates? Pin
house29-Oct-04 9:35
house29-Oct-04 9:35 
AnswerRe: Best way to validate dates? Pin
Luis Alonso Ramos29-Oct-04 9:39
Luis Alonso Ramos29-Oct-04 9:39 
GeneralRe: Best way to validate dates? Pin
house1-Nov-04 2:55
house1-Nov-04 2:55 
GeneralRe: Best way to validate dates? Pin
Luis Alonso Ramos1-Nov-04 5:31
Luis Alonso Ramos1-Nov-04 5:31 
AnswerRe: Best way to validate dates? Pin
Nick Parker29-Oct-04 14:20
protectorNick Parker29-Oct-04 14:20 
QuestionHow to initially set the focus to a control Pin
Luis Alonso Ramos29-Oct-04 9:28
Luis Alonso Ramos29-Oct-04 9:28 
AnswerRe: How to initially set the focus to a control Pin
Luis Alonso Ramos29-Oct-04 9:44
Luis Alonso Ramos29-Oct-04 9:44 
GeneralC# Double arithmetic producing unstable answers Pin
ldself29-Oct-04 7:46
ldself29-Oct-04 7:46 
I'm getting some unpredictable results when I divide two doubles. Here is an example.

If
double[] a = new double[6]{30.0, 3.0, 0.3, 0.03, 0.003, 0.0003};
double[] b = new double[6]{20.0, 2.0, 0.2, 0.02, 0.002, 0.0002};

then according to C# (.NET?)
a[0] / b[0] = 1.5
a[1] / b[1] = 1.5
a[2] / b[2] = 1.4999999999999998
a[3] / b[3] = 1.5
a[4] / b[4] = 1.5
a[5] / b[5] = 1.4999999999999998

Not a big difference in magnitude but my code also involves rounding the results which really throws things off.

Any help with an explanation and/or solution is greatly appreciated.
GeneralRe: C# Double arithmetic producing unstable answers Pin
Nick Parker29-Oct-04 8:15
protectorNick Parker29-Oct-04 8:15 
GeneralRe: C# Double arithmetic producing unstable answers Pin
Hugo Migneron29-Oct-04 8:17
Hugo Migneron29-Oct-04 8:17 
GeneralRe: C# Double arithmetic producing unstable answers Pin
Nick Parker29-Oct-04 15:08
protectorNick Parker29-Oct-04 15:08 
Generalstructs and 'using' Pin
Nemanja Trifunovic29-Oct-04 6:47
Nemanja Trifunovic29-Oct-04 6:47 
GeneralRe: structs and 'using' Pin
leppie29-Oct-04 9:02
leppie29-Oct-04 9:02 
GeneralRe: structs and 'using' Pin
Nemanja Trifunovic29-Oct-04 9:14
Nemanja Trifunovic29-Oct-04 9:14 
GeneralRe: structs and 'using' Pin
Ketty Avashia29-Oct-04 9:27
Ketty Avashia29-Oct-04 9:27 
GeneralRe: structs and 'using' Pin
Nemanja Trifunovic29-Oct-04 9:42
Nemanja Trifunovic29-Oct-04 9:42 
GeneralI got an answer on a C# newsgroup Pin
Nemanja Trifunovic29-Oct-04 10:00
Nemanja Trifunovic29-Oct-04 10:00 
GeneralRe: structs and 'using' Pin
Ami Bar29-Oct-04 12:16
Ami Bar29-Oct-04 12:16 
GeneralRe: structs and 'using' Pin
Nemanja Trifunovic29-Oct-04 12:27
Nemanja Trifunovic29-Oct-04 12:27 
GeneralRe: structs and 'using' Pin
Ami Bar29-Oct-04 12:51
Ami Bar29-Oct-04 12:51 
GeneralCant not get the ListView TextAlign Property to center Pin
Tony D. Abel29-Oct-04 5:37
Tony D. Abel29-Oct-04 5:37 
GeneralRe: Cant not get the ListView TextAlign Property to center Pin
sreejith ss nair29-Oct-04 5:51
sreejith ss nair29-Oct-04 5:51 
GeneralUser Control taking up too much resources Pin
xiaowenjie29-Oct-04 4:44
xiaowenjie29-Oct-04 4:44 
GeneralRe: User Control taking up too much resources Pin
sreejith ss nair29-Oct-04 4:47
sreejith ss nair29-Oct-04 4:47 
GeneralRe: User Control taking up too much resources Pin
xiaowenjie29-Oct-04 4:53
xiaowenjie29-Oct-04 4:53 

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.