Inline C#: Mark with Attribute

  • Thread starter Thread starter Fao, Sean
  • Start date Start date
F

Fao, Sean

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,
 
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).

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?
 
just like code behind.

<script runat=server>
[Serializabe]
public myClass
{
}
</script>

-- bruce (sqlwork.com)
 
Back
Top