| re: Throwing exceptions
Kevin,
I love your title.
--
Arne Garvander
(I program VB.Net for fun and C# to get paid.)
"Kevin Spencer" wrote:
[color=blue]
> Throwing exceptions stops execution. So, if you throw an exception, the
> exception is not "returned" from the method, but "thrown" by it. Therefore,
> when an exception is thrown, nothing is returned from the method. The method
> simply doesn't return.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> Professional Chicken Salad Alchemist
>
> Big thicks are made up of lots of little thins.
>
>
> "Sridhar" <Sridhar@discussions.microsoft.com> wrote in message
> news:46117C2B-D4C4-4A3D-B775-CB58FA719BD5@microsoft.com...[color=green]
> > Hi,
> >
> > I would like to know the general procedure to throw exceptions. Lets say
> > I have a datagrid in my webpage and I am pulling the data for my webpage
> > using a function. The function accepts parameter CompanyId and returns
> > datatable. If I pass an empty CompanyId from the webpage, the function
> > should throw an exception saying "CompanyId is empty". If I pass a Valid
> > CompanyId, it should return datatable. So how can we return multiple data
> > typed values from the same function?
> >
> > Please let me know.
> >
> > Thanks,
> > Sridhar.[/color]
>
>
>[/color] |