473,856 Members | 1,480 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Difference between [RunInstaller(tr ue)] and [RunInstallerAtt ribute(true)]

I can't find any good information on the
relation/difference between
[RunInstaller(tr ue)] and [RunInstallerAtt ribute(true)]
attributes in the code. Please advise.

--
Regards
Konrad Viltersten
----------------------------------------
May all spammers die an agonizing death;
have no burial places; their souls be
chased by demons in Gehenna from one room
to another for all eternity and beyond.
Sep 3 '08 #1
8 5669
K Viltersten <tm**@vilterste n.comwrote:
I can't find any good information on the
relation/difference between
[RunInstaller(tr ue)] and [RunInstallerAtt ribute(true)]
attributes in the code. Please advise.
Almost no difference at all. From the C# 3.0 spec, section 17.2:

<quote>
By convention, attribute classes are named with a suffix of Attribute.
An attribute-name of the form type-name may either include or omit this
suffix. If an attribute class is found both with and without this
suffix, an ambiguity is present, and a compile-time error results. If
the attribute-name is spelled such that its right-most identifier is a
verbatim identifier (§2.4.2), then only an attribute without a suffix
is matched, thus enabling such an ambiguity to be resolved.
</quote>

--
Jon Skeet - <sk***@pobox.co m>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon.skeet
C# in Depth: http://csharpindepth.com
Sep 3 '08 #2
I can't find any good information on the
relation/difference between
[RunInstaller(tr ue)] and [RunInstallerAtt ribute(true)]
attributes in the code. Please advise.
Almost no difference at all. From the C# 3.0 spec, section 17.2:

<quote>
By convention, attribute classes are named with a suffix of Attribute.
An attribute-name of the form type-name may either include or omit this
suffix. If an attribute class is found both with and without this
suffix, an ambiguity is present, and a compile-time error results. If
the attribute-name is spelled such that its right-most identifier is a
verbatim identifier (§2.4.2), then only an attribute without a suffix
is matched, thus enabling such an ambiguity to be resolved.
</quote>

Great info. Thanks!

For some reason VS2005 will suggest the name
sans the suffix when using autogenerated code.
i almost got punched today for using the
suffix while a colleague insisted on not to.

--
Regards
Konrad Viltersten
----------------------------------------
May all spammers die an agonizing death;
have no burial places; their souls be
chased by demons in Gehenna from one room
to another for all eternity and beyond.
Sep 3 '08 #3
K Viltersten <tm**@vilterste n.comwrote:
Great info. Thanks!

For some reason VS2005 will suggest the name
sans the suffix when using autogenerated code.
i almost got punched today for using the
suffix while a colleague insisted on not to.
I think omitting the suffix is idiomatic - I certainly don't include it
myself.

--
Jon Skeet - <sk***@pobox.co m>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon.skeet
C# in Depth: http://csharpindepth.com
Sep 3 '08 #4
K Viltersten wrote:
>I can't find any good information on the
relation/difference between
[RunInstaller(tr ue)] and [RunInstallerAtt ribute(true)]
attributes in the code. Please advise.
For some reason VS2005 will suggest the name
sans the suffix when using autogenerated code.
i almost got punched today for using the
suffix while a colleague insisted on not to.
VS and your colleague are right. If you write
FoobarAttribute , then you will have all the maintainers
of your code searching for FoobarAttribute Attribute !

Arne

Sep 4 '08 #5
"Arne Vajhřj" <ar**@vajhoej.d kwrote in message
news:48******** *************** @news.sunsite.d k...
>For some reason VS2005 will suggest the name
sans the suffix when using autogenerated code.
i almost got punched today for using the
suffix while a colleague insisted on not to.

VS and your colleague are right. If you write
FoobarAttribute , then you will have all the maintainers
of your code searching for FoobarAttribute Attribute !
Oh yes, XmlAttributeAtt ribute certainly did teach us that sort of thing,
didn't it... :)
Sep 4 '08 #6
>>I can't find any good information on the
>>relation/difference between
[RunInstaller(tr ue)] and [RunInstallerAtt ribute(true)]
attributes in the code. Please advise.
>For some reason VS2005 will suggest the name
sans the suffix when using autogenerated code.
i almost got punched today for using the
suffix while a colleague insisted on not to.

VS and your colleague are right. If you write
FoobarAttribute , then you will have all the maintainers
of your code searching for FoobarAttribute Attribute !
How can we explain that the code provided by
MS on in the help uses the suffix, then? Is
it a mistake? A special case? Please advise.

--
Regards
Konrad Viltersten
----------------------------------------
May all spammers die an agonizing death;
have no burial places; their souls be
chased by demons in Gehenna from one room
to another for all eternity and beyond.
Sep 4 '08 #7
"K Viltersten" <tm**@vilterste n.comwrote in message
news:6i******** ****@mid.indivi dual.net...
How can we explain that the code provided by
MS on in the help uses the suffix, then? Is
it a mistake? A special case? Please advise.
It is _allowed_ to both provide and omit the suffix, so it's not a mistake.
On the other hand, Microsoft samples in MSDN have never been particularly
good as far as coding style is concerned - they often don't even follow
Microsoft's own style guide. Overall, vast majority of hand-written C# code
I've seen omits the suffix - after all, that was why it is allowed to do so
in the first place.
Sep 4 '08 #8
>How can we explain that the code provided by
>MS on in the help uses the suffix, then? Is
it a mistake? A special case? Please advise.

It is _allowed_ to both provide and omit the suffix, so it's not a
mistake. On the other hand, Microsoft samples in MSDN have never been
particularly good as far as coding style is concerned...
Got it. Thanks!

--
Regards
Konrad Viltersten
----------------------------------------
May all spammers die an agonizing death;
have no burial places; their souls be
chased by demons in Gehenna from one room
to another for all eternity and beyond.
Sep 4 '08 #9

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

Similar topics

46
4277
by: Scott Chapman | last post by:
There seems to be an inconsistency here: Python 2.3.2 (#1, Oct 3 2003, 19:04:58) on linux2 >>> 1 == True True >>> 3 == True False >>> if 1: print "true" ....
14
3447
by: root | last post by:
Hi group, Apologies in advance if this has been asked somewhere before, but I haven't managed to get anything from the Google archives - I've been getting introductory guides to C++ all day long. I am writing a program in Visual C++ 6 SP5. My code has a lot of "if" statements - 19 to be exact. If the if statements are true (technically, there should only be one that is ever true), the program needs to continue on after the if...
9
4068
by: sci | last post by:
I believe both ways to create an array of strings are correct. Is there any difference between these two? 1. char *MyString = {"First string", "Second string", ..."Tenth string"}; 2. char MyString = {"First string", "Second string", ..."Tenth string"};
2
3124
by: 23s | last post by:
My site's login page has a form w/ 2 textboxes and a submit button. If I'm in either of those textboxes (i.e., either one of the textboxes has focus), in any given browser, hitting "enter" on my keyboard submits the form. Server side, I handle the click event of the submit button. This is the expected behavior, and this is the behavior irrespective of what browser I use on the login page. However... I have different page that is an...
59
4612
by: Pierre Quentel | last post by:
Hi all, In some program I was testing if a variable was a boolean, with this test : if v in My script didn't work in some cases and I eventually found that for v = 0 the test returned True So I changed my test for the obvious "if type(v) is bool", but I still find it confusing that "0 in " returns True
40
2745
by: nufuhsus | last post by:
Hello all, First let me appologise if this has been answered but I could not find an acurate answer to this interesting problem. If the following is true: C:\Python25\rg.py>python Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) on win32 Type "help", "copyright", "credits" or "license" for more
3
2431
by: Riccardo Murri | last post by:
Hello, I have some code that stops when trying to find a graph in a list of similar graphs:: (Pydb) list 110 try: 111 canonical = self.base 112 except ValueError: 113 raise ValueError, \
11
1536
by: Daniel Klein | last post by:
Given the functions: function first() { echo "first\n"; return true; } function second() { echo "second\n"; return true; }
21
3270
by: Bill Cunningham | last post by:
I have create these 2 files. Called main.c and atr.c. They seem to work pretty well. I just wanted to submit them to see what if any errors others that know more might find. Thanks. atr.c #include <stdio.h> double atr (double th, double tl, double wc)
0
9922
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10702
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10800
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10391
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7934
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5763
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5962
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4584
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3203
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.