Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing dataset by reference
Message
De
12/03/2012 11:09:58
John Baird
Coatesville, Pennsylvanie, États-Unis
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01538045
Message ID:
01538054
Vues:
46
>Hi,
>
>Here is a segment of code:
>
>
>DataSet ds = new DataSet();
>MyClass.MyMethod( ds );
>
>if (ds =!null)
>{
>    // Error message. Since ds is null.  But why the above ds =! null does not catch it? 
>}
>
>MyClass.MyMethod( DataSet ds)
>{
>     // for testing
>     ds = null;
>}
>
>
>Why does the line ds =! null does not catch that the ds is null?
>
>I also tried to declare the parameter ds as Out but it does not work either.


I'm having trouble with the ds=!null

What are you trying to do? To me that reads if ds = not null do this... it will never hit the error message routine...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform