Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trimming blanks from a Parameter
Message
De
23/06/2010 08:32:08
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Trimming blanks from a Parameter
Versions des environnements
Environment:
C# 3.0
Divers
Thread ID:
01470305
Message ID:
01470305
Vues:
91
Hi,

I'm drawing a blank on how to do this. I am passing a parameter into a method and wish to trim any blanks from the parameter.

This is my code:
        private void SetClientTypeDisplay(string clientType)
        {
            if (clientType.Trim() == "Company")
            {
                this.pnlCompany.Visible = true;
But I get a runtime error: "Object reference not set to an object instance."

What's the correct syntax to do this?
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform