Re: Place of BeginTransaction in code

Tech-Archive recommends: Speed Up your PC by fixing your registry



This is only valid for member variables, local need to be explicitely
assigned/initialized, though failing to do so results in a compiler error .

Willy.

"Marina Levit [MVP]" <someone@xxxxxxxxxx> wrote in message
news:%23PkxvGJ7GHA.4996@xxxxxxxxxxxxxxxxxxxxxxx
| Yes, it is. A variable that is an object, is initially not pointing to
| anything- a.k.a null.
|
| Declare a variable and try to use it without instantiating it - you will
| get a NullReferenceException.
| Declare the same variable and point it to null and try to use it - you
will
| get a NullReferenceException.
|
| This applies to objects, not structures.
|
| "Mark Wilden" <mwilden@xxxxxxxxxxxxxxxx> wrote in message
| news:eE01qCJ7GHA.3280@xxxxxxxxxxxxxxxxxxxxxxx
| > "Marina Levit [MVP]" <someone@xxxxxxxxxx> wrote in message
| > news:%23sbQhyH7GHA.4500@xxxxxxxxxxxxxxxxxxxxxxx
| >
| >> Whether or not you set it to null is irrelevant. When you declare a
| >> variable, it is already null.
| >
| > Actually, I don't believe that's true, is it?
| >
| > ///ark
| >
| >
|
|


.



Relevant Pages

  • Re: declaration meaning
    ... declare it as a variable, it would get a compiler error. ... get a name we later hold for when referring to allocated memory. ... it makes your code wide open for heap-overflow attacks and code injection exploits. ...
    (comp.lang.c)
  • Re: Galloway to be suspended from Parliament
    ... 'failing to declare' is an administrative 'crime' for an mp..... ... Neither of whom are our elected representatives in parliament. ...
    (uk.politics.misc)
  • Re: Newbie Question
    ... It may be a problem but the compiler error clearly stated that he tried to ... declare a method where only a class, delegate, enum, interface, or struct is ... >> public static extern int SendCharFmtMsg(IntPtr hWnd, int Msg, int ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Galloway to be suspended from Parliament
    ... for failing to declare that money for his Mariam appeal came from the ... illegal sale of Iraqi oil. ... 'failing to declare' is an administrative 'crime' for an mp..... ...
    (uk.politics.misc)
  • Re: Pulling TextFields from a Form
    ... The NullReferenceException is because your variable 'req' is not set to ... All you do is declare it. ... You should either use the current request object, ... textbox as runat="server", you can just refer to the textbox by its name. ...
    (microsoft.public.dotnet.languages.vb)