Re: C# Nullable types
- From: "Henning Krause [MVP - Exchange]" <newsgroups_remove@xxxxxxxxxxxxxxxxx>
- Date: Thu, 5 Apr 2007 15:20:02 +0200
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@xxxxxxxxxxxxxxxxxxxxxxxHi 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
.
- References:
- Re: C# Nullable types
- From: Kevin Spencer
- Re: C# Nullable types
- From: Jon Skeet [C# MVP]
- Re: C# Nullable types
- From: Kevin Spencer
- Re: C# Nullable types
- From: Jon Skeet [C# MVP]
- Re: C# Nullable types
- From: Kevin Spencer
- Re: C# Nullable types
- From: Henning Krause [MVP - Exchange]
- Re: C# Nullable types
- From: Kevin Spencer
- Re: C# Nullable types
- Prev by Date: Re: C# Nullable types
- Next by Date: Re: C# Nullable types
- Previous by thread: Re: C# Nullable types
- Next by thread: Re: C# Nullable types
- Index(es):
Relevant Pages
|