Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trouble with Properties
Message
De
03/12/2006 09:39:49
 
 
À
03/12/2006 04:38:35
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01174402
Message ID:
01174473
Vues:
7
>Bonnie gave the answer to your problem but just thought it worth pointing out that mCusref should probably be private (if it's Public then there's not much point in the Cusref property.....)

Good point Viv ... I missed that faux pas.

~~Bonnnie


>>Hi.
>>I am trying to set up properties on a form but keep cant get the form to recognise my property. I have one form which calls another and I am trying to pass in a parameter to the called form:
>>
>>Click Event of Calling Form
>>---------------------------
>>Form frmLines = new OrderLines();
>>frmLines.Cusref = "3";
>>frmLines.Show();
>>
>>
>>In OrderLines (Called) Form
>>---------------------------
>>public string mCusref = " ";
>>.....
>>public string Cusref
>> {
>> get { return mCusref ;}
>> set { mCusref = value;}
>> }
>>
>>The frmLines.Cusref shows an error and Intellisense is not comong up with Cusref as being a property of the form.
>>
>>This is the first time I have used Dot Net properties so perhaps I am missing something.....
>
>Bonnie gave the answer to your problem but just thought it worth pointing out that mCusref should probably be private (if it's Public then there's not much point in the Cusref property.....)
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform