Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help following code
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Help following code
Divers
Thread ID:
00997079
Message ID:
00997079
Vues:
43
I am looking at some code in C# and I don't know what it's doing. Can anyone show me the light?

ParentCategoryID == 0 ? "NULL" : ParentCategoryID.ToString()

I assume what's doing is returning "null" if ParentCategoryID equals 0 otherwise converting the ParentCategoryID to a string.

However, I don't understand how this construct works. specifically what is the ? function or the : function.

Thank you,
Paul
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform