POV-Ray : Newsgroups : povray.off-topic : C# 4.0 Default parameters : Re: C# 4.0 Default parameters Server Time
6 Sep 2024 13:17:31 EDT (-0400)
  Re: C# 4.0 Default parameters  
From: Warp
Date: 5 Feb 2009 05:47:17
Message: <498ac3b5@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> Warp wrote:
> >   What if you want to call the function (through the pointer) for different
> > objects?

> I can't think of a convenient way offhand to do this in C#. I think here 
> you'd likely fall back to a fixed-named function and then subclass objects 
> (or inherit from interfaces) to do that.

  But the whole idea with function pointers is that you can call different
functions (which have the same signature) from the same code.

  In C++ templates have mostly replaced the need for this (or at least made
it way easier in syntax), but not completely.

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.