Click here to Skip to main content
15,894,825 members
Home / Discussions / C#
   

C#

 
AnswerRe: Do people know about LINQ expression trees for super fast reflection? Pin
jschell17-Jan-11 8:22
jschell17-Jan-11 8:22 
GeneralRe: Do people know about LINQ expression trees for super fast reflection? [modified] Pin
SledgeHammer0118-Jan-11 4:55
SledgeHammer0118-Jan-11 4:55 
Questionhow to convert php code into c sharp code Pin
gsmfather15-Jan-11 8:08
gsmfather15-Jan-11 8:08 
AnswerRe: how to convert php code into c sharp code Pin
dan!sh 15-Jan-11 8:26
professional dan!sh 15-Jan-11 8:26 
AnswerRe: how to convert php code into c sharp code Pin
fjdiewornncalwe15-Jan-11 9:28
professionalfjdiewornncalwe15-Jan-11 9:28 
QuestionC# versus C++, null references and protecting against them Pin
bob1697214-Jan-11 8:48
bob1697214-Jan-11 8:48 
AnswerRe: C# versus C++, null references and protecting against them Pin
Pete O'Hanlon14-Jan-11 9:14
mvePete O'Hanlon14-Jan-11 9:14 
GeneralRe: C# versus C++, null references and protecting against them Pin
bob1697214-Jan-11 9:58
bob1697214-Jan-11 9:58 
ref to a reference type is too much like a pointer to a pointer. However, this brings up a question I've had while trying to use C# on occasion for small projects to learn it. Are there equivalent const rules in C# (as acompared to C++) to help prevent the method from modifying the "pointer"?

If there were something like that, ref might not be so bad since it would be a performance increase (at least in theory since I wouldn't need the runtime checks on the reference.

Pete O'Hanlon wrote:
which is not too good a practice

My knee-jerk reaction is to agree but if it would save the runtime checks, I'd be game to study the idea more.

None of my books really get into ref with reference types too much except the usual drive-by introduction. The best I've found is Richter's book but he basically says it's like a pointer to a pointer so I'm back to looking for a const solution like I would in C++. I'm not sure, but it seems const isn't really as much of a "thing" like it is in the C++ world.

I'm not familiar with "Code Contracts" so I'll give it some research time.
thanks.
GeneralRe: C# versus C++, null references and protecting against them Pin
Pete O'Hanlon14-Jan-11 10:55
mvePete O'Hanlon14-Jan-11 10:55 
GeneralRe: C# versus C++, null references and protecting against them Pin
bob1697214-Jan-11 10:48
bob1697214-Jan-11 10:48 
AnswerRe: C# versus C++, null references and protecting against them Pin
jschell14-Jan-11 9:46
jschell14-Jan-11 9:46 
GeneralRe: C# versus C++, null references and protecting against them Pin
bob1697214-Jan-11 10:23
bob1697214-Jan-11 10:23 
GeneralRe: C# versus C++, null references and protecting against them Pin
jschell15-Jan-11 9:44
jschell15-Jan-11 9:44 
AnswerRe: C# versus C++, null references and protecting against them Pin
Paul Michalik15-Jan-11 2:23
Paul Michalik15-Jan-11 2:23 
AnswerRe: C# versus C++, null references and protecting against them Pin
PIEBALDconsult15-Jan-11 4:12
mvePIEBALDconsult15-Jan-11 4:12 
GeneralRe: C# versus C++, null references and protecting against them Pin
bob1697215-Jan-11 5:00
bob1697215-Jan-11 5:00 
AnswerRe: C# versus C++, null references and protecting against them Pin
Chuck O'Toole15-Jan-11 17:14
Chuck O'Toole15-Jan-11 17:14 
GeneralRe: C# versus C++, null references and protecting against them Pin
bob1697215-Jan-11 19:23
bob1697215-Jan-11 19:23 
GeneralRe: C# versus C++, null references and protecting against them Pin
Chuck O'Toole15-Jan-11 20:56
Chuck O'Toole15-Jan-11 20:56 
GeneralRe: C# versus C++, null references and protecting against them Pin
bob1697216-Jan-11 5:24
bob1697216-Jan-11 5:24 
GeneralRe: C# versus C++, null references and protecting against them Pin
Chuck O'Toole16-Jan-11 6:00
Chuck O'Toole16-Jan-11 6:00 
GeneralRe: C# versus C++, null references and protecting against them Pin
Paul Michalik16-Jan-11 7:39
Paul Michalik16-Jan-11 7:39 
GeneralRe: C# versus C++, null references and protecting against them Pin
Chuck O'Toole16-Jan-11 7:57
Chuck O'Toole16-Jan-11 7:57 
GeneralRe: C# versus C++, null references and protecting against them Pin
Chuck O'Toole16-Jan-11 8:30
Chuck O'Toole16-Jan-11 8:30 
GeneralRe: C# versus C++, null references and protecting against them Pin
bob1697216-Jan-11 12:29
bob1697216-Jan-11 12:29 

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.