Yggdrasil wrote:
Arran wrote: Well it will only apear as a static field if you set it to static. If you dont set it to a static field then you have to create a instance of the object to access the const.
AFAIK, 'const' is translated, in IL, into 'public static literal'. Should work either way.
That's what I thought as well and appears to be the case.
.class public auto ansi beforefieldinit EmailTypes
extends object
{
.method public hidebysig specialname rtspecialname instance void .ctor() cil managed
{}
.field public static literal string SalesOrderAck = string("SalesOrderAck")
.field public static literal string SalesQuoteAck = string("SalesQuoteAck")
}
|
Thanks anyway,
Stephen