Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange syntax
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01612723
Message ID:
01612783
Vues:
55
searchValue is an object and declared in the function declaration:
 private static bool ShouldCreateFilterItem(object searchCriteriaViewModel, PropertyInfo pi, string doNotSearchValue, out object searchValue)
        {
            bool shouldCreateFilterItem = true;

            searchValue = pi.GetValue(searchCriteriaViewModel);// I fixed the code
>That depends on a lot of things you're not telling us. What type is searchValue?
>
>Regardless if this code is C#, the second = expression is pointless because it's simply assigning the first value assigned a second time to the same variable. Valid, but pointless and the compiler probably optimizes that away completely.
>
>+++ Rick ---
>
>>Hi,
>>
>>In one of the methods I see the following code
>>
>>
>>searchValue = searchValue = pi.GetValue(searchCriteriaViewModel);
>>
>>What does this double = mean here? Is it a typo or has some meaning?
>>
>>Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform