Click here to Skip to main content
15,892,537 members
Home / Discussions / C#
   

C#

 
GeneralRe: XML versus Registry in C# Pin
PIEBALDconsult4-Mar-08 13:52
mvePIEBALDconsult4-Mar-08 13:52 
AnswerRe: XML versus Registry in C# Pin
GuyThiebaut5-Mar-08 2:17
professionalGuyThiebaut5-Mar-08 2:17 
QuestionHow to find item in a bind combobox Pin
baranils4-Mar-08 5:38
baranils4-Mar-08 5:38 
AnswerRe: How to find item in a bind combobox Pin
J$4-Mar-08 5:50
J$4-Mar-08 5:50 
GeneralRe: How to find item in a bind combobox Pin
baranils4-Mar-08 6:15
baranils4-Mar-08 6:15 
Questioni need ur helps Pin
thejakl554-Mar-08 5:27
thejakl554-Mar-08 5:27 
GeneralRe: i need ur helps Pin
Xmen Real 4-Mar-08 7:16
professional Xmen Real 4-Mar-08 7:16 
Question(4/4)%2 = 1? wtf? Pin
jchalfant4-Mar-08 4:27
jchalfant4-Mar-08 4:27 
Annoyingly enough, DataColumn.Expression doesn't support bitwise operators, so I decided to do it the long way. Also, annoyingly I can't modulo a double by an int, thus forcing me to convert to int. This leaves me with a column expression that looks like:

Convert((SomeColumn/4),'System.Int32')%2 = 1

Lo and behold my ire as I realize that the Convert function rounds the argument to its nearest whole value. Thus
3/4 = .75

Then:
Convert(.75,Int32) = 1

and
1%2 = 1

This irritates me, especially since I'm trying to work through the DataSet Designer in VS 2k5 and subsequently trying to write as little code as possible.

I've got a couple ideas for working around this - mostly involving writing in my own events or properties - but I'm curious to see if anyone has any other solutions.
AnswerRe: (4/4)%2 = 1? wtf? Pin
J$4-Mar-08 5:17
J$4-Mar-08 5:17 
AnswerRe: (4/4)%2 = 1? wtf? Pin
leppie4-Mar-08 5:59
leppie4-Mar-08 5:59 
GeneralRe: (4/4)%2 = 1? wtf? Pin
jchalfant4-Mar-08 6:41
jchalfant4-Mar-08 6:41 
GeneralRe: (4/4)%2 = 1? wtf? Pin
leppie4-Mar-08 7:18
leppie4-Mar-08 7:18 
GeneralRe: (4/4)%2 = 1? wtf? Pin
jchalfant4-Mar-08 7:38
jchalfant4-Mar-08 7:38 
AnswerRe: (4/4)%2 = 1? wtf? Pin
Guffa4-Mar-08 8:13
Guffa4-Mar-08 8:13 
GeneralRe: (4/4)%2 = 1? wtf? Pin
jchalfant4-Mar-08 8:26
jchalfant4-Mar-08 8:26 
AnswerRe: (4/4)%2 = 1? wtf? Pin
Luc Pattyn4-Mar-08 13:13
sitebuilderLuc Pattyn4-Mar-08 13:13 
GeneralRe: (4/4)%2 = 1? wtf? Pin
jchalfant4-Mar-08 13:29
jchalfant4-Mar-08 13:29 
GeneralRe: (4/4)%2 = 1? wtf? Pin
Luc Pattyn4-Mar-08 14:07
sitebuilderLuc Pattyn4-Mar-08 14:07 
Generalreading a binary file Pin
ES Kim4-Mar-08 4:21
ES Kim4-Mar-08 4:21 
AnswerRe: reading a binary file Pin
Eslam Afifi4-Mar-08 4:50
Eslam Afifi4-Mar-08 4:50 
GeneralAttempted to read and write protected memory… ActiveX on Vista Pin
anderslundsgard4-Mar-08 4:18
anderslundsgard4-Mar-08 4:18 
GeneralRe: Attempted to read and write protected memory… ActiveX on Vista Pin
leppie4-Mar-08 6:00
leppie4-Mar-08 6:00 
GeneralRe: Attempted to read and write protected memory… ActiveX on Vista Pin
Pete O'Hanlon4-Mar-08 10:08
mvePete O'Hanlon4-Mar-08 10:08 
GeneralRe: Attempted to read and write protected memory… ActiveX on Vista Pin
anderslundsgard4-Mar-08 19:59
anderslundsgard4-Mar-08 19:59 
GeneralRe: Attempted to read and write protected memory… ActiveX on Vista Pin
anderslundsgard4-Mar-08 20:10
anderslundsgard4-Mar-08 20:10 

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.