|
Title:
|
Don't make ECO attributes or classes named System
|
Author:
|
Bob Swart |
Posted:
|
3/14/2006 10:36:24 AM
(GMT+1)
|
Content:
|
While working on the ECO III edition of Bob's Error Report System (BERT), I was designing this Report class with attributes such as ReportDate, Status, System, etc. This leads to uncompilable code, and it took me a little while to figure out that the attribute with the name "System" was the cause of that.
Since the generated source code already uses System as namespace reference in types like System.Object, System.DateTime and System.IndexOutOfRangeException, this would lead to compiler errors when a new attribute called System (defined as property in the class Report) would override the original System namespace scope. Duh!
OK, not a bug in ECO III, but something to keep in mind. The funny thing is that attributes and classes can be given special names like "type" or "class" and even "property" but just not System. Snif...
|
Back |
|