I have to do inline C# (please don't ask why!) and I need to decorate
one of the classes with the [Serializable] attribute. Normally I would
just add this to the top of my class, but how do I do this inline?
I've done so quick searches and haven't come up with anything (kind of a
hard thing to search for).
Thank you in advance,

Signature
Sean
Rory Becker - 16 Oct 2007 08:11 GMT
> I have to do inline C# (please don't ask why!) and I need to decorate
> one of the classes with the [Serializable] attribute. Normally I
[quoted text clipped - 3 lines]
> I've done so quick searches and haven't come up with anything (kind of
> a hard thing to search for).
Not sure... I think I would mark the codebehind class which the runtime generated
page class inherits from.
(see me using my new found knowledge Juan :) )
This would only work for Attributes which are inheritable (erm... attribute
themselves to the descendents of the class they mark)
Does this help?
--
Rory
bruce barker - 16 Oct 2007 16:49 GMT
just like code behind.
<script runat=server>
[Serializabe]
public myClass
{
}
</script>
-- bruce (sqlwork.com)
> I have to do inline C# (please don't ask why!) and I need to decorate
> one of the classes with the [Serializable] attribute. Normally I would
[quoted text clipped - 4 lines]
>
> Thank you in advance,