473,406 Members | 2,439 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,406 software developers and data experts.

get_ & set_

ACG
Newbie Proble

I have created one project, that I am now referencing in an other. In the new project I seem to be seeing properties of classes as get_Amount and set_Amount

Which is aweful to write code quickly to, for the quickinfo dropdown then becomes useless, for you simple want to select Amount

Is this a "feature" or a bug that is in the ide

Regards
ACG
Nov 15 '05 #1
5 4647

I may be answering the wrong question, but all properties in C# and VB.NET
are actually implemented as methods named get_XXX and set_XXX, with some
metadata markup added to the assembly (this plumbing is more obvious exposed
in MC++ and J#). There are several CLS rules that govern property interop,
and both VB and C# are hardwired to follow the CLS when creating their
properties. So are you not able to call the properties directly? Or is it
just a problem with Intellisense? What version of Visual Studio are you
running?
--
Mickey Williams
Author, "Microsoft Visual C# .NET Core Reference", MS Press
www.servergeek.com

"ACG" <an*******@discussions.microsoft.com> wrote in message
news:E5**********************************@microsof t.com...
Newbie Problem

I have created one project, that I am now referencing in an other. In the new project I seem to be seeing properties of classes as get_Amount and
set_Amount.
Which is aweful to write code quickly to, for the quickinfo dropdown then becomes useless, for you simple want to select Amount.
Is this a "feature" or a bug that is in the ide?

Regards,
ACG

Nov 15 '05 #2
ACG
I hope I can convey this well. When setting/getting a property of a class inside its own project, I get

foo.Amoun

When I use intellisense in another project that has a reference to the other projects' class library, I get

foo.get_Amoun

foo.set_Amoun

I would love to have just foo.Amount. Is this a studio 2003 problem

Regards
Ada

Nov 15 '05 #3
So is it just an Intellisense problem, or do you actually get a compiler
error with foo.Amount from the second project?

--
Mickey Williams
Author, "Microsoft Visual C# .NET Core Reference", MS Press
www.servergeek.com
"ACG" <an*******@discussions.microsoft.com> wrote in message
news:DB**********************************@microsof t.com...
I hope I can convey this well. When setting/getting a property of a class inside its own project, I get:
foo.Amount

When I use intellisense in another project that has a reference to the other projects' class library, I get:
foo.get_Amount
&
foo.set_Amount

I would love to have just foo.Amount. Is this a studio 2003 problem?

Regards,
Adam

Nov 15 '05 #4
<off topic>

Hey Mickey,

I just wanted to thank you for a great book. Yours was one of the first
I bought when I made the switch from VB6 to C# and I've been using it
ever since. Keep up the good work.

--
There are 10 kinds of people. Those who understand binary and those who
don't.

http://code.acadx.com
(Pull the pin to reply)
Nov 15 '05 #5
Cool, thanks for that.
I'm currently planning the update and building sample code, so feel free to
drop me a note if there are any topics that you'd like to see included (or
changed) in the Whidbey version of the book. My email address is [my first
name] at servergeek dot com.

--
Mickey Williams
Author, "Microsoft Visual C# .NET Core Reference", MS Press
www.servergeek.com
"Frank Oquendo" <fr*******@acadx.com> wrote in message
news:uw**************@TK2MSFTNGP10.phx.gbl...
<off topic>

Hey Mickey,

I just wanted to thank you for a great book. Yours was one of the first
I bought when I made the switch from VB6 to C# and I've been using it
ever since. Keep up the good work.

--
There are 10 kinds of people. Those who understand binary and those who
don't.

http://code.acadx.com
(Pull the pin to reply)

Nov 15 '05 #6

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

Similar topics

9
by: Collin VanDyck | last post by:
I have a basic understanding of this, so forgive me if I am overly simplistic in my explanation of my problem.. I am trying to get a Java/Xalan transform to pass through a numeric character...
1
by: DrTebi | last post by:
Hello, I have the following problem: I used to "encode" my email address within links, in order to avoid (most) email spiders. So I had a link like this: <a...
0
by: Thomas Scheffler | last post by:
Hi, I runned in trouble using XALAN for XSL-Transformation. The following snipplet show what I mean: <a href="http://blah.com/?test=test&amp;test2=test2">Test1&amp;</a> <a...
0
by: Moshe Plotkin | last post by:
B"H Sometimes when I import a COM Object written in VB with public Variables it requires me to use the get_ set_ functions instead of alowing me to use them ans Propeties. An suggestions? ...
4
by: johkar | last post by:
When the output method is set to xml, even though I have CDATA around my JavaScript, the operaters of && and < are converted to XML character entities which causes errors in my JavaScript. I know...
8
by: Nathan Sokalski | last post by:
I add a JavaScript event handler to some of my Webcontrols using the Attributes.Add() method as follows: Dim jscode as String = "return (event.keyCode>=65&&event.keyCode<=90);"...
11
by: Jeremy | last post by:
How can one stop a browser from converting &amp; to & ? We have a textarea in our system wehre a user can type in some html code and have it saved to the database. When the data is retireved...
14
by: Arne | last post by:
A lot of Firefox users I know, says they have problems with validation where the ampersand sign has to be written as &amp; to be valid. I don't have Firefox my self and don't wont to install it only...
12
by: InvalidLastName | last post by:
We have been used XslTransform. .NET 1.1, for transform XML document, Dataset with xsl to HTML. Some of these html contents contain javascript and links. For example: // javascript if (a &gt; b)...
7
by: John Nagle | last post by:
I've been parsing existing HTML with BeautifulSoup, and occasionally hit content which has something like "Design & Advertising", that is, an "&" instead of an "&amp;". Is there some way I can get...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
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,...
0
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...
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
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.