Is there a difference between passing "" and passing Nothing to a Windows API ?

  • Thread starter Thread starter academic
  • Start date Start date
so by Francesco Balena and Giusseppe Dimauro and MS Press it is :-)
Then I guess I'll have to disagree with them, it wouldn't be the first
time.


Well ,,,,, i learned a lot from Francesco and his assistents , to me he is
the ultimate Guru
also for the fact that when he recomends something he has a good explanation
why or why not to do it
however as i said before this book is about "practical guidelines and best
practices" if you feel you do not need them don`t use them


By the way the book is also stating that it addopted the internal guidelines
of MS

Do they also recommend catch-all exception handling (or On Error
Resume Next style programming)?

No they recomend the opposite ,,,, use it as few as possible ( it is better
to check for yourself if possible as relying on the exception object , and
they tell to stay away from on error syntax )

In this thread i am fully with Carlos , he reflects my opinion

maybe it is a mind twist that we share the same as i also started on the
C64 :-)


regards

Michel Posseth [MCP]
 
CMM said:
Does this method throw an exception on empty strings as well? If not,
you've proved my point, not yours.

This depends on the particular case. If the method can cope with "", then
it will work, otherwise an appropriate exception ('ArgumentException') is
thrown. 'NullReferenceException' is thrown if 'Nothing' is passed to the
method.
You can't give describe a concrete example why unitialized strings should
be the *norm* rather than the exception (pun intended)????

If they were the exception 'String' would have made a value type or a type
with value type semantics.
 
Back
Top