A default property is a property which is invoked when you use an indexer
without specifying the name of the property that takes an indexer. For
example, most Collections have a default property which allows you to
specify an item in the Collection via the following terminology:
SomeCollection[0] (C#)
SomeCollection( 0) (VB.Net)
I am not familiar with how this is declared in VB.Net, but to do so in C#,
you would create a default property something like the following:
public class foo
{
private StringCollectio n _Strings = new StringCollectio n();
public int this[int index]
{
get { return _Strings[index]; }
set { _String[index] = value; }
}
}
As you can see, the default property doesn't have to refer to the object
itself, but can be defined in any number of ways.
I would suspect that in your case, you possibly referenced:
....HttpContext[i]
or possibly
....HttpContext["foo"]
or possibly within a Page or other class having a System.Web.Http Context
member:
Context[i]
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Presuming that God is "only an idea" -
Ideas exist.
Therefore, God exists.
"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot com> wrote in message
news:uZ******** *******@TK2MSFT NGP12.phx.gbl.. .
Compiler Error Message: BC30367: Class 'System.Web.Htt pContext' cannot be
indexed because it has no default property.
how do I create a "default property" ??