thomson wrote:
> Hi All,
> i do have a function where in which it instantiates an
> object
>
>
> eg: private void myfun()
> {
> Customer objCustomer =new Customer();
> // I want to pass this objCustomer to another function i tried this
> callanother(objCustomer)
>
> }
>
> private void callanother(Object objCus)
> {
> objCus.//Error
> }
>
>
> Iam getting an error in this point would any please let me know how do
> i send object to different functions
>
>
> Thanks in Advance
>
> thomson
Hi Thomson,
It would be helpful to know the error you're getting. Could you post the
error message, please?
Also, have you tried something like this:
///
private void callanother ( object objCus )
{
Customer c = objCus as Customer;
if ( c == null )
return;
c.DoSomething();
}
///
--
Hope this helps,
Tom Spink
|