M
Michel Walsh
Hi,
Looking for the syntax for a static indexer. For a non static 'access',
the following would do:
public class whatever
{
static Hashtable myHashtable = null;
// ----- here-----
public whatever this[string name]
{
get
{
return (whatever) myHashtable[name] ;
}
}
...
}
Clearly, that does not work prefixing with static,
static public whatever this[string name] {get{return (whatever)
myHashtable[name];} }
since 'this' cannot be used inside a static definition.
Vanderghast, Access MVP
Looking for the syntax for a static indexer. For a non static 'access',
the following would do:
public class whatever
{
static Hashtable myHashtable = null;
// ----- here-----
public whatever this[string name]
{
get
{
return (whatever) myHashtable[name] ;
}
}
...
}
Clearly, that does not work prefixing with static,
static public whatever this[string name] {get{return (whatever)
myHashtable[name];} }
since 'this' cannot be used inside a static definition.
Vanderghast, Access MVP