Custom Attributes in J#

From: Avid J# Programmer (AvidJProgrammer_at_discussions.microsoft.com)
Date: 01/28/05


Date: Fri, 28 Jan 2005 13:05:03 -0800

Is it possible to define customer attributes in a J# application? I've seen
it done in C#, but i tried it in J# and it wouldn't work. I tried the
following code:

/** @attribute System.AttributeUsage (System.AttributeTargets.Assembly) */
public class BuildLocationAttribute extends Attribute
{
        private String BuildLocation;
        public BuildLocationAttribute(String bl){BuildLocation = bl;}
        public String getBuildLocation(){return BuildLocation;}
}

and I get an error saying "Cannot author attributes, enums or value types".
It doesn't seem to like the fact that i'm extending from the Attribute class

Is there a way around this? I just want to state the build location inside
the application exe's Version Tab in the file properties. Any help with this
would be greatly appreciated =)

--
http://www.hungryshadow.com

Loading