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

C#

 
GeneralRe: Call static method of a known Type Pin
Mr. Candyman14-Nov-07 5:38
Mr. Candyman14-Nov-07 5:38 
GeneralRe: Call static method of a known Type Pin
Stevo Z14-Nov-07 5:51
Stevo Z14-Nov-07 5:51 
GeneralRe: Call static method of a known Type Pin
Mr. Candyman14-Nov-07 6:00
Mr. Candyman14-Nov-07 6:00 
GeneralRe: Call static method of a known Type Pin
Stevo Z14-Nov-07 6:10
Stevo Z14-Nov-07 6:10 
AnswerThe cleaner method Pin
Ennis Ray Lynch, Jr.14-Nov-07 9:26
Ennis Ray Lynch, Jr.14-Nov-07 9:26 
QuestionBit Testing and operator unchecked() Pin
Jeffrey Walton14-Nov-07 4:35
Jeffrey Walton14-Nov-07 4:35 
AnswerRe: Bit Testing and operator unchecked() Pin
Luc Pattyn14-Nov-07 5:08
sitebuilderLuc Pattyn14-Nov-07 5:08 
GeneralRe: Bit Testing and operator unchecked() Pin
Jeffrey Walton14-Nov-07 5:41
Jeffrey Walton14-Nov-07 5:41 
Hi Luc,

Thank you very much for the comprehensive response. Here's the next issue (I did not like the ToString() calls either). Changing:
Byte.Parse(Octets[0].ToString())
to
(Byte)Octets[0]
reults in Compiler Error:
Error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement

More awkwardness: changing from Parse() and ToString() to
(Int32)Octets[0] / 40
results in Runtime Error:
An unhandled exception of type 'System.InvalidCastException' occurred in OIDFetch.exe
Additional information: Specified cast is not valid.

This is frustrating. I can understand abstracting away bit operations due to code portability. But when did operations on numbers stop being number-centric?

The situation reminds me of Java. Trying to read a file results in so many casts to so many readers, you lose the readability (semantics) of what you are trying to accomplish: FileReaders to ByteReaders to StreamReaders... I never went back to Java after college.

Jeff
GeneralRe: Bit Testing and operator unchecked() Pin
Luc Pattyn14-Nov-07 5:52
sitebuilderLuc Pattyn14-Nov-07 5:52 
GeneralRe: Bit Testing and operator unchecked() Pin
Judah Gabriel Himango14-Nov-07 5:54
sponsorJudah Gabriel Himango14-Nov-07 5:54 
GeneralRe: Bit Testing and operator unchecked() Pin
Jeffrey Walton14-Nov-07 6:09
Jeffrey Walton14-Nov-07 6:09 
GeneralRe: Bit Testing and operator unchecked() Pin
Guffa14-Nov-07 9:24
Guffa14-Nov-07 9:24 
GeneralRe: Bit Testing and operator unchecked() Pin
Jeffrey Walton14-Nov-07 6:05
Jeffrey Walton14-Nov-07 6:05 
GeneralRe: Bit Testing and operator unchecked() Pin
Jeffrey Walton14-Nov-07 6:08
Jeffrey Walton14-Nov-07 6:08 
GeneralRe: Bit Testing and operator unchecked() Pin
Luc Pattyn14-Nov-07 6:39
sitebuilderLuc Pattyn14-Nov-07 6:39 
AnswerRe: Bit Testing and operator unchecked() Pin
Guffa14-Nov-07 9:15
Guffa14-Nov-07 9:15 
GeneralRe: Bit Testing and operator unchecked() Pin
Jeffrey Walton14-Nov-07 11:33
Jeffrey Walton14-Nov-07 11:33 
AnswerBit Testing And operator~ Pin
Jeffrey Walton14-Nov-07 11:49
Jeffrey Walton14-Nov-07 11:49 
QuestionDataSet Design to database Pin
cecildt14-Nov-07 4:26
cecildt14-Nov-07 4:26 
AnswerRe: DataSet Design to database Pin
Colin Angus Mackay14-Nov-07 4:30
Colin Angus Mackay14-Nov-07 4:30 
GeneralRe: DataSet Design to database Pin
cecildt14-Nov-07 4:43
cecildt14-Nov-07 4:43 
GeneralRe: DataSet Design to database Pin
Pete O'Hanlon14-Nov-07 4:57
mvePete O'Hanlon14-Nov-07 4:57 
GeneralRe: DataSet Design to database Pin
Colin Angus Mackay14-Nov-07 5:24
Colin Angus Mackay14-Nov-07 5:24 
AnswerRe: DataSet Design to database Pin
Brady Kelly14-Nov-07 5:19
Brady Kelly14-Nov-07 5:19 
QuestionAbout ReportViewer in c# Pin
Davood Riazi14-Nov-07 3:27
Davood Riazi14-Nov-07 3:27 

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.