+ 1
If object is null, what happens?
If a create a object and set it with null, we have the same destructors result?
5 ответов
+ 1
null basically means no value.
If you set a variablr to null, it won't carry a value.
+ 1
Ok Yoann and Andreas, I thought that assign a object with null or nothing was the same, but are diferences! Thanks.
+ 1
Nothing is the key word for VB .Net and Null is for C#
0
do not care about the destructors at the beginning... destructors are used for memory fine tuning but basically they are not so often very useful.
If you try to access a property of a null object you will get an error. so you have to be sure it' not null before using it or use try/catch to manage this in the catch. but most of the time you have to be sure it' is not null with a simple test : if xx == nothing.
0
i think whit null only reserve the space in memory and whit destructors delete the space