PC Review


Reply
Thread Tools Rate Thread

Default method of a class

 
 
Water Cooler v2
Guest
Posts: n/a
 
      14th Jul 2006
Is there support for designating a method of a class as the class'
default method? I believe there is some attribute that you append to
the method. Some [Default()] or [DefaultMethod()] or something I guess.
Can't remember.

 
Reply With Quote
 
 
 
 
Carl Daniel [VC++ MVP]
Guest
Posts: n/a
 
      14th Jul 2006
Water Cooler v2 wrote:
> Is there support for designating a method of a class as the class'
> default method? I believe there is some attribute that you append to
> the method. Some [Default()] or [DefaultMethod()] or something I
> guess. Can't remember.


There's DefaultPropertyAttribute (of [DefaultProperty]) to designate a
default property. There's no corresponding [DefaultMethod] attribute.

-cd


 
Reply With Quote
 
Ignacio Machin \( .NET/ C# MVP \)
Guest
Posts: n/a
 
      14th Jul 2006
Hi,

No, there is nothing like this AFAIK

How you were supposted to invoke a method like this?


--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Water Cooler v2" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Is there support for designating a method of a class as the class'
> default method? I believe there is some attribute that you append to
> the method. Some [Default()] or [DefaultMethod()] or something I guess.
> Can't remember.
>



 
Reply With Quote
 
=?Utf-8?B?RGF2aWQgQW50b24=?=
Guest
Posts: n/a
 
      14th Jul 2006
You're probably thinking of an indexer in C# (VB uses the keyword 'Default').
e.g.,
public class ClassWithIndexer
{
private int[] basearray;
public int this[int index]
{
get { return basearray[index]; }
set { basearray[index] = value };
}
}
--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C#/VB to C++ converter
C# Code Metrics: Quick metrics for C#


"Water Cooler v2" wrote:

> Is there support for designating a method of a class as the class'
> default method? I believe there is some attribute that you append to
> the method. Some [Default()] or [DefaultMethod()] or something I guess.
> Can't remember.
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
call a mnuFileNew_Click method from a Main MDI class from another class (can be a MdiChild class.. )? M. G, Microsoft Dot NET Framework Forms 1 31st May 2006 06:28 AM
How to make a class method default, and use the square brackets? Derrick Microsoft C# .NET 4 17th Mar 2005 03:09 PM
Inheritance problem - Base Class method being called when Derived Class method should be called. Jeff Molby Microsoft VB .NET 3 6th Mar 2005 11:03 PM
Specify which method is default in custom class =?Utf-8?B?QmluZw==?= Microsoft Excel Programming 1 23rd Dec 2004 10:33 PM
C# equivalent for VB Class DEFAULT method Mortimer Schnurd Microsoft C# .NET 3 1st Apr 2004 04:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:40 PM.