Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding a property in a Web Service
Message
Information générale
Forum:
ASP.NET
Catégorie:
Web Services
Divers
Thread ID:
00790056
Message ID:
00790889
Vues:
14
Michel,

I see that you were able to get the properties syntax but for the one you were orginally asking about, here it is:
Public Property Width() As Integer
   Get
      Return width
   End Get
   Set
      If value > 0 Then
         width = value
      Else
         Throw New ArgumentOutOfRangeException("Width must be 1 or higher")
      End If
   End Set
End Property
>>To add properties, you do this in code inside of the class you want to add them to.
>>
>>
>>public int Width
>>{
>>   get { return width; }
>>   set
>>   {
>>      if (value > 0)
>>         width = value;
>>      else
>>         throw new ArgumentOutOfRangeException("Width must be 1 or higher");
>>   }
>>}
>>
>
>To have this code in VB.NET, how would I go with the changes I need to do?
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform