Questions tagged [static-indexers]

3 questions
142
votes
7 answers

Static Indexers?

Why are static indexers disallowed in C#? I see no reason why they should not be allowed and furthermore they could be very useful. For example: public static class ConfigurationManager { public object this[string name] { …
Malfist
  • 31,179
  • 61
  • 182
  • 269
0
votes
1 answer

Why no static indexers?

Possible Duplicates: How to reference an indexer member of a class in C# comments Static Indexers? As it stands, I have to write my code like this internal class ReportMap { static internal ReportMap Instance { get { return…
xofz
  • 5,600
  • 6
  • 45
  • 63
0
votes
0 answers

How to get a static number for a specific table from DB/2

We are using ASP.net MVC 4 on DB/2 database. How can I create a way to avoid data concurrency and give a user a unique number to be stored in a unique field of a table and handled on the database side? If I create a stored procedure to do this, how…
eaglei22
  • 2,589
  • 1
  • 38
  • 53