Custom Attributes in J#
From: Avid J# Programmer (AvidJProgrammer_at_discussions.microsoft.com)
Date: 01/28/05
- Next message: Avid J# Programmer: "RE: Custom Attributes in J#"
- Previous message: George Birbilis [MVP J#] [9880]: "Re: System.Drawing.Bitmap to java.awt.Image?"
- Next in thread: Avid J# Programmer: "RE: Custom Attributes in J#"
- Reply: Avid J# Programmer: "RE: Custom Attributes in J#"
- Reply: Lars-Inge Tønnessen [VJ# MVP]: "Re: Custom Attributes in J#"
- Reply: Bruno Jouhier [MVP]: "Re: Custom Attributes in J#"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Avid J# Programmer: "RE: Custom Attributes in J#"
- Previous message: George Birbilis [MVP J#] [9880]: "Re: System.Drawing.Bitmap to java.awt.Image?"
- Next in thread: Avid J# Programmer: "RE: Custom Attributes in J#"
- Reply: Avid J# Programmer: "RE: Custom Attributes in J#"
- Reply: Lars-Inge Tønnessen [VJ# MVP]: "Re: Custom Attributes in J#"
- Reply: Bruno Jouhier [MVP]: "Re: Custom Attributes in J#"
- Messages sorted by: [ date ] [ thread ]