Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling Hook Methods
Message
From
26/02/2010 14:30:48
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
26/02/2010 14:05:28
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01451309
Message ID:
01451311
Views:
40
>Hi,
>
>I want my BO to clear out some of its values depending on a flag that is set by the user. I guess I need to do this in a HookPreSave() method so I tried the following:
>
>In my client.partial.cs I added this (Client is my BO)
>
>
        protected virtual bool HookPreSaveEntity(EntityType currentEntity)
>        {
>
>        }
>
>but I get an error:
>
>'SamaanSystems.IAS.Business.Client.HookPreSaveEntity(EntityType)': not all code paths return a value
>
>What does this mean and how do I achieve my goal?

It just means you didn't finish this method yet. You have said it should return a bool value and you are not returning it. If you want to come back to it later and don't want the error then just put a line in the method to return either true or false.
Tim
Timothy Bryan
Previous
Reply
Map
View

Click here to load this message in the networking platform