Home ASP.NET Hosting Dedicated Servers Contact Us
Announcements
Virtual Tiers
.NET Applications
XML Web Services
SQL Server Database
Web Traffic Statistics
Much More...
ASP.NET Web Site Hosting
Dedicated Servers
Windows 2003 Server
2.4 GHz Pentium 4
1024 MB RAM
80 GB Hard Drive
1000 GB/month
Fully Managed
Free Setup!
$268.00/month
Windows Dedicated Servers
Specialized Plans
10 or more Domains
Windows Services
Custom Plans
Windows Services
Learning & Support
About Us



ASP.NET Declaring Indexed Properties



Learn More about Server Intellect



ASP.NET Language Guide

C#

// Default Indexed Property
public String this[String name] {
get {
return (String) lookuptable[name];
}
}

VB.NET

' Default Indexed Property
Public Default ReadOnly Property DefaultProperty(Name As String) As String
Get
Return CStr(lookuptable(name))
End Get
End Property

JScript.NET

JScript does not support the creation of indexed or default indexed properties.
To emulate these properties in JScript, use function
declarations instead. Even though you cannot access the functions using indexed property syntax in C#, it will provide the illusion for VB.
public function Item(name:String) : String {
return String(lookuptable(name));
}