473,405 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Inline C#: Mark with Attribute

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,

--
Sean
Oct 16 '07 #1
2 2042
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?

--
Rory
Oct 16 '07 #2
just like code behind.

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

-- bruce (sqlwork.com)

Fao, Sean wrote:
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,
Oct 16 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mark | last post by:
Hello I have a page with an inline frame "frameA" on it. Within the frame is a table and within that is a cell with the id "morebit" Previously I would set the innerHTML for this cell from the...
14
by: Chris Mantoulidis | last post by:
I am not clear with the use of the keyword inline... I believe you add it do a function when you implement the function inside the header file where the class is stored... But is that all? What...
3
by: Dave | last post by:
Hello all, I have one method of a class calling another method (both private, though that shouldn't matter). The method and its enclosing class are declared in a .h file and the method is...
6
by: ThomasR | last post by:
I was wondering on the breadth of optimization with .NET JIT compiler. Let's presume I have an assembly of static classes - mostly helper functions. Some of these functions may be very small...
5
by: CES | last post by:
All, I was hoping that someone might be able to help me with a few questions on Aligning Block Elements properly... Basically I have a row that has a fixed width of 900px. Within the row their is...
25
by: toton | last post by:
Hi, As inline is not mandetory, it depends on compiler to inline certain function (or using switch like fior GCC), my question is there any scope for inlining when it is not declared as inline...
5
by: RuneLancer | last post by:
Hi, I've run into a bit of a snag. I need to have an inline element with a width, but this is obviously not going to happen as XHTML 1.0 doesn't allow width on an inline element. What I'm...
0
by: Mike | last post by:
Hi, I have a strange problem: I wrote a reverse proxy that redirects pages to a local or remote server. Everything seems to work fine, but I have a strange problem with inline styles. In my...
3
by: Baron Samedi | last post by:
I am looking for a reliable cross-browser pull-quote solution in CSS. See for instance, http://www.sitepoint.com/examples/pullquotes/ The problem seems at first to be sure that it functions...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.