Click here to Skip to main content
15,891,657 members
Home / Discussions / C#
   

C#

 
GeneralRe: Sending Parameter Pin
William Winner21-May-10 7:01
William Winner21-May-10 7:01 
GeneralRe: Sending Parameter Pin
harold aptroot21-May-10 7:10
harold aptroot21-May-10 7:10 
GeneralRe: Sending Parameter Pin
William Winner21-May-10 7:25
William Winner21-May-10 7:25 
GeneralRe: Sending Parameter Pin
harold aptroot21-May-10 7:27
harold aptroot21-May-10 7:27 
GeneralRe: Sending Parameter Pin
harold aptroot21-May-10 7:24
harold aptroot21-May-10 7:24 
AnswerRe: Sending Parameter Pin
William Winner21-May-10 7:19
William Winner21-May-10 7:19 
Questionhow to develop OPC Client using C# Pin
Raghu_M21-May-10 5:19
Raghu_M21-May-10 5:19 
QuestionBest Practices: Checking For Null Objects After Initializing Pin
Wainwrightwt21-May-10 3:24
Wainwrightwt21-May-10 3:24 
AnswerRe: Best Practices: Checking For Null Objects After Initializing Pin
PIEBALDconsult21-May-10 3:35
mvePIEBALDconsult21-May-10 3:35 
AnswerRe: Best Practices: Checking For Null Objects After Initializing Pin
harold aptroot21-May-10 3:36
harold aptroot21-May-10 3:36 
AnswerRe: Best Practices: Checking For Null Objects After Initializing Pin
Luc Pattyn21-May-10 3:44
sitebuilderLuc Pattyn21-May-10 3:44 
GeneralRe: Best Practices: Checking For Null Objects After Initializing Pin
PIEBALDconsult21-May-10 3:52
mvePIEBALDconsult21-May-10 3:52 
GeneralRe: Best Practices: Checking For Null Objects After Initializing Pin
Md. Marufuzzaman21-May-10 4:53
professionalMd. Marufuzzaman21-May-10 4:53 
GeneralRe: Best Practices: Checking For Null Objects After Initializing Pin
Md. Marufuzzaman21-May-10 4:55
professionalMd. Marufuzzaman21-May-10 4:55 
AnswerRe: Best Practices: Checking For Null Objects After Initializing Pin
Covean21-May-10 3:51
Covean21-May-10 3:51 
The reason for that is maybe he is an old c++ developer.
IN C++ the new and all other allocation functions could
return a null pointer if the function couldn't allocate
the memory.

In C# this is not necessary, because it allocates the memory
block you requested or it throws an OutOfMemoryException.


But it is a common mistake made by the most old c++
developer (including me Poke tongue | ;-P ) as they started
developing in C#.

Edit:
But throwing a NullReferenceException is very uncommon and cruel (can be misunderstood).
Greetings
Covean

GeneralRe: Best Practices: Checking For Null Objects After Initializing Pin
Wainwrightwt21-May-10 4:16
Wainwrightwt21-May-10 4:16 
GeneralRe: Best Practices: Checking For Null Objects After Initializing Pin
Covean21-May-10 4:27
Covean21-May-10 4:27 
GeneralRe: Best Practices: Checking For Null Objects After Initializing Pin
Luc Pattyn21-May-10 4:42
sitebuilderLuc Pattyn21-May-10 4:42 
GeneralRe: Best Practices: Checking For Null Objects After Initializing Pin
Wainwrightwt21-May-10 5:22
Wainwrightwt21-May-10 5:22 
QuestionMultiple forms in C# Pin
Etienne_12321-May-10 2:26
Etienne_12321-May-10 2:26 
AnswerRe: Multiple forms in C# Pin
#realJSOP21-May-10 2:30
mve#realJSOP21-May-10 2:30 
AnswerRe: Multiple forms in C# Pin
Luc Pattyn21-May-10 3:45
sitebuilderLuc Pattyn21-May-10 3:45 
AnswerRe: Multiple forms in C# Pin
PIEBALDconsult21-May-10 4:33
mvePIEBALDconsult21-May-10 4:33 
GeneralRe: Multiple forms in C# Pin
Luc Pattyn21-May-10 4:44
sitebuilderLuc Pattyn21-May-10 4:44 
AnswerRe: Multiple forms in C# Pin
Henry Minute21-May-10 6:16
Henry Minute21-May-10 6:16 

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.