C# equivalent for VB Class DEFAULT method

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Mortimer Schnurd (fugetaboutit_at_hotsmail.com)
Date: 04/01/04


Date: Thu, 01 Apr 2004 09:14:51 -0500

In VB, I could assign a "Default" to a class method. In that way, a
reference to the Class always returns the result of that
method/property (i.e. a reference to a textbox control always returns
the contents of textbox.text).
What is the C# equivalent? Is it the Indexer for that class?

--
John Wood


Relevant Pages

  • Re: OO problem: How to create a duplicate of a derived class with only a base variable ?
    ... by object reference: ... Does not use the TbaseClasses (or should it have been TbaseClassess? ... >> And it's not a class method. ... > as constants while instance methods aren't (because they'd need the ...
    (alt.comp.lang.borland-delphi)
  • Re: Passing a procedure as a parameter?
    ... method or the reference to the class if the method is a class method. ... To make your TProcedure type compatible with methods declare it like ... It's like a whole big sucking thing ...
    (comp.lang.pascal.delphi.misc)
  • Re: Passing a procedure as a parameter?
    ... > Methods differ from procedures in having on more parameter invisible to ... > method or the reference to the class if the method is a class method. ... > To make your TProcedure type compatible with methods declare it like ...
    (comp.lang.pascal.delphi.misc)
  • Re: Passing $_REQUEST by reference - sensible thing to do?
    ... rather then pass the object to my class method, ... public function example1 { ... When you pass-by-reference, keep in mind the possible side effects. ... objects by reference, unless you really know what you're doing, ...
    (comp.lang.php)
  • Re: "this" reference
    ... from a class method, I wish to pass a reference to the instance of the object being called to an outside function. ... A reference to Me can be returned to an external caller, but I don't see the point since the caller already must hold a reference to the object instance to start with in order to call a method on the instance. ... Function doItMyWay(oDIter, oFile) ... Dim bRVal: bRVal = True ...
    (microsoft.public.scripting.vbscript)