Re: C# Nullable types

Tech-Archive recommends: Fix windows errors by optimizing your registry



If it's a member variable, it's assigned the null value at runtime. It's not unassigned.

Best regards,
Henning Krause

"Kevin Spencer" <unclechutney@xxxxxxxxxxxx> wrote in message news:uaPi1R4dHHA.984@xxxxxxxxxxxxxxxxxxxxxxx
But in this case, you always pass an assigned value to the method. It cannot be unassigned by definition. Its either null or has reference to something.

It can be unassigned, if it is a member and not a local variable.

The bottom line (the one that matters, in other words) is that the ideas I expressed in my original reply were correct, but the words I used to express them were parsed incorrectly by people for whom the reply was not intended, for wahtever reason. The OP has not asked for clarification regarding the reply. I can only hope that this is because the OP understood what I was saying.

In the end, it doesn't matter which end of the boiled egg one begins at, as long as one eats the egg.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"Henning Krause [MVP - Exchange]" <newsgroups_remove@xxxxxxxxxxxxxxxxx> wrote in message news:e81TW63dHHA.4352@xxxxxxxxxxxxxxxxxxxxxxx

"Kevin Spencer" <unclechutney@xxxxxxxxxxxx> wrote in message news:%23eHvgu3dHHA.4004@xxxxxxxxxxxxxxxxxxxxxxx
Hi Jon,

Well, it's a bit more complicated than that. If it's a parameter, for example, the compiler doesn't complain at all. Example:

public boo StringIsNull(string s)
{
return (s == null);
}


But in this case, you always pass an assigned value to the method. It cannot be unassigned by definition. Its either null or has reference to something.

This differs from local variables.

Best regards,
Henning Krause




.



Relevant Pages

  • Re: References vs Copies
    ... Chicken Salad Surgery ... reference type by value to a method). ... C# Code Metrics: Quick metrics for C# ... "Kevin Spencer" wrote: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: rendering owc charts in asp.net page
    ... > Best regards ... >> you are using visual studio, it automatically finds and uses the Office ... >> PIA when it detects a reference to an unmanaged assembly. ...
    (microsoft.public.office.developer.web.components)
  • Re: Start Up - Aftermath of virus removal
    ... What's the location of the one reference to crss.exe? ... Bert Kinney MS-MVP Shell/User ... >> Regards, ... >> Russell wrote: ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: How to use session values in .CSS file?
    ... Generating a stylesheet once, or on changes, for the user and then ... html and reference to it as if it were a ordinary css-file. ... >Thanks & regards, ... > You can define custom names in the Header section with Literal Controls ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Genes and the Mind
    ... Could you provide the reference for "the article in question"? ... I don't have a shitty attitude, ... give a man a fish and he will eat for a day, ...
    (uk.philosophy.humanism)