Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding a property in a Web Service
Message
From
19/05/2003 14:45:36
 
 
To
19/05/2003 14:13:47
General information
Forum:
ASP.NET
Category:
Web Services
Miscellaneous
Thread ID:
00790056
Message ID:
00790090
Views:
24
>I've been trying to find how to do that with the Properties window on the right and no wonder why I didn't find it. So, am I understanding correclty that we cannot add a property such as we do in VFP by using the visual interface?

Nope. You have to code it. Welcome to this brave new world! 8-)

Indeed, you better try to understand the difference between properties and member classes. In .NET, a property is the way to access a member class, not the member class itself.

Do inside Cathi's code:
public int Width  // This is the member class (or field)
{
   // The get/set code here is what constitutes the "Property"
   get { return width; }
   set
   {
      if (value > 0)
         width = value;
      else
         throw new ArgumentOutOfRangeException("Width must be 1 or higher");
   }
}
Of course Cathi or anyone else here can correct and enhance my explanation. But this actually how things are. VFP makes all of this invisible to us.

Best luck!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform