Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Default value (null) for int data
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Default value (null) for int data
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01308785
Message ID:
01308785
Vues:
62
Hi everybody,

I have the following method signature:
 public List<MembershipUserWrapperForMP> GetMembers(bool approvalStatus, string sortData, string ExcludeRole, int SiteID)
I want to be able to call it without 3 last parameters (they should be optional).

However, this declaration:
[DataObjectMethod(DataObjectMethodType.Select, false)]
        public List<MembershipUserWrapperForMP> GetMembers()
        {
            return GetMembers(true, true, null, null, null, null);
        }
produces the following error:
Error 103 Argument '6': cannot convert from '' to 'int' C:\Development\Visual Studio 2005\WebSites\FCAdmin\App_Code\MembershipUserAndProfileODS.cs 160 61 C:\...\FCAdmin\


There is not that much help in MS Help on this error.

Could you please tell me what should I use if I want to have optional integer parameter?

Thanks a lot in advance.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform