Tech Off Post

Single Post Permalink

View Thread: Reference Parameters in C#
  • User profile image
    BenDi

    If you only want to call methods on an existing object, there is no need to pass it as 'ref'.

    void DoFoo(IFoo param)
       {param.Modify();}

    will work just fine. And there you will have downcasting.

    Cheers

    Ben