Hello All,
I am wondering about attributes: in the Framework, they all seem to end
in the word Attribute, for example, BindableAttribute. But when you use
them, you can either code Bindable(true) or BindableAttribute(true). I
don't know of any other classes that work this way. Is this a "magic"
behavior of attribute classes? What is the reasoning for this? 2 1256
This is a feature of the C# compiler. If the attribute class ends with
"Attribute" (and it should, as per the naming guidelines), then you can use
it without the "Attribute" part at the end.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"KJ" <n_**********@mail.comwrote in message
news:11********************@e3g2000cwe.googlegroup s.com...
Hello All,
I am wondering about attributes: in the Framework, they all seem to end
in the word Attribute, for example, BindableAttribute. But when you use
them, you can either code Bindable(true) or BindableAttribute(true). I
don't know of any other classes that work this way. Is this a "magic"
behavior of attribute classes? What is the reasoning for this?
Thanks Nicholas.
Nicholas Paldino [.NET/C# MVP] wrote:
This is a feature of the C# compiler. If the attribute class ends with
"Attribute" (and it should, as per the naming guidelines), then you can use
it without the "Attribute" part at the end.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"KJ" <n_**********@mail.comwrote in message
news:11********************@e3g2000cwe.googlegroup s.com...
Hello All,
I am wondering about attributes: in the Framework, they all seem to end
in the word Attribute, for example, BindableAttribute. But when you use
them, you can either code Bindable(true) or BindableAttribute(true). I
don't know of any other classes that work this way. Is this a "magic"
behavior of attribute classes? What is the reasoning for this?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: svilen |
last post by:
hello again.
i'm now into using python instead of another language(s) for
describing structures of data, including names, structure,
type-checks, conversions, value-validations, metadata etc....
|
by: Will McGugan |
last post by:
Hi,
Why is that a tuple doesnt have the methods 'count' and 'index'? It
seems they could be present on a immutable object.
I realise its easy enough to convert the tuple to a list and do this,...
|
by: Jeffrey Borkent |
last post by:
Hi There,
Please let me rephrase the problem as many people misunderstood
what i was trying to ask.
I know that the __init__ is the class constructor, that was not my
question.
under the...
|
by: Alex Hunsley |
last post by:
I know that I can catch access to unknown attributes with code something
like the following:
class example:
def __getattr__(self, name):
if name == 'age':
return __age
else:
raise...
|
by: Michael C |
last post by:
Hi all,
I'm playing around with an XML structured like this:
<root>
<subone>
<setting name = "xyz" value = "100" />
</subone>
<subtwo>
<list name = "abcde" value = "1000" />
|
by: Random |
last post by:
I'm confused about the proper use and usefulness of namespaces. I beleive I
understand the purpose is so the developer can put classes within namespaces
to essentially organize your code. And I...
|
by: RYoung |
last post by:
Hi all,
Hope no one minds this long message, but I'm puzzled:
---------------
The following is a shortened version of schema located at...
|
by: JoeC |
last post by:
I have been writing games and I also read about good programming
techniques. I tend to create large objects that do lots of things. A
good example I have is a unit object. The object controls...
|
by: MartinRinehart |
last post by:
Working on parser for my language, I see that all classes (Token,
Production, Statement, ...) have one thing in common. They all
maintain start and stop positions in the source text. So it seems...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
| |