Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing dataset by reference
Message
 
 
À
12/03/2012 13:10:03
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01538045
Message ID:
01538079
Vues:
24
>>Again, thank you for taking the time to explain. As you can see I didn't realize that the line [ds = null] created a new instance. I thought that the new instance has to be created with declaration like:
>>
>>Dataset dsName;
>>
>>
>>This is what was confusing that without declaring I was creating new instance.

>
>Yes, I can see how that might be confusing. Look at it this way: anytime you use "object = whatever;" in your method, you are pointing that object to a new spot in memory and you've lost your original reference. That's the important thing to remember about passing objects by reference.
>
>~~Bonnie

I will try to remember this. I have learned so much new today I am thinking about punching in early today................ No (a la Barat) :).
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform