473,399 Members | 3,401 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,399 software developers and data experts.

Setting the default member of a class

Hi
I'm searching for the way to set up the default property of my class.
I'm using v1.1 of the fmk.
For example, when I drag an object of an ArrayList type into the Watch
window, it immediately displays the value of Count property like this:

myArrayList {Count=1} System.Collections.ArrayList

It's frustrating that I didn't find out how to specify this custom
attribute to my class.

Thanks.

Mar 7 '07 #1
6 1872
As a guess, [DefaultProperty]

http://msdn2.microsoft.com/en-us/lib...attribute.aspx

Marc
Mar 7 '07 #2
Thanks for reply.
It won't work.
I found out I need to modify 2 files in order to make the IDE to
understand what I want:

C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Packages
\Debugger\mcee_cs.dat
C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Packages
\Debugger\mcee_mc.dat

No other way?
Marc Gravell a scris:
As a guess, [DefaultProperty]

http://msdn2.microsoft.com/en-us/lib...attribute.aspx

Marc
Mar 7 '07 #3
"nano2k" <ad***********@ikonsoft.roha scritto nel messaggio
Thanks for reply.
It won't work.
I found out I need to modify 2 files in order to make the IDE to
understand what I want:
The IDE display the result of the ToString() method.
Override the ToString() and let it return the info you want to see in the
debugger.
Mar 7 '07 #4
>No other way?

If you're using VS2005 and .NET Framework 2.0 you can use the
DebuggerDisplayAttribute instead.
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Mar 7 '07 #5
Sorry, doesn't work
Fabio a scris:
"nano2k" <ad***********@ikonsoft.roha scritto nel messaggio
Thanks for reply.
It won't work.
I found out I need to modify 2 files in order to make the IDE to
understand what I want:

The IDE display the result of the ToString() method.
Override the ToString() and let it return the info you want to see in the
debugger.
Mar 8 '07 #6
"nano2k" <ad***********@ikonsoft.roha scritto nel messaggio
Sorry, doesn't work
It *works*.
If it doesn't work I don't understand the problem or you didn't it
correctly.

Mar 8 '07 #7

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

Similar topics

4
by: Steven T. Hatton | last post by:
I mistakenly set this to the comp.std.c++ a few days back. I don't believe it passed the moderator's veto - and I did not expect or desire anything different. But the question remains: ISO/IEC...
9
by: Pierre Senellart | last post by:
The C++ standard states (26.3.2.1), about std::valarray constructors: > explicit valarray(size_t); > > The array created by this constructor has a length equal to the value of > the argument....
8
by: pauldepstein | last post by:
I am writing a program which looks at nodes which have coordinates which are time-dependent. So I have a class called node which contains the private member declarations int date; int month; ...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
3
by: Osama Aouda | last post by:
Hi All, If you have the following class: class foo { private: int offset; public: void SetOffset(int InOffset); };
23
by: Jess | last post by:
Hello, I understand the default-initialization happens if we don't initialize an object explicitly. I think for an object of a class type, the value is determined by the constructor, and for...
4
by: Jess | last post by:
Hello, I tried several books to find out the details of object initialization. Unfortunately, I'm still confused by two specific concepts, namely default-initialization and...
43
by: JohnQ | last post by:
Are a default constructor, destructor, copy constructor and assignment operator generated by the compiler for a struct if they are not explicitely defined? I think the answer is yes, because...
10
by: JosephLee | last post by:
In Inside C++ object Model, Lippman said there are four cases in which compile will sythesize a default constructor to initialize the member variables if the constructor is absent: 1. there is a...
3
by: kjell | last post by:
Hi, I wonder if someone may have a solution to a small problem I'm experiencing with a C++ program? I'm have two classes in my application that provides methods for setting parameters in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
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
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
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,...
0
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...

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.